BlueGit

timfa frameworkv3

Files

frameworkv3 / eslint.config.mjs

eslint.config.mjs

mjs test
timfa Tim Falken · pushed by timfa · 2 years ago
ccf482e7 History
eslint.config.mjs 1.2 KiB Download Raw
1import { ESLint } from "eslint";
2
3export default [
4 {
5 files: ["**/*.js"],
6 languageOptions: {
7 ecmaVersion: 12, // equivalent to es2021: true
8 sourceType: "module", // for ECMAScript modules
9 globals: {
10 window: "readonly", // For browser environment globals (e.g., `window`, `document`)
11 document: "readonly"
12 }
13 },
14 rules: {
15 "no-undef": "error", // Disallow the use of undeclared variables
16 "no-dupe-keys": "error", // Disallow duplicate keys in object literals
17 "curly": ["error", "all"], // Require curly braces for all control statements
18 "no-eval": "error", // Disallow the use of eval()
19 "no-multi-spaces": "error", // Disallow multiple spaces
20 "semi": ["error", "always"], // Require semicolons at the end of statements
21 "indent": ["error", "tab"], // Enforce consistent indentation with tabs
22 "prefer-const": "error", // Suggest using `const` if a variable is never reassigned
23 "no-mixed-spaces-and-tabs": ["error", "smart-tabs"] // Disallow mixed spaces and tabs, allow smart-tabs
24 }
25 }
26];