-
-
Notifications
You must be signed in to change notification settings - Fork 5
/
eslint.config.js
61 lines (59 loc) · 1.78 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
// @ts-check
import eslint from "@eslint/js";
import eslintSecurity from "eslint-plugin-security";
import eslintSimpleImportSort from "eslint-plugin-simple-import-sort";
import eslintConfigPrettier from "eslint-config-prettier";
import eslintUnusedImport from "eslint-plugin-unused-imports";
import tsEslint from "typescript-eslint";
// noinspection JSUnusedGlobalSymbols
export default tsEslint.config(
{ ignores: ["lib/", "example/"] },
eslint.configs.recommended,
...tsEslint.configs.recommended,
eslintSecurity.configs.recommended,
eslintConfigPrettier,
{
files: ["src/**/*"],
languageOptions: {
parserOptions: {
project: ["./tsconfig.json"],
sourceType: "module",
},
},
plugins: {
"simple-import-sort": eslintSimpleImportSort,
"unused-imports": eslintUnusedImport,
},
rules: {
"comma-dangle": ["error", "always-multiline"],
"linebreak-style": ["error", "unix"],
semi: ["error", "always"],
"max-len": [
"error",
{
code: 100,
ignoreComments: true,
ignoreStrings: true,
ignoreTemplateLiterals: true,
},
],
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/no-unused-vars": "off",
"@typescript-eslint/consistent-type-imports": "error",
"security/detect-object-injection": "off",
"simple-import-sort/imports": [
"error",
{ groups: [["^.*\\u0000$", "^\\u0000", "^node:", "^@?\\w", "^", "^\\."]] },
],
"simple-import-sort/exports": "error",
"unused-imports/no-unused-vars": [
"error",
{
argsIgnorePattern: "^_",
varsIgnorePattern: "^_",
},
],
"unused-imports/no-unused-imports": "error",
},
},
);