generated from tchryssos/next-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc
104 lines (98 loc) · 2.86 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
{
"parser": "@typescript-eslint/parser",
"env": {
"browser": true,
"node": true,
"es6": true
},
"globals": {
"React": true
},
"plugins": ["@emotion", "@typescript-eslint", "simple-import-sort"],
"extends": [
"eslint:recommended",
"airbnb",
"plugin:@typescript-eslint/recommended",
"next"
],
"root": true,
"rules": {
// eslint
"max-len": "off",
"one-var": "off",
"no-console": ["error", { "allow": ["warn", "error"] }],
"no-multiple-empty-lines": ["error", { "max": 2 }],
"no-prototype-builtins": "off",
"class-methods-use-this": "warn",
"padded-blocks": "off",
"object-curly-newline": "off",
"no-confusing-arrow": "off",
"implicit-arrow-linebreak": "off",
"operator-linebreak": "off",
"semi": "off",
"indent": "off",
"comma-dangle": "off",
"function-paren-newline": "off",
"no-shadow": "off", // ts-rule below
"prefer-arrow-callback": ["warn", { "allowNamedFunctions": true }],
// import
"import/no-named-as-default": "off",
"import/extensions": "off",
"import/prefer-default-export": "off",
"import/no-unresolved": "off",
"import/no-anonymous-default-export": "error",
"import/named": "off",
"simple-import-sort/imports": "warn",
"simple-import-sort/exports": "warn",
"import/no-default-export": "warn",
// jsx-a11y
"jsx-a11y/href-no-hash": "off",
"jsx-a11y/label-has-for": "off",
"jsx-a11y/no-static-element-interactions": "off",
// react
"react/jsx-indent": ["warn", 2],
"react/jsx-indent-props": ["warn", 2],
"react/jsx-filename-extension": ["error", { "extensions": [".tsx"] }],
"react/jsx-no-bind": "warn",
"react/require-default-props": "off",
"react/prop-types": "off",
"react/jsx-curly-newline": "off",
"react/button-has-type": "error",
"react/jsx-key": "warn",
"react/prefer-stateless-function": "warn",
"react/destructuring-assignment": ["warn", "always"],
"react/jsx-sort-props": [
"warn",
{
"callbacksLast": true
}
],
"react/no-deprecated": "error",
"react/no-typos": "error",
"react/self-closing-comp": "warn",
"react/no-access-state-in-setstate": "error",
"react/jsx-one-expression-per-line": "off",
"react/function-component-definition": "warn",
"react/jsx-no-useless-fragment": "off",
"react/jsx-props-no-spreading": "off",
// Typescript
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/no-empty-interface": "off",
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/no-shadow": "error"
},
"parserOptions": {
"ecmaFeatures": {
"jsx": true,
"modules": true
}
},
"settings": {
"import/resolver": {
"node": {
"paths": ["src"],
"extensions": [".ts", ".tsx", ".d.ts"]
}
}
}
}