-
Notifications
You must be signed in to change notification settings - Fork 83
/
Copy path.eslintrc.js
69 lines (69 loc) · 1.98 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
60
61
62
63
64
65
66
67
68
69
/** @type {import("eslint").Linter.Config} */
module.exports = {
parser: "@typescript-eslint/parser",
env: {
browser: true,
node: true
},
plugins: [
"@typescript-eslint",
"node",
"import",
"react",
"react-hooks"
],
settings: {
react: {
version: "17.0.2" // stable Discord
}
},
extends: [
"eslint:recommended",
"plugin:react/recommended",
"google"
],
rules: {
indent: "off",
semi: "off",
quotes: "off",
"comma-dangle": ["error", "never"],
"quote-props": ["error", "as-needed"],
"operator-linebreak": ["error", "before"],
"no-multiple-empty-lines": ["error", {max: 1}],
"spaced-comment": ["error", "always", {
block: {
balanced: true
}
}],
"linebreak-style": "off",
"max-len": "off",
"require-jsdoc": "off",
"valid-jsdoc": "off",
"react/display-name": "off",
"new-cap": "off"
},
overrides: [{
files: ["*.ts", "*.tsx"],
extends: [
"plugin:@typescript-eslint/recommended"
],
parserOptions: {
project: ["./tsconfig.json"]
},
rules: {
"@typescript-eslint/indent": ["error", 4],
"@typescript-eslint/semi": "error",
"@typescript-eslint/quotes": ["error", "double"],
"@typescript-eslint/member-delimiter-style": ["error"],
"@typescript-eslint/no-unused-vars": ["error", {
argsIgnorePattern: "^_",
varsIgnorePattern: "^_",
caughtErrorsIgnorePattern: "^_"
}],
"@typescript-eslint/prefer-optional-chain": "error",
"@typescript-eslint/no-empty-function": "off",
"@typescript-eslint/explicit-module-boundary-types": "error",
"@typescript-eslint/no-explicit-any": "off"
}
}]
};