-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy patheslint.config.js
More file actions
40 lines (39 loc) · 1.37 KB
/
Copy patheslint.config.js
File metadata and controls
40 lines (39 loc) · 1.37 KB
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
import tseslint from "@typescript-eslint/eslint-plugin";
import tsparser from "@typescript-eslint/parser";
export default [
{
ignores: ["scripts/**"]
},
{
files: ["src/**/*.ts"],
languageOptions: {
parser: tsparser,
parserOptions: {
project: "./tsconfig.eslint.json",
tsconfigRootDir: process.cwd()
}
},
plugins: {
"@typescript-eslint": tseslint
},
rules: {
"no-console": "warn",
"padding-line-between-statements": [
"error",
{ blankLine: "always", prev: "*", next: "return" },
{ blankLine: "always", prev: ["const", "let", "var"], next: "*" },
{ blankLine: "any", prev: ["const", "let", "var"], next: ["const", "let", "var"] },
{ blankLine: "always", prev: "*", next: "if" },
{ blankLine: "always", prev: "*", next: "for" },
{ blankLine: "always", prev: "*", next: "while" },
{ blankLine: "always", prev: "*", next: "switch" },
{ blankLine: "always", prev: "*", next: "try" }
],
"@typescript-eslint/no-unused-vars": ["warn", { argsIgnorePattern: "^_" }],
"@typescript-eslint/no-explicit-any": "warn",
"@typescript-eslint/consistent-type-imports": "warn",
"@typescript-eslint/no-floating-promises": "error",
"@typescript-eslint/await-thenable": "error"
}
}
];