-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheslint.config.js
More file actions
46 lines (41 loc) · 1.17 KB
/
Copy patheslint.config.js
File metadata and controls
46 lines (41 loc) · 1.17 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
import prettierConfig from "eslint-config-prettier";
export default [
{
files: ["src/**/*.js"],
languageOptions: {
ecmaVersion: 2022,
sourceType: "module",
globals: {
// GJS/GNOME Shell globals
imports: "readonly",
global: "readonly",
log: "readonly",
logError: "readonly",
print: "readonly",
printerr: "readonly",
// Node.js built-ins not available in GJS
console: "off",
},
},
rules: {
// Core JavaScript best practices
"no-unused-vars": ["error", { argsIgnorePattern: "^_" }],
"prefer-const": "error",
"no-var": "error",
"eqeqeq": ["error", "always"],
// GJS-specific: allow logError instead of console
"no-console": "off",
// Modern JavaScript
"prefer-arrow-callback": "error",
"prefer-template": "error",
"object-shorthand": "error",
"no-useless-constructor": "error",
// Code quality
"no-duplicate-imports": "error",
"no-unreachable": "error",
"no-constant-condition": "error",
},
},
// Prettier config (must be last to override formatting rules)
prettierConfig,
];