-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy patheslint.config.js
More file actions
45 lines (43 loc) · 1010 Bytes
/
eslint.config.js
File metadata and controls
45 lines (43 loc) · 1010 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
import js from '@eslint/js';
import eslintConfigPrettier from 'eslint-config-prettier';
import importPlugin from 'eslint-plugin-import';
import globals from 'globals';
export default [
js.configs.recommended,
importPlugin.flatConfigs.recommended,
{
languageOptions: {
globals: {
...globals.node
},
ecmaVersion: 'latest',
sourceType: 'module'
},
rules: {
'import/namespace': ['error', { allowComputed: true }],
'import/order': [
'error',
{
groups: ['builtin', 'external', ['parent', 'sibling', 'index']],
'newlines-between': 'always',
alphabetize: {
order: 'asc',
caseInsensitive: true
}
}
],
eqeqeq: 'error',
'guard-for-in': 'error',
'new-cap': 'error',
'no-caller': 'error',
'no-console': 'error',
'no-extend-native': 'error',
'no-loop-func': 'error',
'no-underscore-dangle': 'error',
'no-var': 'error',
'one-var': ['error', 'never'],
strict: ['error', 'global']
}
},
eslintConfigPrettier
];