|
| 1 | +const globals = require("globals"); |
| 2 | +const js = require("@eslint/js"); |
| 3 | + |
| 4 | +module.exports = [ |
| 5 | +js.configs.recommended, |
| 6 | +{ |
| 7 | + languageOptions: { |
| 8 | + ecmaVersion: 'latest', |
| 9 | + globals: { |
| 10 | + ...globals.node |
| 11 | + } |
| 12 | + }, |
| 13 | + rules: { |
| 14 | + "no-extra-semi": 2, |
| 15 | + "no-implicit-globals": 2, |
| 16 | + "no-implied-eval": 2, |
| 17 | + "no-inner-declarations": 2, |
| 18 | + "no-invalid-this": 2, |
| 19 | + "no-irregular-whitespace": 2, |
| 20 | + "no-mixed-spaces-and-tabs": 2, |
| 21 | + "no-native-reassign": 2, |
| 22 | + "no-negated-in-lhs": 2, |
| 23 | + "no-unused-expressions": 2, |
| 24 | + "handle-callback-err": 2, |
| 25 | + "no-trailing-spaces": 2, |
| 26 | + "no-unused-vars": [2, { |
| 27 | + "argsIgnorePattern": "ignored_", |
| 28 | + "varsIgnorePattern": "ignored_", |
| 29 | + "caughtErrorsIgnorePattern": "ignored_" |
| 30 | + }], |
| 31 | + "no-prototype-builtins": 2, |
| 32 | + "no-useless-escape": 2, |
| 33 | + "arrow-spacing": [2, {"before":true, "after":true}], |
| 34 | + "func-call-spacing": [2, "never"], |
| 35 | + "semi-spacing": [2, {"before": false, "after": true}], |
| 36 | + "space-before-function-paren": [2, {"anonymous": "never", "named": "never", "asyncArrow": "always"}], |
| 37 | + "brace-style": [2, "1tbs", {"allowSingleLine": true}], |
| 38 | + "no-eval": 2, |
| 39 | + "no-throw-literal": 2, |
| 40 | + "no-undef-init": 2, |
| 41 | + "no-useless-call": 2, |
| 42 | + "no-useless-computed-key": 2, |
| 43 | + "no-useless-concat": 2, |
| 44 | + "no-useless-constructor": 2, |
| 45 | + "no-useless-rename": 2, |
| 46 | + "block-scoped-var": 2, |
| 47 | + "callback-return": 2, |
| 48 | + "default-case": 2, |
| 49 | + "semi": 2 |
| 50 | + } |
| 51 | +}, |
| 52 | +// { |
| 53 | +// files: ["lib/*"], |
| 54 | +// rules: { |
| 55 | +// "no-shadow":2, |
| 56 | +// "quotes": [2, "single", { "avoidEscape": true }] |
| 57 | +// } |
| 58 | +// }, |
| 59 | +]; |
| 60 | + |
0 commit comments