-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.yml
148 lines (147 loc) · 4.26 KB
/
.eslintrc.yml
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
144
145
146
147
148
extends:
- eslint:recommended
- plugin:@typescript-eslint/strict-type-checked
- plugin:@typescript-eslint/stylistic-type-checked
- plugin:react/recommended
- plugin:react/jsx-runtime
- plugin:react-hooks/recommended
- plugin:jsx-a11y/recommended
- prettier
- plugin:deprecation/recommended
parser: "@typescript-eslint/parser"
parserOptions:
ecmaVersion: 2018
sourceType: module
ecmaFeatures:
jsx: true
warnOnUnsupportedTypeScriptVersion: true
project: "./tsconfig.json"
projectService: true
tsconfigRootDir: "."
env:
browser: true
plugins:
- testing-library
- "@typescript-eslint"
- react
- react-hooks
- jsx-a11y
- "check-file"
ignorePatterns:
- build/**/*
rules:
# Eslint Possible Problems
array-callback-return: ["error", { allowImplicit: true }]
no-await-in-loop: error
no-constant-binary-expression: error
no-constructor-return: error
no-duplicate-imports: off # Creates issues with typescript type imports
no-new-native-nonconstructor: error
no-promise-executor-return: error
no-self-compare: error
no-template-curly-in-string: error
no-unmodified-loop-condition: error
no-unreachable-loop: error
no-unused-private-class-members: error
no-use-before-define: off # Checked by typescript-eslint
require-atomic-updates: error
# Eslint Suggestions
arrow-body-style: ["error", "as-needed"]
block-scoped-var: error
camelcase: ["error", { properties: "never", ignoreDestructuring: false }]
consistent-return: off # Checked by typescript-eslint
consistent-this: error
dot-notation: ["error", { allowKeywords: true }]
eqeqeq: error
guard-for-in: error
init-declarations: error # Could cause problems with TS
logical-assignment-operators: error
new-cap: error
no-alert: warn
no-array-constructor: error
no-bitwise: warn
no-caller: error
no-console: warn
no-div-regex: error
no-else-return: error
no-empty-static-block: error
no-eq-null: error
no-eval: error
no-extend-native: error
no-extra-bind: error
no-extra-label: error
no-implicit-coercion: ["error", { allow: ["!!"] }]
no-implicit-globals: error
no-implied-eval: error
no-invalid-this: off # Checked by typescript-eslint
no-iterator: error
no-label-var: error
no-labels: error
no-lone-blocks: error
no-lonely-if: error
no-loop-func: off # Checked by typescript-eslint
no-multi-assign: error
no-new: error
no-new-func: error
no-new-wrappers: error
no-object-constructor: error
no-param-reassign: error
no-proto: error
no-return-assign: error
no-script-url: error
no-sequences: error
no-shadow: off # Checked by typescript-eslint
no-throw-literal: error
no-unneeded-ternary: error
no-unused-expressions: 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
no-var: error
no-void: error
no-with: error
object-shorthand: error
prefer-arrow-callback: error
prefer-const: error
prefer-exponentiation-operator: error
prefer-numeric-literals: error
prefer-promise-reject-errors: error
prefer-regex-literals: error
prefer-template: error
radix: error
require-await: error
require-yield: error
yoda: error
# --------- Typescript Eslint ----------
"@typescript-eslint/consistent-return": error
"@typescript-eslint/consistent-type-exports": error
"@typescript-eslint/consistent-type-imports": error
"@typescript-eslint/default-param-last": error
"@typescript-eslint/member-ordering": error
"@typescript-eslint/no-confusing-void-expression": error
"@typescript-eslint/no-empty-interface": error
"@typescript-eslint/no-invalid-this": error
"@typescript-eslint/no-loop-func": error
"@typescript-eslint/no-shadow": error
"@typescript-eslint/no-use-before-define": error
"@typescript-eslint/no-useless-empty-export": error
"@typescript-eslint/no-var-requires": error
# --------- Other Plugins ----------
check-file/filename-naming-convention:
- error
- "**/*.{jsx,tsx,ts,js}": "KEBAB_CASE"
- ignoreMiddleExtensions: true
check-file/folder-naming-convention:
- error
- "src/**/": "KEBAB_CASE"
react/prop-types: off
# Allows for absolute imports
settings:
react:
version: "detect"
import/resolver:
node:
paths: ["src"]