forked from kwik-e-mart/technology-templates-nodejs-femsa
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheslint.config.mjs
33 lines (30 loc) · 1.02 KB
/
eslint.config.mjs
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
import globals from "globals";
/** @type {import('eslint').Linter.Config[]} */
// export default [
// {files: ["**/*.js"], languageOptions: {sourceType: "script"}},
// {languageOptions: { globals: globals.browser }},
// ];
export default [
{
files: ["**/*.js"],
languageOptions: {
sourceType: "script",
globals: globals.browser, // Merge browser globals
ecmaVersion: 12, // Specify ECMAScript version
},
rules: {
"no-unused-vars": "warn", // Warn for unused variables
semi: ["error", "always"], // Enforce semicolons at the end
quotes: ["warn", "single"], // Enforce single quotes
indent: ["warn", 2], // Enforce 2-space indentation
"no-console": "off", // Disabled 'no-console' to avoid warnings for console.log
eqeqeq: "warn", // Enforce use of === and !==
curly: "warn", // Require curly braces for control statements
},
},
{
languageOptions: {
globals: globals.browser, // Reiterate globals in the broader scope if needed
},
}
];