-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.json
101 lines (97 loc) · 3.08 KB
/
.eslintrc.json
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
{
"env": {
"browser": true,
"commonjs": true,
"es2021": true,
"jest": true,
"jasmine": true
},
"extends": [
"eslint:recommended",
"airbnb-base",
"plugin:import/errors",
"plugin:import/warnings",
"plugin:import/typescript",
"prettier", // make sure this is second to last
"plugin:prettier/recommended" // Enables eslint-plugin-prettier and eslint-config-prettier. This will display prettier errors as ESLint errors. Make sure this is always the last configuration in the extends array.
],
"plugins": ["promise", "prettier"],
"ignorePatterns": ["**/build/**"],
"parserOptions": {
"ecmaVersion": 2020,
"sourceType": "module"
},
"settings": {
"import/resolver": {
"node": {
"extensions": [".js", ".jsx", ".ts", ".tsx"]
},
"typescript": {}
}
},
"rules": {
"prettier/prettier": ["error", {}, { "editorconfig": true, "usePrettierrc": true }],
"import/no-extraneous-dependencies": [
"error",
{ "devDependencies": ["**/test/**", "**/*.test.js", "**/*.spec.js", "**/.devsupport/**"] }
],
"import/extensions": [
"warn",
"ignorePackages",
{
"js": "never",
"jsx": "never",
"ts": "never",
"tsx": "never"
}
]
},
"overrides": [
{
"files": ["**/*.ts", "**/*.tsx"],
"plugins": ["@typescript-eslint", "unused-imports", "prettier"],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:import/typescript",
"prettier", // make sure this is second to last
"plugin:prettier/recommended" // Enables eslint-plugin-prettier and eslint-config-prettier. This will display prettier errors as ESLint errors. Make sure this is always the last configuration in the extends array.
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": ["./tsconfig.test.json"]
},
"rules": {
"prettier/prettier": [
"error",
{ "printWidth": 115 },
{ "editorconfig": true, "usePrettierrc": true }
],
"@typescript-eslint/no-explicit-any": 0,
"no-console": "off", // since our test app is just console
"no-unused-vars": "off", // use the other below
"unused-imports/no-unused-imports": "error",
"unused-imports/no-unused-vars": [
"warn",
{
"vars": "all",
"varsIgnorePattern": "^_",
"args": "after-used",
"argsIgnorePattern": "^_"
}
],
"no-shadow": "off",
"@typescript-eslint/no-shadow": "error",
"no-useless-constructor": "off",
"@typescript-eslint/no-useless-constructor": ["error"],
"no-empty-function": "off",
"@typescript-eslint/no-empty-function": ["error"],
"import/prefer-default-export": "off", // this doesn't work nice with js/ts mix
"import/no-extraneous-dependencies": [
"error",
{ "devDependencies": ["**/test/**", "**/*.test.ts", "**/*.spec.ts"] }
]
}
}
]
}