-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy patheslint.config.js
64 lines (60 loc) · 1.7 KB
/
eslint.config.js
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
import eslint from '@eslint/js';
import tseslint from '@typescript-eslint/eslint-plugin';
import tsparser from '@typescript-eslint/parser';
import prettier from 'eslint-config-prettier';
export default [
// Base config for all files
{
ignores: [
'**/node_modules/**',
'**/cli/lib/**',
'**/generator-base/lib/**',
'**/generator-html-doc/lib/**',
'**/lib/lib/**',
'**/generator-typescript/lib/**',
'**/parser/lib/**',
'**/tmp/**',
'**/dist/**',
'**/test/**',
'**/templates/**',
'**/examples/**',
'**/@types/**',
'**/*.js',
'**/*.cjs',
]
},
// TypeScript files
{
files: ['**/*.ts'], // Explicitly specify files to lint
languageOptions: {
parser: tsparser,
parserOptions: {
project: ['./packages/*/tsconfig.json'],
},
globals: {
imports: true
}
},
plugins: {
'@typescript-eslint': tseslint
},
rules: {
'semi': ['error', 'never'],
'quotes': ['error', 'single'],
'no-debugger': 'off',
'@typescript-eslint/triple-slash-reference': 'off',
'camelcase': 'off',
'@typescript-eslint/camelcase': 'off'
}
},
// Special rules for .d.ts files
{
files: ['**/*.d.ts'],
rules: {
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/ban-types': 'off',
'@typescript-eslint/no-unused-vars': 'off'
}
},
prettier
];