-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy path.eslintrc.js
84 lines (79 loc) · 2.11 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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
module.exports = {
extends: [
"@redhat-actions/eslint-config",
"plugin:react/recommended",
"plugin:react-hooks/recommended",
"plugin:import/recommended",
"plugin:import/typescript",
],
plugins: [
"react", "react-hooks", "import",
],
ignorePatterns: [
// "webpack.config*.[tj]s",
"build/",
],
settings: {
react: {
version: "detect"
}
},
parserOptions: {
ecmaVersion: 14,
emcaFeatures: {
jsx: true,
},
sourceType: "module",
project: [
"./tsconfig.json",
"./src/server/tsconfig.json",
"./webpack.config*.[tj]s"
],
},
rules: {
"@typescript-eslint/no-explicit-any": 0,
"class-methods-use-this": 0,
"no-use-before-define": 0,
"@typescript-eslint/no-unused-vars": [ 2, { argsIgnorePattern: "(^_|req|res|next)" } ],
"@typescript-eslint/member-delimiter-style": [ 2, {
multiline: {
delimiter: "comma",
},
singleline: {
delimiter: "comma",
},
}
],
"indent": 0,
"@typescript-eslint/indent": [ 2, 2 ],
"max-len": [ 2, 120, 2, { ignoreUrls: true } ],
"camelcase": [ 0 ],
"@typescript-eslint/member-ordering": [ 2 ],
// this is to work with @typescript-eslint/floating-promises void behaviour
"no-void": [ 2, { allowAsStatement: true }],
// doesn't understand ts paths
"import/no-unresolved": 0,
"import/no-cycle": 0,
},
overrides: [{
files: [ "*.tsx" ],
rules: {
"no-console": 0,
"no-nested-ternary": 0,
"max-len": [ 2, 150, 2, { ignoreUrls: true } ],
"operator-linebreak": [ 0 ],
"import/extensions": [ 2, { css: "always", json: "always", scss: "always" }],
"@typescript-eslint/explicit-function-return-type": [ 0 ],
"@typescript-eslint/explicit-module-boundary-types": [ 0 ],
"@typescript-eslint/ban-types": [ 0 ],
"react/react-in-jsx-scope": [ 0 ],
},
}, {
files: [ "webpack.config.*.*s" ],
rules: {
"import/no-extraneous-dependencies": 0,
"@typescript-eslint/explicit-module-boundary-types": 0,
"no-console": 0
}
}]
}