-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
56 lines (55 loc) · 1.64 KB
/
index.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
module.exports = {
env: {
browser: true,
node: true,
es6: true,
jest: true,
},
parser: "@babel/eslint-parser",
extends: ["plugin:unicorn/recommended"],
plugins: ["import", "react", "react-hooks", "prettier", "unicorn"],
rules: {
"no-dupe-keys": "error",
"no-undef": "error",
"no-unreachable": "error",
"no-unused-vars": [
"error",
{
argsIgnorePattern: "^_",
varsIgnorePattern: "^_",
ignoreRestSiblings: true,
},
],
"no-useless-constructor": "error",
"no-var": "error",
"no-duplicate-imports": "error",
"no-duplicate-case": "error",
"import/no-unresolved": "error",
"import/default": "error",
"react/jsx-no-undef": "error",
"react/jsx-uses-vars": "error",
"react/jsx-uses-react": "error",
"react/react-in-jsx-scope": "error",
"react/no-string-refs": "error",
"react/prop-types": ["error", { skipUndeclared: true }],
"react/forbid-prop-types": "error",
"react/prefer-stateless-function": "error",
"react-hooks/rules-of-hooks": "error", // Checks rules of Hooks
"react-hooks/exhaustive-deps": "warn", // Checks effect dependencies
"prettier/prettier": "error",
"no-console": ["error", { allow: ["warn", "error"] }],
"no-debugger": "error",
"unicorn/filename-case": "off",
"unicorn/prevent-abbreviations": "off",
"unicorn/import-index": "off",
"import/no-anonymous-default-export": [
"error",
{
allowArrowFunction: false,
allowAnonymousClass: false,
allowAnonymousFunction: false,
},
],
},
};
// Globals added dynamically or add them in .eslintignore