-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy patheslint.config.mjs
More file actions
63 lines (60 loc) · 1.62 KB
/
Copy patheslint.config.mjs
File metadata and controls
63 lines (60 loc) · 1.62 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
import tseslint from '@typescript-eslint/eslint-plugin';
import tsparser from '@typescript-eslint/parser';
export default [
{
ignores: [
'node_modules/**',
'dist/**',
'build/**',
'main.js',
'*.config.mjs',
'version-bump.mjs'
]
},
{
files: ['**/*.ts'],
languageOptions: {
parser: tsparser,
parserOptions: {
sourceType: 'module',
ecmaVersion: 'latest'
},
globals: {
// Node.js globals
__dirname: 'readonly',
__filename: 'readonly',
console: 'readonly',
exports: 'writable',
global: 'readonly',
module: 'readonly',
process: 'readonly',
require: 'readonly'
}
},
plugins: {
'@typescript-eslint': tseslint
},
rules: {
// ESLint recommended rules
...tseslint.configs['eslint-recommended'].rules,
// TypeScript ESLint recommended rules
...tseslint.configs.recommended.rules,
// Custom rules from your original config
'no-unused-vars': 'off',
'@typescript-eslint/no-unused-vars': ['error', { args: 'none' }],
'@typescript-eslint/ban-ts-comment': 'off',
'no-prototype-builtins': 'off',
'@typescript-eslint/no-empty-function': 'off',
// Ban any type and disable comments
'@typescript-eslint/no-explicit-any': 'error',
'no-inline-comments': 'off', // Allow inline comments
'no-restricted-syntax': [
'error',
{
selector: 'TSAnyKeyword',
message: 'any type is not allowed. Use unknown with proper type guards instead.'
}
]
}
}
];