-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy path.eslintrc.json
94 lines (93 loc) · 2.85 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
{
"env": {
"browser": true,
"es2021": true,
"node": true
},
"extends": [
"plugin:react/recommended",
"eslint:recommended",
"prettier",
"plugin:prettier/recommended",
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:json/recommended",
"plugin:@next/next/recommended",
"next/core-web-vitals"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaFeatures": {
"jsx": true,
"modules": true
},
"ecmaVersion": 12,
"sourceType": "module"
},
"plugins": ["react", "@typescript-eslint", "prettier", "better-styled-components", "react-hooks"],
"rules": {
"prettier/prettier": "error",
"react/prefer-stateless-function": 0,
"linebreak-style": 0,
"jsx-a11y/heading-has-content": 0,
"jsx-a11y/href-no-hash": 0,
"jsx-a11y/anchor-is-valid": 0,
"no-underscore-dangle": 0,
"react/no-find-dom-node": 0,
"react/prop-types": 0,
"react/no-children-prop": ["error", { "allowFunctions": true }],
"no-nested-ternary": 0,
"react/no-unescaped-entities": 0,
"no-console": ["warn", { "allow": ["warn", "error", "info"] }],
"no-warning-comments": [
"error",
{
"terms": ["FIXME"]
}
],
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/ban-types": "warn",
"no-empty-function": "off",
"@typescript-eslint/no-empty-function": ["error", { "allow": [] }],
"no-unused-vars": "off",
"@typescript-eslint/no-namespace": "warn",
"@typescript-eslint/no-unused-vars": [
"error",
{
"vars": "all",
"args": "after-used",
"ignoreRestSiblings": true,
"caughtErrorsIgnorePattern": "^ignore"
}
],
"@typescript-eslint/consistent-type-imports": ["error", { "fixStyle": "inline-type-imports" }],
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "off",
"react/jsx-uses-react": "off",
"react/react-in-jsx-scope": "off",
"no-irregular-whitespace": "off",
"@next/next/no-img-element": "off",
// turn on errors for missing imports
"import/no-unresolved": "error",
"import/order": [
"error",
{
"groups": [
"builtin", // Built-in imports (come from NodeJS native) go first
"external", // <- External imports
"internal", // <- Absolute imports
["sibling", "parent"], // <- Relative imports, the sibling and parent types can be mingled together
"index", // <- index imports
"unknown" // <- unknown imports always last
],
"newlines-between": "always",
"alphabetize": {
"order": "asc",
"caseInsensitive": true
}
}
],
"json/*": ["error", { "allowComments": true }]
}
}