-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy patheslint.config.js
More file actions
62 lines (58 loc) · 1.76 KB
/
Copy patheslint.config.js
File metadata and controls
62 lines (58 loc) · 1.76 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
60
61
62
import js from "@eslint/js";
export default [
js.configs.recommended,
{
files: ["src/**/*.js"],
languageOptions: {
ecmaVersion: 2022,
sourceType: "module",
globals: {
window: "readonly",
document: "readonly",
console: "readonly",
fetch: "readonly",
URL: "readonly",
URLSearchParams: "readonly",
Date: "readonly",
localStorage: "readonly",
location: "readonly",
alert: "readonly",
confirm: "readonly",
setTimeout: "readonly",
setInterval: "readonly",
clearTimeout: "readonly",
clearInterval: "readonly",
goToGL: "writable",
},
},
rules: {
// Best practices
"no-unused-vars": ["error", { argsIgnorePattern: "^_" }],
"no-console": "off",
"prefer-const": "error",
"no-var": "error",
// Code style - let Prettier handle formatting
indent: "off",
quotes: "off",
semi: "off",
"comma-dangle": "off",
"eol-last": "off",
// Modern JavaScript
"prefer-arrow-callback": "error",
"prefer-template": "error",
"object-shorthand": "error",
// Error prevention
"no-undef": "error",
"no-unreachable": "error",
"no-duplicate-imports": "error",
},
},
{
files: ["rollup.config.js", "eslint.config.js"],
languageOptions: {
globals: {
process: "readonly",
},
},
},
];