|
1 | 1 | import globals from "globals"; |
2 | 2 | import pluginJs from "@eslint/js"; |
3 | 3 |
|
4 | | - |
5 | 4 | /** @type {import('eslint').Linter.Config[]} */ |
6 | 5 | export default [ |
7 | | - {files: ["**/*.js"], languageOptions: {sourceType: "commonjs"}}, |
8 | | - {languageOptions: { globals: globals.browser }}, |
| 6 | + { |
| 7 | + languageOptions: { |
| 8 | + globals: globals.node, |
| 9 | + }, |
| 10 | + }, |
9 | 11 | 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 | + }, |
10 | 37 | ]; |
0 commit comments