-
Notifications
You must be signed in to change notification settings - Fork 72
/
Copy path.eslintrc.cjs
41 lines (38 loc) · 1.19 KB
/
.eslintrc.cjs
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
module.exports = {
extends: [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
// TODO
// "plugin:@typescript-eslint/recommended-type-checked",
],
plugins: ["@typescript-eslint", "@stylistic/js", "react-refresh"],
parser: "@typescript-eslint/parser",
rules: {
eqeqeq: "error",
"@typescript-eslint/no-namespace": "off",
"@typescript-eslint/no-shadow": "error",
"react-refresh/only-export-components": "warn",
// TODO:
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-unused-vars": "off",
"@typescript-eslint/no-unsafe-assignment": "off",
"@typescript-eslint/no-unsafe-argument": "off",
"@typescript-eslint/no-floating-promises": "off",
// https://eslint.style/rules/js/lines-between-class-members
"@stylistic/js/lines-between-class-members": [
"error",
{
enforce: [
{ blankLine: "always", prev: "method", next: "method" },
{ blankLine: "always", prev: "field", next: "method" },
{ blankLine: "always", prev: "method", next: "field" },
],
},
],
},
parserOptions: {
project: true,
tsconfigRootDir: __dirname,
},
root: true,
};