This repository has been archived by the owner on Sep 11, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy path.eslintrc.yml
115 lines (104 loc) · 4.03 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
env:
browser: true
es2022: true
plugins:
- "@typescript-eslint"
- promise
- regexp
- react
- react-hooks
extends:
- eslint:recommended
- plugin:import/recommended
- plugin:import/typescript
- plugin:import/errors
- plugin:import/warnings
- plugin:@typescript-eslint/recommended
- plugin:@typescript-eslint/recommended-requiring-type-checking
- plugin:@typescript-eslint/strict
- plugin:promise/recommended
- plugin:regexp/all
- plugin:react/recommended
- plugin:react/jsx-runtime
- plugin:react-hooks/recommended
parser: "@typescript-eslint/parser"
parserOptions:
ecmaFeatures:
jsx: true
ecmaVersion: latest
sourceType: module
project: ["./tsconfig.json"]
settings:
react:
version: detect
overrides:
- files: ["**/*.test.ts"]
plugins:
- vitest
extends:
- plugin:vitest/all
rules:
vitest/no-hooks: off
vitest/no-conditional-in-test: off
vitest/no-conditional-expect: off
rules:
quotes: ["warn", "double"]
semi: ["warn", "never"]
max-len: off
"@typescript-eslint/no-unused-vars": ["warn", { "args": "none", "varsIgnorePattern": "_.*" }]
max-classes-per-file: off
comma-dangle: off
no-multiple-empty-lines: off
nonblock-statement-body-position: off # allows for if without {}
curly: off
arrow-body-style: off
no-multi-spaces: ["error", { "ignoreEOLComments": true }]
"@typescript-eslint/no-non-null-assertion": off
import/extensions: off
no-debugger: off
react/jsx-one-expression-per-line: off
react/state-in-constructor: off
react/button-has-type: off # really dont think this is necessary
react/destructuring-assignment: off
react/jsx-filename-extension: ["error", { "extensions": [".ts", ".tsx"] }]
react/function-component-definition: ["error", { "namedComponents": "arrow-function" }]
react/require-default-props: off
react/jsx-closing-bracket-location: off
react/jsx-max-props-per-line: off
react/jsx-first-prop-new-line: off
react/jsx-props-no-spreading: off
react/prop-types: ["error", { skipUndeclared: true }]
react/jsx-no-useless-fragment: off
react/prefer-stateless-function: off
react-hooks/rules-of-hooks: "error"
"react-hooks/exhaustive-deps": "warn"
no-console: ["warn", { "allow": ["warn", "error"] }]
object-curly-newline: off
lines-between-class-members: ["error", "always", { "exceptAfterSingleLine": true }]
import/no-unresolved: off # because we use .js in the import statements
"@typescript-eslint/no-empty-function": off
import/newline-after-import: off
spaced-comment: off
padded-blocks: off
"import/no-extraneous-dependencies": ["error", { "devDependencies": true }]
"@typescript-eslint/ban-ts-comment": off
"@typescript-eslint/no-explicit-any": off
quote-props: off
"@typescript-eslint/consistent-type-definitions": off
"@typescript-eslint/prefer-string-starts-ends-with": off
"@typescript-eslint/no-floating-promises": ["error", { "ignoreVoid": true }] # need to handle these or it could bubble up
"newline-per-chained-call": off
"@typescript-eslint/explicit-member-accessibility": ["error"]
"@typescript-eslint/prefer-readonly": ["error"]
"@typescript-eslint/promise-function-async": ["error"]
"@typescript-eslint/no-unnecessary-type-assertion": "error"
"@typescript-eslint/no-misused-promises": ["error", { "checksVoidReturn": { "arguments": false } }]
promise/no-nesting: off
"no-restricted-globals": ["error",
{ name: "setInterval", message: "Avoid using regular timers, use promises that allow signals: https://github.com/sindresorhus/promise-fun" },
{ name: "setTimeout", message: "Avoid using regular timers, use promises that allow signals: https://github.com/sindresorhus/promise-fun" }
]
"no-restricted-properties": ["error",
{ object: 'window', property: "setInterval", message: "Avoid using regular timers, use promises that allow signals: https://github.com/sindresorhus/promise-fun" },
{ object: "window", property: "setTimeout", message: "Avoid using regular timers, use promises that allow signals: https://github.com/sindresorhus/promise-fun" }
]