-
Notifications
You must be signed in to change notification settings - Fork 83
Expand file tree
/
Copy patheslint.config.js
More file actions
63 lines (61 loc) · 1.55 KB
/
eslint.config.js
File metadata and controls
63 lines (61 loc) · 1.55 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
import js from "@eslint/js";
import tseslint from "@typescript-eslint/eslint-plugin";
import tsParser from "@typescript-eslint/parser";
import eslintConfigPrettier from "eslint-config-prettier";
import importPlugin from "eslint-plugin-import";
import nPlugin from "eslint-plugin-n";
import promisePlugin from "eslint-plugin-promise";
import globals from "globals";
const sourceGlobs = ["**/*.{ts,tsx,js,jsx}"];
export default [
{
ignores: [
"dist/**",
"node_modules/**",
"coverage/**",
"vscode-extension/**",
"webapp/**",
"docs/**",
"eslint.config.js",
"*.config.ts"
]
},
js.configs.recommended,
{
files: sourceGlobs,
languageOptions: {
parser: tsParser,
parserOptions: {
project: "./tsconfig.json",
sourceType: "module",
ecmaVersion: "latest"
},
globals: {
...globals.node
}
},
plugins: {
"@typescript-eslint": tseslint,
import: importPlugin,
n: nPlugin,
promise: promisePlugin
},
rules: {
"no-undef": "off",
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": [
"warn",
{ argsIgnorePattern: "^_", varsIgnorePattern: "^_", destructuredArrayIgnorePattern: "^_" }
],
"@typescript-eslint/consistent-type-imports": ["warn", { prefer: "type-imports" }],
"import/order": [
"warn",
{
"newlines-between": "always",
alphabetize: { order: "asc", caseInsensitive: true }
}
]
}
},
eslintConfigPrettier
];