Skip to content

Commit c607370

Browse files
committed
Update ESLint
1 parent 7dbb12e commit c607370

File tree

5 files changed

+3152
-1463
lines changed

5 files changed

+3152
-1463
lines changed

.eslintrc.json

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

eslint.config.mjs

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
import { configs } from 'eslint-config-hudochenkov';
2+
import eslintConfigPrettier from 'eslint-config-prettier';
3+
import globals from 'globals';
4+
5+
export default [
6+
...configs.main,
7+
eslintConfigPrettier,
8+
{
9+
languageOptions: {
10+
globals: {
11+
...Object.fromEntries(Object.entries(globals.browser).map(([key]) => [key, 'off'])),
12+
...globals.node,
13+
...globals.jest,
14+
testConfig: true,
15+
testRule: true,
16+
},
17+
ecmaVersion: 'latest',
18+
sourceType: 'module',
19+
},
20+
rules: {
21+
'import/extensions': [
22+
'error',
23+
'always',
24+
{
25+
ignorePackages: true,
26+
},
27+
],
28+
'unicorn/prefer-module': 'error',
29+
'unicorn/prefer-node-protocol': 'error',
30+
},
31+
},
32+
];

0 commit comments

Comments
 (0)