-
-
Notifications
You must be signed in to change notification settings - Fork 11
/
eslint.config.js
53 lines (45 loc) · 1.29 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
// @ts-check
/** @import {Config} from 'typescript-eslint' */
import eslint from '@eslint/js'
import eslintConfigPrettier from 'eslint-config-prettier'
import globals from 'globals'
import tseslint from 'typescript-eslint'
/**
* @param {Config} configArr
*/
function defineConfig(configArr) {
return configArr
}
export default defineConfig([
// must use single `ignores` key
{
ignores: ['dist/', '**/*.module.less.d.ts'],
},
{
languageOptions: {
globals: {
...globals.browser,
...globals.node,
},
},
},
eslint.configs.recommended,
...tseslint.configs.recommended,
eslintConfigPrettier,
{
rules: {
//
'prefer-const': ['warn', { destructuring: 'all' }],
'no-constant-condition': 'off',
// ts
'@typescript-eslint/ban-ts-comment': 'off',
'@typescript-eslint/no-unused-vars': 'off',
'@typescript-eslint/no-non-null-assertion': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-namespace': 'off',
'@typescript-eslint/no-unused-expressions': 'off',
// '@typescript-eslint/consistent-type-imports': ['warn', { 'fixStyle': 'inline-type-imports' }],
'@typescript-eslint/consistent-type-imports': ['warn', { fixStyle: 'separate-type-imports' }],
},
},
])