-
Notifications
You must be signed in to change notification settings - Fork 27
Expand file tree
/
Copy patheslint.config.js
More file actions
49 lines (48 loc) · 1.25 KB
/
Copy patheslint.config.js
File metadata and controls
49 lines (48 loc) · 1.25 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
import js from "@eslint/js"
import tsPlugin from "@typescript-eslint/eslint-plugin"
import tsParser from "@typescript-eslint/parser"
export default [
{
ignores: ["dist/**", "node_modules/**", "*.js"],
},
js.configs.recommended,
{
files: ["src/**/*.ts", "test/**/*.ts", "scripts/**/*.ts", "tui-test.config.ts"],
languageOptions: {
parser: tsParser,
parserOptions: {
ecmaVersion: "latest",
sourceType: "module",
project: "./tsconfig.json",
tsconfigRootDir: import.meta.dirname,
},
globals: {
AbortSignal: "readonly",
console: "readonly",
fetch: "readonly",
process: "readonly",
setInterval: "readonly",
setTimeout: "readonly",
},
},
plugins: {
"@typescript-eslint": tsPlugin,
},
rules: {
"no-console": "warn",
"no-undef": "off",
"no-unused-vars": "off",
"no-var": "error",
"prefer-const": "off",
"@typescript-eslint/no-explicit-any": "error",
"@typescript-eslint/consistent-type-imports": "error",
"@typescript-eslint/no-unused-vars": ["error", { argsIgnorePattern: "^_" }],
},
},
{
files: ["scripts/**/*.ts"],
rules: {
"no-console": "off",
},
},
]