-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy patheslint.config.mjs
More file actions
46 lines (45 loc) · 1.35 KB
/
eslint.config.mjs
File metadata and controls
46 lines (45 loc) · 1.35 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
import glspConfig from '@eclipse-glsp/eslint-config';
export default [
...glspConfig,
// Ignore JS config/build files that are not part of the TS project
{
ignores: ['**/*.js', '**/*.mjs', '**/*.cjs']
},
// Apply parserOptions.project only to TypeScript files
{
files: ['**/*.{ts,tsx}'],
languageOptions: {
parserOptions: {
project: './tsconfig.eslint.json',
tsconfigRootDir: import.meta.dirname
}
}
},
// Repository-specific rule overrides
{
files: ['**/*.{ts,tsx}'],
rules: {
'@typescript-eslint/no-shadow': 'off',
'@typescript-eslint/padding-line-between-statements': 'off',
'no-restricted-imports': [
'warn',
{
name: 'sprotty-protocol',
message:
"The sprotty-protocol default exports are customized and reexported by GLSP. Please import from '@eclipse-glsp/protocol' instead"
},
'.',
'..',
'../..'
]
}
},
// Test file overrides
{
files: ['**/*.spec.{ts,tsx}'],
rules: {
'@typescript-eslint/no-unused-expressions': 'off',
'import-x/namespace': 'off'
}
}
];