Skip to content

Commit 60fca3f

Browse files
nah mjs
1 parent 77b23e6 commit 60fca3f

File tree

2 files changed

+39
-41
lines changed

2 files changed

+39
-41
lines changed

eslint.config.cjs

Lines changed: 0 additions & 41 deletions
This file was deleted.

eslint.config.mjs

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
import { defineConfig } from 'eslint/config';
2+
import globals from 'globals';
3+
import path from 'node:path';
4+
import { fileURLToPath } from 'node:url';
5+
import js from '@eslint/js';
6+
import { FlatCompat } from '@eslint/eslintrc';
7+
8+
const __filename = fileURLToPath(import.meta.url);
9+
const __dirname = path.dirname(__filename);
10+
const compat = new FlatCompat({
11+
baseDirectory: __dirname,
12+
recommendedConfig: js.configs.recommended,
13+
allConfig: js.configs.all
14+
});
15+
16+
export default defineConfig([{
17+
extends: compat.extends('eslint:recommended'),
18+
19+
languageOptions: {
20+
globals: {
21+
...globals.browser,
22+
...globals.commonjs,
23+
...globals.es2015,
24+
...globals.node,
25+
...globals.mocha,
26+
},
27+
28+
ecmaVersion: 2020,
29+
sourceType: 'module',
30+
},
31+
32+
rules: {
33+
'linebreak-style': ['error', 'unix'],
34+
quotes: ['error', 'single'],
35+
semi: ['error', 'always'],
36+
'no-console': 0,
37+
'no-unused-vars': 0,
38+
},
39+
}]);

0 commit comments

Comments
 (0)