BlueGit

timfa frameworkv3

Files

frameworkv3 / eslint.config.mjs

eslint.config.mjs

eslint.config.mjs 1.0 KiB Download Raw
1export default [
2 {
3 files: ["**/*.js"],
4 languageOptions: {
5 ecmaVersion: 2023,
6 sourceType: "script",
7 globals: {
8 window: "readonly", // For browser environment globals (e.g., `window`, `document`)
9 document: "readonly"
10 }
11 },
12 rules: {
13 "no-dupe-keys": "error", // Disallow duplicate keys in object literals
14 "curly": ["error", "all"], // Require curly braces for all control statements
15 "no-eval": "error", // Disallow the use of eval()
16 "no-multi-spaces": "error", // Disallow multiple spaces
17 "semi": ["error", "always"], // Require semicolons at the end of statements
18 "indent": ["error", "tab", { SwitchCase: 1 }], // Tabs; indent case one level under switch
19 "prefer-const": "error", // Suggest using `const` if a variable is never reassigned
20 "no-mixed-spaces-and-tabs": ["error", "smart-tabs"] // Disallow mixed spaces and tabs, allow smart-tabs
21 }
22 }
23];