forked from romeovs/lcov-reporter-action
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy path.eslintrc.js
130 lines (130 loc) · 4.09 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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
module.exports = {
extends: ["airbnb/base", "plugin:prettier/recommended"],
parser: "@babel/eslint-parser",
ignorePatterns: ["/dist/**"],
rules: {
"prettier/prettier": "error",
"arrow-body-style": ["error", "as-needed"],
complexity: ["error", 20],
"import/prefer-default-export": "off",
curly: "error",
"no-await-in-loop": "off",
"no-restricted-syntax": "off",
"default-case": "off",
eqeqeq: ["error", "always"],
"func-style": ["error", "expression"],
"func-names": ["error"],
"generator-star-spacing": ["error", { before: false, after: true }],
"jsx-quotes": ["error", "prefer-double"],
"max-depth": ["error", 10],
"newline-before-return": "error",
"no-alert": "error",
"no-confusing-arrow": ["error", { allowParens: false }],
"no-constant-condition": "error",
"no-console": "off",
"no-empty-function": "error",
"no-eq-null": "error",
"no-implicit-coercion": [
"error",
{ boolean: false, number: true, string: true, allow: [] },
],
"no-invalid-this": "error",
"no-magic-numbers": "off",
"no-restricted-imports": ["error", "lodash"],
"no-undefined": "error",
"no-underscore-dangle": ["error", { allow: ["__INIT_MATERIAL_UI__"] }],
"no-unmodified-loop-condition": "error",
"no-useless-call": "error",
"no-warning-comments": [
"warn",
{
terms: ["todo", "fixme"],
location: "anywhere",
},
],
"require-atomic-updates": "error",
"require-await": "error",
"require-unicode-regexp": "error",
"template-curly-spacing": ["error", "never"],
"import/default": "error",
"import/exports-last": "error",
"import/extensions": [
"error",
"always",
{
js: "never",
jsx: "never",
ts: "never",
tsx: "never",
json: "never",
},
],
"import/max-dependencies": ["error", { max: 20 }],
"import/no-unassigned-import": "error",
"import/no-unused-modules": [
"error",
{ missingExports: true, unusedExports: true },
],
"import/order": [
"error",
{
groups: [
"builtin",
"external",
"internal",
"parent",
"sibling",
"index",
],
"newlines-between": "never",
},
],
"filenames/match-exported": ["error", "kebab"],
"filenames/match-regex": ["error", "(^[a-z-]*[a-z]+$)|(.config$)"],
},
overrides: [
{
files: [
"jest.config.js",
"jest.setup.js",
"rollup.config.js",
".eslintrc.js",
],
rules: {
"filenames/match-exported": "off",
"filenames/match-regex": "off",
"import/no-unused-modules": "off",
"no-magic-numbers": "off",
},
},
{
files: ["*.test.js", "*.test.jsx"],
rules: {
"filenames/match-regex": "off",
"import/no-unused-modules": "off",
"no-process-env": "off",
"no-undefined": "off",
"no-magic-numbers": "off",
},
},
{
files: ["src/cli.js", "src/index.js"],
rules: {
"import/no-unused-modules": "off",
},
},
{
files: ["__mocks__/**/*"],
rules: {
"filenames/match-exported": "off",
"filenames/match-regex": "off",
"import/no-unused-modules": "off",
},
},
],
plugins: ["prettier", "import", "filenames"],
env: {
node: true,
jest: true,
},
};