-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy patheslint.config.mjs
48 lines (46 loc) · 1.35 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
// @ts-check
import tslintPlugin from "@typescript-eslint/eslint-plugin"
import tsParser from "@typescript-eslint/parser"
import simpleImportSort from "eslint-plugin-simple-import-sort"
export default [
{
files: ["**/*.ts"],
ignores: ["**/node_modules/", ".git/", "dist/", "**/dist/**"],
languageOptions: {
ecmaVersion: "latest",
sourceType: "module",
parser: tsParser,
parserOptions: {
project: "./tsconfig.json",
},
globals: {
console: "readonly",
module: "readonly",
process: "readonly",
},
},
plugins: {
"@typescript-eslint": tslintPlugin,
"simple-import-sort": simpleImportSort,
},
rules: {
...tslintPlugin.configs.recommended.rules,
"no-empty-function": "error",
"prefer-const": [
"error",
{
destructuring: "any",
ignoreReadBeforeAssign: false,
},
],
"simple-import-sort/imports": "error",
"simple-import-sort/exports": "error",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/ban-ts-comment": "off",
"@typescript-eslint/no-implied-eval": "off",
"@typescript-eslint/restrict-template-expressions": "off",
"@typescript-eslint/no-unused-vars": "off", // TODO: enable?
"@typescript-eslint/no-unsafe-call": "error",
},
},
]