-
Notifications
You must be signed in to change notification settings - Fork 61
Expand file tree
/
Copy patheslint.config.mjs
More file actions
55 lines (54 loc) · 1.59 KB
/
Copy patheslint.config.mjs
File metadata and controls
55 lines (54 loc) · 1.59 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
import tseslint from "typescript-eslint";
export default tseslint.config(
{
ignores: [
"build/**",
"target/**",
"node_modules/**",
"src/**/*.d.ts",
// Copies sourced from WebClipper_Internal via the copyInternal gulp
// task (basename + "_internal"). Lint those in their own repo.
"src/scripts/**/*_internal.ts",
"src/scripts/**/*_internal.tsx",
"src/scripts/definitions/custom/aria-web-telemetry-*.d_internal.ts"
]
},
{
files: ["src/**/*.ts", "src/**/*.tsx"],
languageOptions: {
parser: tseslint.parser,
ecmaVersion: 2022,
sourceType: "module",
parserOptions: {
project: "./tsconfig.json",
tsconfigRootDir: import.meta.dirname
}
},
plugins: {
"@typescript-eslint": tseslint.plugin
},
rules: {
"spaced-comment": ["error", "always"],
"curly": "error",
"eol-last": "error",
"indent": ["error", "tab", { "SwitchCase": 1 }],
"no-multiple-empty-lines": ["error", { "max": 1 }],
"no-console": "error",
"@typescript-eslint/no-inferrable-types": "error",
"@typescript-eslint/no-shadow": "error",
"dot-notation": "error",
"no-fallthrough": "error",
"no-trailing-spaces": "error",
"no-unreachable": "error",
"@typescript-eslint/no-unused-expressions": ["error", { "allowTernary": true, "allowShortCircuit": true }],
"no-var": "error",
"brace-style": ["error", "1tbs", { "allowSingleLine": true }],
"quotes": ["error", "double", { "avoidEscape": true }],
"radix": "error",
"semi": ["error", "always"],
"default-case": "error",
"eqeqeq": "error",
"@typescript-eslint/prefer-optional-chain": "error"
}
}
);