-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.eslintrc.json
60 lines (60 loc) · 1.56 KB
/
.eslintrc.json
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
{
"env": {
"browser": true,
"es2021": true
},
"ignorePatterns": ["**.*.js"],
"extends": [
"plugin:react/recommended",
"airbnb",
"airbnb/hooks",
"airbnb-typescript",
"plugin:import/recommended",
"plugin:import/typescript",
// Prettier should be at last to avoid formatting and linting conflicts
"prettier"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": "./tsconfig.json",
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": "latest",
"sourceType": "module"
},
"plugins": ["react", "@typescript-eslint", "simple-import-sort"],
"rules": {
// Required for auto-sorting imports
"simple-import-sort/imports": "error",
"simple-import-sort/exports": "error",
// Can be safely turned off after React v17+
"react/react-in-jsx-scope": "off",
// Industry standards
"arrow-body-style": "off",
"react/jsx-props-no-spreading": "off",
"import/prefer-default-export": "off",
"react/function-component-definition": [
2,
{
"namedComponents": "arrow-function",
"unnamedComponents": "arrow-function"
}
],
"no-nested-ternary": "off",
"react/require-default-props": "off",
"react/no-unescaped-entities": "warn",
"react/no-array-index-key": "warn",
"no-underscore-dangle": "off",
"react/prop-types": "off",
// Firn specific rules, mainly for crypto operations
"no-bitwise": "off",
"no-plusplus": "off"
},
"settings": {
"import/resolver": {
"typescript": true,
"node": true
}
}
}