forked from dappcenter/bepswap-web-ui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc
143 lines (143 loc) · 3.98 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
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
131
132
133
134
135
136
137
138
139
140
141
142
143
// Severity codes: 0 = off, 1 = warn, 2 = error
{
"parser": "@typescript-eslint/parser",
"extends": [
"airbnb",
"plugin:css-modules/recommended",
"plugin:@typescript-eslint/recommended",
"prettier/@typescript-eslint"
],
"env": {
"browser": true,
"jest": true
},
"globals": {
"DEV": true,
"PROD": true,
"DEBUG": true,
"COVERAGE": true,
"BASENAME": true,
"$COMMIT_HASH": true
},
"settings": {
"import/resolver": {
"node": {
"moduleDirectory": ["node_modules", "src"],
"extensions": [".js", ".jsx", ".ts", ".tsx"]
}
}
},
"plugins": ["react", "react-hooks", "import", "css-modules"],
"rules": {
"camelcase": 0,
"consistent-return": 0,
"function-paren-newline": 0,
"func-names": 0,
"no-console": 0,
"prefer-template": 0,
"prefer-destructuring": 0,
"object-curly-newline": 0,
"no-else-return": 0,
"new-cap": 0,
"key-spacing": 0,
"indent": 0,
"no-multi-spaces": 0,
"no-use-before-define": 0,
"no-debugger": 0,
"no-continue": 0,
"quotes": [2, "single"],
"strict": [2, "never"],
"template-curly-spacing": [0, "always"],
"comma-dangle": [2, "always-multiline"],
"max-len": 0,
"no-shadow": 0,
"arrow-body-style": 0,
"arrow-parens": [2, "as-needed"],
"global-require": 0,
"generator-star-spacing": 0,
"no-unused-expressions": 0,
"operator-linebreak": 0,
"no-plusplus": 0,
"no-confusing-arrow": 0,
"implicit-arrow-linebreak": 0,
"linebreak-style": [0, "error", "windows"],
"no-unused-vars": [
2,
{
"ignoreRestSiblings": true,
"varsIgnorePattern": "^_",
"argsIgnorePattern": "^_"
}
],
"no-constant-condition": 0,
"import/no-dynamic-require": 0,
"import/no-extraneous-dependencies": 0,
"import/prefer-default-export": 0,
"import/no-named-as-default": 0,
"import/no-unresolved": ["error", { "caseSensitive": false }],
"react/destructuring-assignment": 0,
"react/require-default-props": 0,
"react/prop-types": ["off", { "extensions": [".js", ".jsx"] }],
"react/forbid-prop-types": 0,
"react/no-unused-prop-types": 0,
"react/no-did-update-set-state": 0,
"react/no-typos": 0,
"react/jsx-one-expression-per-line": 0,
"react/default-props-match-prop-types": 0,
"react/prefer-stateless-function": 0,
"react/no-array-index-key": 0,
"react/jsx-uses-react": 2,
"react/jsx-uses-vars": 2,
"react/jsx-no-bind": 0,
"react/react-in-jsx-scope": 2,
"react/jsx-filename-extension": [
2,
{ "extensions": [".js", ".jsx", ".ts", ".tsx"] }
],
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "warn",
"react/jsx-props-no-spreading": [
"error",
{
"custom": "ignore"
}
],
"react/static-property-placement": "off", // we do need static props in TS based class components
"jsx-a11y/anchor-is-valid": [
"error",
{
"components": ["Link", "a"],
"specialLink": ["hrefLeft", "hrefRight", "to", "onClick"],
"aspects": ["preferButton"]
}
],
"jsx-a11y/no-static-element-interactions": 0,
"jsx-a11y/click-events-have-key-events": 0,
"jsx-a11y/no-noninteractive-element-interactions": 0,
"jsx-a11y/tabindex-no-positive": 0,
"@typescript-eslint/ban-ts-ignore": "off",
"@typescript-eslint/camelcase": "off",
"@typescript-eslint/no-empty-function": "off",
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/no-use-before-define": "off",
"@typescript-eslint/no-unused-vars": [
"error",
{
"ignoreRestSiblings": true,
"varsIgnorePattern": "^_",
"argsIgnorePattern": "^_"
}
],
"@typescript-eslint/no-var-requires": "off",
"import/extensions": [
"error",
"ignorePackages",
{
"js": "never",
"jsx": "never",
"ts": "never",
"tsx": "never"
}
]
}
}