aboutsummaryrefslogtreecommitdiffhomepage
path: root/eslint.config.js
diff options
context:
space:
mode:
Diffstat (limited to 'eslint.config.js')
-rw-r--r--eslint.config.js36
1 files changed, 36 insertions, 0 deletions
diff --git a/eslint.config.js b/eslint.config.js
new file mode 100644
index 0000000..b2a1c54
--- /dev/null
+++ b/eslint.config.js
@@ -0,0 +1,36 @@
1import globals from "globals";
2import js from "@eslint/js";
3import importPlugin from "eslint-plugin-import";
4import promisePlugin from "eslint-plugin-promise";
5import nodePlugin from "eslint-plugin-node";
6
7export default [
8 js.configs.recommended,
9 {
10 languageOptions: {
11 ecmaVersion: 2022,
12 sourceType: "module",
13 globals: {
14 ...globals.browser,
15 ...globals.node
16 }
17 },
18 plugins: {
19 import: importPlugin,
20 promise: promisePlugin,
21 node: nodePlugin,
22 },
23 rules: {
24 'no-unused-vars': ['error', { 'varsIgnorePattern': '^_' }],
25 'import/no-unresolved': 'error',
26 'no-console': ["error", { allow: ["info", "warn", "error"] }],
27 'eqeqeq': ['error', 'always'],
28 // 'curly': ['warn', 'multi'],
29 'prefer-const': 'error',
30 'no-var': 'error',
31 'promise/catch-or-return': 'error',
32 'array-callback-return': 'error',
33 'no-unexpected-multiline': 'warn'
34 },
35 }
36];