This repository has been archived by the owner on Apr 17, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc
78 lines (78 loc) · 1.99 KB
/
.eslintrc
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
{
"extends": [
"airbnb",
"plugin:css-modules/recommended",
"prettier",
"plugin:react-hooks/recommended"
],
"env": {
"browser": true,
"node": true
},
"globals": {
"document": true,
"window": true,
"module": true,
"CMS_URL": true,
"ORIGIN": true
},
"parser": "@babel/eslint-parser",
"parserOptions": {
"ecmaVersion": 6,
"sourceType": "module",
"ecmaFeatures": {
"jsx": true
}
},
"plugins": ["css-modules", "prettier"],
"rules": {
"react/prop-types": [0],
"css-modules/no-unused-class": [2, { "camelCase": true }],
"css-modules/no-undef-class": [2, { "camelCase": true }],
// https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-extraneous-dependencies.md
"import/no-extraneous-dependencies": ["error", { "packageDir": "." }],
// https://eslint.org/docs/rules/no-console
"no-console": [
"error",
{
"allow": ["warn", "error", "info"]
}
],
// http://eslint.org/docs/rules/prefer-destructuring
"prefer-destructuring": [
"error",
{
"VariableDeclarator": {
"array": false,
"object": true
},
"AssignmentExpression": {
"array": false,
"object": false
}
},
{
"enforceForRenamedProperties": false
}
],
// https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/anchor-is-valid.md
"jsx-a11y/anchor-is-valid": [
"error",
{
"components": ["Link"],
"specialLink": ["to"],
"aspects": ["noHref", "invalidHref", "preferButton"]
}
],
// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-filename-extension.md
"react/jsx-filename-extension": [
"error",
{ "extensions": [".js", ".jsx"] }
],
"prettier/prettier": "error",
"no-param-reassign": [
"error",
{ "props": true, "ignorePropertyModificationsFor": ["state"] }
]
}
}