forked from import-js/eslint-plugin-import
-
-
Notifications
You must be signed in to change notification settings - Fork 19
/
.eslintrc.js
68 lines (64 loc) · 1.54 KB
/
.eslintrc.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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
module.exports = {
root: true,
plugins: ['eslint-plugin', 'import-x'],
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:eslint-plugin/recommended',
'plugin:import-x/recommended',
'plugin:prettier/recommended',
],
env: {
node: true,
es6: true,
es2017: true,
},
parserOptions: {
sourceType: 'module',
ecmaVersion: 2020,
},
rules: {
'@typescript-eslint/no-var-requires': 'off',
'eslint-plugin/consistent-output': ['error', 'always'],
'eslint-plugin/meta-property-ordering': 'error',
'eslint-plugin/no-deprecated-context-methods': 'error',
'eslint-plugin/no-deprecated-report-api': 'off',
'eslint-plugin/prefer-replace-text': 'error',
'eslint-plugin/report-message-format': 'error',
'eslint-plugin/require-meta-docs-description': [
'error',
{ pattern: '^(Enforce|Ensure|Prefer|Forbid).+\\.$' },
],
'eslint-plugin/require-meta-schema': 'error',
'eslint-plugin/require-meta-type': 'error',
// dog fooding
'import-x/no-extraneous-dependencies': [
'error',
{
devDependencies: ['test/**'],
optionalDependencies: false,
peerDependencies: true,
bundledDependencies: false,
},
],
'import-x/unambiguous': 'off',
},
settings: {
'import-x/resolver': {
node: {
paths: ['src'],
},
},
},
overrides: [
{
files: 'test/**',
env: {
jest: true,
},
rules: {
'import-x/default': 0,
},
},
],
}