-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy patheslint.config.js
44 lines (43 loc) · 1.2 KB
/
eslint.config.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
const typescript = require("@typescript-eslint/eslint-plugin");
const typescriptParser = require("@typescript-eslint/parser");
module.exports = [
{
files: ["**/*.ts"],
ignores: ["src/main/scripts/test.ts"],
languageOptions: {
parser: typescriptParser,
parserOptions: {
ecmaVersion: 2020,
sourceType: "module",
},
},
plugins: {
"@typescript-eslint": typescript,
},
rules: {
...typescript.configs.recommended.rules,
"no-unused-expressions": "off",
"no-prototype-builtins": "error",
"@typescript-eslint/no-duplicate-enum-values": "warn",
"@typescript-eslint/no-var-requires": "warn",
"@typescript-eslint/no-explicit-any": "warn",
"@typescript-eslint/no-unused-expressions": [
"error",
{
allowShortCircuit: true,
allowTernary: true,
},
],
"no-dupe-class-members": "off",
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": [
"error",
{ ignoreRestSiblings: true },
],
indent: ["off"],
semi: ["error", "always"],
"new-cap": ["off"],
"comma-dangle": ["warn", "always-multiline"],
},
},
];