-
Notifications
You must be signed in to change notification settings - Fork 9
/
.eslintrc.js
59 lines (59 loc) · 1.53 KB
/
.eslintrc.js
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
module.exports = {
env: {
browser: true,
es2021: true,
},
parser: "@typescript-eslint/parser",
extends: ["standard-with-typescript", "plugin:react/recommended"],
ignorePatterns: ["**/*.slpk"],
overrides: [
{
env: {
node: true,
},
files: [".eslintrc.{js,cjs}", "src/**/*.ts", "src/**/*.tsx"],
parserOptions: {
sourceType: "script",
},
},
],
parserOptions: {
ecmaVersion: "latest",
sourceType: "module",
project: ["./tsconfig.eslint.json"],
},
plugins: ["react"],
rules: {
"@typescript-eslint/semi": ["error", "always"],
"@typescript-eslint/strict-boolean-expressions": "off",
"@typescript-eslint/no-unsafe-argument": "warn",
"@typescript-eslint/quotes": ["error", "double"],
"@typescript-eslint/explicit-function-return-type": "warn",
"react/react-in-jsx-scope": "off",
"@typescript-eslint/comma-dangle": [
"error",
{
arrays: "always-multiline",
objects: "always-multiline",
imports: "always-multiline",
exports: "always-multiline",
enums: "always-multiline",
functions: "never",
},
],
"@typescript-eslint/member-delimiter-style": [
"error",
{
multiline: { delimiter: "semi", requireLast: true },
singleline: { delimiter: "semi", requireLast: false },
multilineDetection: "brackets",
},
],
"@typescript-eslint/space-before-function-paren": "off",
},
settings: {
react: {
version: "18.2",
},
},
};