forked from the1laz/cgateweb
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy patheslint.config.js
More file actions
49 lines (45 loc) · 1.61 KB
/
eslint.config.js
File metadata and controls
49 lines (45 loc) · 1.61 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
const js = require('@eslint/js');
const globals = require('globals');
module.exports = [
js.configs.recommended,
{
languageOptions: {
ecmaVersion: 'latest',
sourceType: 'commonjs',
globals: {
...globals.node,
...globals.jest
}
},
rules: {
// Code quality - keep existing structure
'no-console': 'off', // We use console for structured logging
'no-unused-vars': ['warn', {
'argsIgnorePattern': '^_',
'varsIgnorePattern': '^_'
}],
'no-undef': 'error',
'no-unreachable': 'error',
// Style consistency - relaxed to match existing codebase
'indent': 'off', // Many files use mixed indentation, fix gradually
'quotes': 'off', // Mixed single/double quotes in codebase
'semi': ['error', 'always'],
'comma-dangle': 'off', // Mixed trailing comma usage
'object-curly-spacing': 'off', // Mixed spacing
'array-bracket-spacing': 'off', // Mixed spacing
// Best practices - gradually enforce
'eqeqeq': 'warn',
'no-var': 'warn',
'prefer-const': 'warn',
'no-eval': 'error',
'no-implied-eval': 'error',
'no-prototype-builtins': 'warn',
'no-case-declarations': 'warn',
// Error handling
'no-throw-literal': 'error'
}
},
{
ignores: ['node_modules/', 'coverage/', '*.min.js']
}
];