-
-
Notifications
You must be signed in to change notification settings - Fork 23
Expand file tree
/
Copy patheslint.config.js
More file actions
44 lines (43 loc) · 1.09 KB
/
eslint.config.js
File metadata and controls
44 lines (43 loc) · 1.09 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
const config = require('eslint-config-hexo/ts');
const testConfig = require('eslint-config-hexo/test');
module.exports = [
// Configurations applied globally
...config,
{
'rules': {
'@typescript-eslint/no-explicit-any': 0,
'@typescript-eslint/no-var-requires': 0,
'@typescript-eslint/no-require-imports': 0,
'@typescript-eslint/ban-ts-comment': 0,
'no-use-before-define': 0,
'n/no-missing-require': 0,
'n/no-missing-import': 0,
'@typescript-eslint/no-unused-vars': [
'error', {
'argsIgnorePattern': '^_'
}
]
}
},
// Configurations applied only to test files
{
files: [
'test/**/*.ts'
],
languageOptions: {
...testConfig.languageOptions
},
rules: {
...testConfig.rules,
'@typescript-eslint/ban-ts-comment': 0,
'@typescript-eslint/no-unused-expressions': 0,
'@typescript-eslint/no-unused-vars': [
'error', {
'varsIgnorePattern': '^_',
'argsIgnorePattern': '^_',
'caughtErrorsIgnorePattern': '^_'
}
]
}
}
];