This repository was archived by the owner on Feb 2, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy patheslint.config.js
More file actions
59 lines (54 loc) · 1.72 KB
/
Copy patheslint.config.js
File metadata and controls
59 lines (54 loc) · 1.72 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
import js from "@eslint/js";
import globals from "globals";
const recommended = js.configs.recommended;
export default [
{
ignores: [
"**/*.min.js",
"cps/static/js/libs/**",
"cps/static/js/compress/**",
"cps/static/js/reading/**",
"cps/static/js/kthoom.js",
"cps/static/js/service-worker.js",
],
},
{
files: ["cps/static/js/**/*.js"],
...recommended,
languageOptions: {
...recommended.languageOptions,
ecmaVersion: 2021,
sourceType: "script",
globals: {
...globals.browser,
...globals.jquery,
},
},
rules: {
...recommended.rules,
// Keep this as a low-noise baseline first.
"no-console": "off",
"no-unused-vars": [
"warn",
{ args: "none", varsIgnorePattern: "^_" },
],
// Many of these scripts rely on globals injected by templates or
// browser runtime, and some legacy files intentionally create
// globals in sloppy mode.
"no-undef": "off",
"no-redeclare": "warn",
"no-constant-binary-expression": "warn",
"no-useless-escape": "warn",
"no-empty": "warn",
// Match existing style without forcing a big refactor.
indent: ["warn", 4, { SwitchCase: 1 }],
quotes: [
"warn",
"double",
{ avoidEscape: true, allowTemplateLiterals: true },
],
semi: ["warn", "always"],
eqeqeq: ["warn", "always"],
},
},
];