Skip to content

Commit 23ea50a

Browse files
authored
Update eslint.config.mjs
1 parent 8d93cd4 commit 23ea50a

File tree

1 file changed

+30
-3
lines changed

1 file changed

+30
-3
lines changed

eslint.config.mjs

Lines changed: 30 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,37 @@
11
import globals from "globals";
22
import pluginJs from "@eslint/js";
33

4-
54
/** @type {import('eslint').Linter.Config[]} */
65
export default [
7-
{files: ["**/*.js"], languageOptions: {sourceType: "commonjs"}},
8-
{languageOptions: { globals: globals.browser }},
6+
{
7+
languageOptions: {
8+
globals: globals.node,
9+
},
10+
},
911
pluginJs.configs.recommended,
12+
{
13+
rules: {
14+
"no-global-assign": "off",
15+
"no-unused-vars": "off",
16+
"no-undef": "warn",
17+
"no-undef-init": "warn",
18+
"no-undefined": "warn",
19+
"no-self-assign": "off",
20+
"no-extra-semi": "off",
21+
"no-mixed-spaces-and-tabs": "off",
22+
"no-irregular-whitespace": "off",
23+
"no-case-declarations": "off",
24+
"no-useless-catch": "off",
25+
"no-console": "off",
26+
"no-process-exit": "warn",
27+
"no-shadow": "warn",
28+
"eqeqeq": ["warn", "always"],
29+
"curly": ["warn", "multi-line"],
30+
"prefer-const": "warn",
31+
"strict": ["warn", "global"],
32+
"handle-callback-err": "warn",
33+
"no-buffer-constructor": "warn",
34+
"callback-return": "warn",
35+
},
36+
},
1037
];

0 commit comments

Comments
 (0)