forked from node-dmx/dmx
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheslint.config.js
44 lines (39 loc) · 1000 Bytes
/
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
import js from '@eslint/js'
import tsLintPlugin from '@typescript-eslint/eslint-plugin'
import tsLintParser from '@typescript-eslint/parser'
import globals from 'globals'
const baseConfig = {
...js.configs.recommended,
...tsLintPlugin.configs.recommendedTypeCheckedOnly,
...tsLintPlugin.configs.stylecticTypeCheckedOnly,
}
const srcConfig = {
files: [ 'src/**/*' ],
languageOptions: {
parser: tsLintParser,
parserOptions: {
project: true,
tsconfigRootDir: import.meta.dirname,
},
},
plugins: {
'@typescript-eslint': tsLintPlugin,
},
rules: {
'@typescript-eslint/no-explicit-any': [ 'warn', { fixToUnknown: true } ],
'@typescript-eslint/no-unused-vars': 'error',
'no-unused-vars': 'off',
},
}
const testConfig = {
files: [ 'test/**/*' ],
languageOptions: {
globals: globals.jest,
},
}
const nodeConfig = {
languageOptions: {
globals: globals.node,
},
}
export default [ baseConfig, srcConfig, testConfig, nodeConfig ]