diff options
Diffstat (limited to 'eslint.config.js')
-rw-r--r-- | eslint.config.js | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/eslint.config.js b/eslint.config.js index 7ac6782..3bca729 100644 --- a/eslint.config.js +++ b/eslint.config.js | |||
@@ -1,16 +1,16 @@ | |||
1 | import globals from "globals"; | 1 | import globals from 'globals' |
2 | import js from "@eslint/js"; | 2 | import js from '@eslint/js' |
3 | import importPlugin from "eslint-plugin-import"; | 3 | import importPlugin from 'eslint-plugin-import' |
4 | import promisePlugin from "eslint-plugin-promise"; | 4 | import promisePlugin from 'eslint-plugin-promise' |
5 | import nodePlugin from "eslint-plugin-node"; | 5 | import nodePlugin from 'eslint-plugin-node' |
6 | import jsdoc from 'eslint-plugin-jsdoc'; | 6 | import jsdoc from 'eslint-plugin-jsdoc' |
7 | 7 | ||
8 | export default [ | 8 | export default [ |
9 | js.configs.recommended, | 9 | js.configs.recommended, |
10 | { | 10 | { |
11 | languageOptions: { | 11 | languageOptions: { |
12 | ecmaVersion: 2022, | 12 | ecmaVersion: 2022, |
13 | sourceType: "module", | 13 | sourceType: 'module', |
14 | globals: { | 14 | globals: { |
15 | ...globals.browser, | 15 | ...globals.browser, |
16 | ...globals.node | 16 | ...globals.node |
@@ -19,31 +19,31 @@ export default [ | |||
19 | plugins: { | 19 | plugins: { |
20 | import: importPlugin, | 20 | import: importPlugin, |
21 | promise: promisePlugin, | 21 | promise: promisePlugin, |
22 | node: nodePlugin, | 22 | node: nodePlugin |
23 | }, | 23 | }, |
24 | rules: { | 24 | rules: { |
25 | 'no-unused-vars': ['warn', { | 25 | 'no-unused-vars': ['warn', { |
26 | 'varsIgnorePattern': '^_', | 26 | varsIgnorePattern: '^_', |
27 | "argsIgnorePattern": "^_", | 27 | argsIgnorePattern: '^_', |
28 | "caughtErrorsIgnorePattern": "^ignore|_", | 28 | caughtErrorsIgnorePattern: '^ignore|_' |
29 | }], | 29 | }], |
30 | 'import/no-unresolved': 'error', | 30 | 'import/no-unresolved': 'error', |
31 | 'no-console': ["error", { allow: ["info", "warn", "error"] }], | 31 | 'no-console': ['error', { allow: ['info', 'warn', 'error'] }], |
32 | 'eqeqeq': ['error', 'always'], | 32 | eqeqeq: ['error', 'always'], |
33 | // 'curly': ['warn', 'multi'], | 33 | // 'curly': ['warn', 'multi'], |
34 | 'prefer-const': 'error', | 34 | 'prefer-const': 'error', |
35 | 'no-var': 'error', | 35 | 'no-var': 'error', |
36 | 'array-callback-return': 'error', | 36 | 'array-callback-return': 'error', |
37 | 'no-unexpected-multiline': 'warn', | 37 | 'no-unexpected-multiline': 'warn' |
38 | }, | 38 | } |
39 | }, | 39 | }, |
40 | { | 40 | { |
41 | files: ['src/*js'], | 41 | files: ['src/*js'], |
42 | plugins: { | 42 | plugins: { |
43 | jsdoc, | 43 | jsdoc |
44 | }, | 44 | }, |
45 | rules: { | 45 | rules: { |
46 | 'jsdoc/require-description': 'warn' | 46 | 'jsdoc/require-description': 'warn' |
47 | } | 47 | } |
48 | }, | 48 | } |
49 | ]; | 49 | ] |