-
Notifications
You must be signed in to change notification settings - Fork 52
Expand file tree
/
Copy patheslint.config.js
More file actions
75 lines (67 loc) · 2.24 KB
/
eslint.config.js
File metadata and controls
75 lines (67 loc) · 2.24 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
63
64
65
66
67
68
69
70
71
72
73
74
75
/*
* Copyright (c) 2015-2025 Progress Software Corporation and/or its subsidiaries or affiliates. All Rights Reserved.
*/
// ESLint 9+ flat config
const globals = require("globals");
module.exports = [
{
// Base configuration for all JS files
files: ["**/*.js"],
languageOptions: {
ecmaVersion: 2022,
sourceType: "commonjs", // Node.js uses CommonJS
globals: {
...globals.commonjs,
...globals.node,
...globals.browser, // Add browser globals like setTimeout
structuredClone: "readonly",
// Legacy globals from old config
Atomics: "readonly",
SharedArrayBuffer: "readonly"
}
},
rules: {
// Spacing and formatting
"indent": "off", // TODO: Fix indentation in separate PR
"linebreak-style": ["error", "unix"],
"quotes": ["error", "single"],
"semi": ["error", "always"],
// Modern best practices
"eqeqeq": "warn", // TODO: Fix == vs === issues in follow-up PR
"curly": ["error", "all"], // Require braces for all control structures
"no-unused-vars": "warn", // TODO: Fix unused variables in follow-up PR
"no-undef": "error",
// ES6+ modernization - GO TIME! 🚀
"prefer-const": "error", // Use const for variables never reassigned
"no-var": "warn", // TODO: Fix remaining var declarations in follow-up PR
// Spacing rules (disabled for initial setup - TODO: Fix in separate PR)
"arrow-spacing": "off",
"space-before-blocks": "off",
"space-before-function-paren": "off",
"space-in-parens": "off",
"object-curly-spacing": "off",
"keyword-spacing": "off",
"comma-spacing": "off",
"key-spacing": "off",
"space-infix-ops": "off",
// Style rules (disabled for initial setup - TODO: Fix in separate PR)
"array-bracket-spacing": "off",
"block-spacing": "off",
"brace-style": "off",
"func-call-spacing": "off",
"no-trailing-spaces": "off",
// Disable console errors for this project
"no-console": "off",
// Bracket notation preference
"dot-notation": "error"
}
},
{
// Ignore patterns
ignores: [
"**/data/*.js",
"node_modules/**",
"coverage/**"
]
}
];