-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheslint.config.js
More file actions
57 lines (49 loc) · 1.39 KB
/
eslint.config.js
File metadata and controls
57 lines (49 loc) · 1.39 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
import eslintConfigPrettier from 'eslint-config-prettier'
import pluginSecurity from 'eslint-plugin-security'
import neostandard, { resolveIgnoresFromGitignore } from 'neostandard'
export default [
// Base config with TypeScript and gitignore integration
...neostandard({
ts: true,
ignores: resolveIgnoresFromGitignore(),
filesTs: ['src/**/*.ts', '__tests__/**/*.ts']
}),
// Security rules
pluginSecurity.configs.recommended,
// Turn off conflicting formatting rules to defer to Prettier
eslintConfigPrettier,
// Custom tweaks
{
rules: {
'n/no-process-exit': 'warn',
'n/no-unsupported-features': 'off',
'n/no-unpublished-require': 'off',
// Prettier conflict fix
'@stylistic/space-before-function-paren': 'off',
// Disable rarely useful rules
'n/hashbang': 'off',
// Disable security warnings for test and image processing files
'security/detect-object-injection': 'off'
},
languageOptions: {
ecmaVersion: 2024,
sourceType: 'module'
}
},
// Test files configuration
{
files: ['__tests__/**/*.ts'],
languageOptions: {
globals: {
describe: 'readonly',
test: 'readonly',
expect: 'readonly',
beforeEach: 'readonly',
afterEach: 'readonly',
beforeAll: 'readonly',
afterAll: 'readonly',
jest: 'readonly'
}
}
}
]