-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.eslintrc.json
108 lines (107 loc) · 2.89 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
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
{
"root": true,
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": "./tsconfig.json",
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": 12,
"sourceType": "module"
},
"env": {
"browser": true,
"es2021": true,
"jest": true
},
"globals": {
"Atomics": "readonly",
"SharedArrayBuffer": "readonly"
},
"plugins": [
"react",
"import",
"prettier",
"simple-import-sort",
"@typescript-eslint",
"@next/eslint-plugin-next"
],
"extends": [
"eslint:recommended",
"airbnb",
"airbnb-typescript",
"airbnb/hooks",
"plugin:react/recommended",
"plugin:import/recommended",
"plugin:import/typescript",
"plugin:@next/next/recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"prettier"
],
"rules": {
"simple-import-sort/imports": "error",
"simple-import-sort/exports": "error",
"react/react-in-jsx-scope": "error",
"import/first": "error",
"import/newline-after-import": "error",
"import/no-duplicates": "error",
"import/no-unresolved": "error",
"import/named": "error",
"react/jsx-filename-extension": [
1,
{ "extensions": [".js", ".jsx", ".tsx"] }
],
"react/state-in-constructor": "off",
"react/prop-types": "off",
"react/no-access-state-in-setstate": "error",
"react/no-danger": "error",
"react/no-did-mount-set-state": "error",
"react/no-did-update-set-state": "error",
"react/no-will-update-set-state": "error",
"react/no-redundant-should-component-update": "error",
"react/no-this-in-sfc": "error",
"react/no-typos": "error",
"react/no-unused-state": "error",
"react/jsx-no-bind": "error",
"no-useless-call": "error",
"no-useless-computed-key": "error",
"no-useless-concat": "error",
"no-useless-constructor": "error",
"no-useless-rename": "error",
"no-useless-return": "error",
"react/jsx-props-no-spreading": "off",
// overriding recommended rules
"react/require-default-props": "off",
"arrow-body-style": "off",
"arrow-parens": "off",
"no-constant-condition": ["error", { "checkLoops": false }],
"no-console": ["error", { "allow": ["log", "warn", "error"] }],
// "no-unused-vars": ["error", { "argsIgnorePattern": "^_" }],
"prettier/prettier": "error",
"no-underscore-dangle": ["error"]
},
"settings": {
"react": {
"version": "detect"
},
"import/parsers": {
"@typescript-eslint/parser": [".ts", ".tsx"]
},
"import/resolver": {
"node": {
"paths": ["."]
},
"alias": {
"map": [
["@/core", "./core"],
["@/types", "./types"],
["@/store", "./store"],
["@/components", "./components"]
// Add more here
],
"extensions": [".js", ".jsx", ".ts", ".tsx"]
}
}
}
}