-
Notifications
You must be signed in to change notification settings - Fork 3
/
.eslintrc
94 lines (86 loc) · 2.2 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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
{
"root": true,
"plugins": ["formatjs", "react-hooks"],
"extends": [ "next", "airbnb", "prettier", "plugin:prettier/recommended"],
"parserOptions": {
"project": "./tsconfig.json",
"requireConfigFile": false,
"ecmaVersion": 6,
"ecmaFeatures": {
"jsx": true
}
},
"env": {
"browser": true,
"node": true,
"es6": true,
"mocha": true
},
"rules": {
"react/react-in-jsx-scope": "off",
// allow jsx syntax in js files (for next.js project)
"react/no-unstable-nested-components": [
"off",
{ "allowAsProps": true }
],
"react-hooks/rules-of-hooks": "error", // Checks rules of Hooks
"react-hooks/exhaustive-deps": "warn", // Checks effect dependencies
"formatjs/no-offset": "error",
"formatjs/enforce-default-message": "error",
"formatjs/no-emoji": "error",
"jsx-a11y/label-has-associated-control": [0],
"import/no-extraneous-dependencies": ["error", {"devDependencies": true}],
"react/prop-types": [0],
"react/function-component-definition": [
2,
{
"namedComponents": "arrow-function",
"unnamedComponents": "arrow-function"
}
],
"react/jsx-props-no-spreading": [0],
"no-underscore-dangle": [
"error",
{ "allow": ["_id", "__typename", "__mutationName"] }
],
"prettier/prettier": [
"error",
{
"printWidth": 80,
"semi": true,
"trailingComma": "all",
"singleQuote": true,
"proseWrap": "always"
}
],
"jsx-a11y/anchor-is-valid": "off",
"jsx-a11y/anchor-has-content": "off",
"import/no-unresolved": [0],
"import/extensions": [
"error",
"ignorePackages",
{
"js": "never",
"jsx": "never",
"ts": "never",
"tsx": "never"
}
],
"react/jsx-filename-extension": [
1,
{ "extensions": [".js", ".jsx", ".ts", ".tsx"] }
],
"jsx-a11y/no-static-element-interactions": [0],
"jsx-a11y/click-events-have-key-events": [0]
},
"settings": {
"import/resolver": {
"node": {
"extensions": [".js", ".jsx", ".ts", ".tsx"]
}
},
"react": {
"version": "detect"
}
}
}