-
-
Notifications
You must be signed in to change notification settings - Fork 69
/
Copy pathbase.eslintrc.cjs
51 lines (50 loc) · 1.01 KB
/
base.eslintrc.cjs
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
/**
* @import {TSESLint} from '@typescript-eslint/utils'
* @param {string} project
* @returns {TSESLint.ClassicConfig.Config}
*/
const base = project => ({
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
'plugin:import-x/errors',
'plugin:import-x/typescript',
],
settings: {
'import-x/resolver': {
typescript: {
project,
noWarnOnMultipleProjects: true,
},
},
},
rules: {
'import-x/no-duplicates': 0,
'import-x/no-unresolved': 2,
'import-x/extensions': [
2,
'ignorePackages',
{
js: 'never',
jsx: 'never',
ts: 'never',
tsx: 'never',
},
],
'node/no-extraneous-import': 0,
'node/no-missing-import': 0,
},
overrides: [
{
files: '**/.*.cjs',
env: {
node: true,
},
rules: {
'@typescript-eslint/no-require-imports': 'off',
},
},
],
})
module.exports = base