-
Notifications
You must be signed in to change notification settings - Fork 2
/
eslint.config.cjs
61 lines (59 loc) · 1.59 KB
/
eslint.config.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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
const js = require("@eslint/js");
const typescript = require("@typescript-eslint/eslint-plugin");
const tsParser = require("@typescript-eslint/parser");
module.exports = [
js.configs.recommended,
{
ignores: ["dist/*.js", "*.md", "test/fixture-projects/**/*.*"],
files: ["**/*.ts", "**/*.tsx"],
languageOptions: {
parser: tsParser,
ecmaVersion: "latest",
},
plugins: {
"@typescript-eslint": typescript,
},
rules: {
"arrow-parens": "off",
"no-debugger": "warn",
"no-undef": "off",
"no-unused-var": "off",
"no-unused-vars": "off",
"no-warning-comments": [
"warn",
{
terms: ["hardcoded"],
location: "anywhere",
},
],
"no-return-await": "warn",
"object-curly-spacing": ["error", "always"],
"no-var": "error",
"comma-dangle": ["warn", "always-multiline"],
"linebreak-style": ["error", "unix"],
"generator-star-spacing": "off",
"no-tabs": "error",
"max-len": [
"warn",
{
code: 120,
comments: 120,
ignoreUrls: true,
ignoreStrings: true,
ignoreTemplateLiterals: true,
ignoreRegExpLiterals: true,
},
],
"no-console": [
"warn",
{
allow: ["warn", "error"],
},
],
"no-multiple-empty-lines": ["error", { max: 1, maxEOF: 0, maxBOF: 0 }],
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-unused-expressions": "off",
},
},
];