-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheslint.config.js
More file actions
51 lines (50 loc) · 1.37 KB
/
Copy patheslint.config.js
File metadata and controls
51 lines (50 loc) · 1.37 KB
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
46
47
48
49
50
51
import prettier from 'eslint-config-prettier';
export default [
{
ignores: ['node_modules/**', 'coverage/**', 'logs/**', 'docs/**'],
},
{
files: ['**/*.js'],
languageOptions: {
ecmaVersion: 2022,
sourceType: 'module',
globals: {
console: 'readonly',
process: 'readonly',
setTimeout: 'readonly',
clearTimeout: 'readonly',
setImmediate: 'readonly',
AbortController: 'readonly',
Map: 'readonly',
Set: 'readonly',
Promise: 'readonly',
Date: 'readonly',
JSON: 'readonly',
Math: 'readonly',
Error: 'readonly',
Number: 'readonly',
Array: 'readonly',
Object: 'readonly',
Buffer: 'readonly',
},
},
rules: {
'no-unused-vars': ['error', { argsIgnorePattern: '^_', varsIgnorePattern: '^_' }],
'no-undef': 'error',
'no-const-assign': 'error',
'no-dupe-keys': 'error',
'no-duplicate-case': 'error',
'no-unreachable': 'error',
eqeqeq: ['error', 'always'],
'no-var': 'error',
'prefer-const': 'error',
// Naming conventions
camelcase: ['error', { properties: 'never', ignoreDestructuring: true }],
// Complexity analysis
complexity: ['warn', { max: 15 }],
'max-depth': ['warn', 4],
'max-nested-callbacks': ['warn', 3],
},
},
prettier,
];