-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheslint.config.mjs
60 lines (59 loc) · 1.69 KB
/
eslint.config.mjs
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
import eslintPluginPrettier from "eslint-plugin-prettier";
import typescriptEslintPlugin from "@typescript-eslint/eslint-plugin";
import typescriptEslintParser from "@typescript-eslint/parser";
export default [
{
files: ["**/*.ts"],
ignores: ["node_modules/", "dist/", "build/"],
languageOptions: {
parser: typescriptEslintParser,
parserOptions: {
project: "./tsconfig.json",
ecmaVersion: 2020,
sourceType: "module",
},
},
plugins: {
"@typescript-eslint": typescriptEslintPlugin,
prettier: eslintPluginPrettier,
},
rules: {
"padding-line-between-statements": [
"error",
{ blankLine: "always", prev: "class", next: "function" },
{ blankLine: "always", prev: "function", next: "function" }
],
"max-len": ["warn", { code: 120 }],
curly: ["error", "multi"],
"prettier/prettier": "error",
"no-console": "warn",
"no-var": "error",
"no-unneeded-ternary" : "error",
"no-debugger": "error",
"no-nested-ternary": "error",
"consistent-return": "error",
"no-useless-assignment": "error",
"no-unmodified-loop-condition": "error",
"no-template-curly-in-string": "error",
"no-constructor-return": "error",
"@typescript-eslint/no-unused-vars": [
"error",
{
argsIgnorePattern: "^_",
varsIgnorePattern: "^_",
caughtErrors: "all",
caughtErrorsIgnorePattern: "^_",
},
],
"prettier/prettier": [
"error",
{
singleQuote: true,
trailingComma: "none",
tabWidth: 4,
useTabs: false,
},
],
},
},
];