-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy patheslint.config.js
More file actions
77 lines (76 loc) · 2.16 KB
/
eslint.config.js
File metadata and controls
77 lines (76 loc) · 2.16 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
import js from '@eslint/js';
export default [
js.configs.recommended,
{
languageOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
globals: {
// Node.js globals
console: 'readonly',
process: 'readonly',
__dirname: 'readonly',
__filename: 'readonly',
Buffer: 'readonly',
global: 'readonly',
module: 'readonly',
require: 'readonly',
exports: 'writable',
setTimeout: 'readonly',
setInterval: 'readonly',
clearTimeout: 'readonly',
clearInterval: 'readonly',
// ES2021 globals
globalThis: 'readonly',
fetch: 'readonly',
URL: 'readonly',
// Vitest globals
describe: 'readonly',
it: 'readonly',
expect: 'readonly',
beforeEach: 'readonly',
afterEach: 'readonly',
beforeAll: 'readonly',
afterAll: 'readonly',
vi: 'readonly'
}
},
rules: {
'no-console': 'off',
'no-unused-vars': 'off', // TODO: Re-enable and fix
'no-undef': 'off', // TODO: Re-enable and fix
'no-useless-escape': 'off', // TODO: Re-enable and fix
'semi': 'off', // TODO: Re-enable after auto-fix
'quotes': 'off', // TODO: Re-enable after auto-fix
'indent': 'off', // TODO: Re-enable after auto-fix
'comma-dangle': 'off', // TODO: Re-enable after auto-fix
'no-trailing-spaces': 'off', // TODO: Re-enable after auto-fix
'eol-last': 'off' // TODO: Re-enable after auto-fix
}
},
{
files: ['test/**/*.js', 'test/**/*.test.js'],
rules: {
// TODO: Re-enable after fixing process.cwd() usage
// 'no-restricted-syntax': [
// 'error',
// {
// selector: 'CallExpression[callee.object.name="process"][callee.property.name="cwd"]',
// message: 'Do not use process.cwd() in tests. Use createTestDir() from test/helpers/test-dir.js instead for proper test isolation.'
// }
// ]
}
},
{
ignores: [
'node_modules/',
'dist/',
'build/',
'coverage/',
'docs/.vocs/',
'docs/dist/',
'template/',
'*.config.js'
]
}
];