|
| 1 | +'use strict'; |
| 2 | + |
| 3 | +const js = require('@eslint/js'); |
| 4 | + |
| 5 | + |
| 6 | +module.exports = [ |
| 7 | + js.configs.recommended, |
| 8 | + { |
| 9 | + languageOptions: { |
| 10 | + 'parserOptions': { |
| 11 | + 'ecmaVersion': 2022, |
| 12 | + sourceType: 'commonjs' |
| 13 | + }, |
| 14 | + globals: { |
| 15 | + global: 'readonly', |
| 16 | + require: 'readonly', |
| 17 | + Buffer: 'readonly', |
| 18 | + module: 'readonly', |
| 19 | + console: 'readonly', |
| 20 | + __dirname: 'readonly', |
| 21 | + process: 'readonly', |
| 22 | + setTimeout: 'readonly', |
| 23 | + setImmediate: 'readonly', |
| 24 | + clearImmediate: 'readonly', |
| 25 | + }, |
| 26 | + }, |
| 27 | + 'rules': { |
| 28 | + 'arrow-parens': ['error', 'always'], |
| 29 | + 'no-trailing-spaces': [ |
| 30 | + 'error', |
| 31 | + { |
| 32 | + 'skipBlankLines': true |
| 33 | + } |
| 34 | + ], |
| 35 | + 'indent': [ |
| 36 | + 'error', |
| 37 | + 'tab', |
| 38 | + { |
| 39 | + 'SwitchCase': 1 |
| 40 | + } |
| 41 | + ], |
| 42 | + 'operator-linebreak': [ |
| 43 | + 'error', |
| 44 | + 'after', |
| 45 | + { |
| 46 | + 'overrides': { |
| 47 | + '?': 'before', |
| 48 | + ':': 'before' |
| 49 | + } |
| 50 | + } |
| 51 | + ], |
| 52 | + 'max-len': ['error', 110], |
| 53 | + 'quotes': [ |
| 54 | + 'error', |
| 55 | + 'single' |
| 56 | + ], |
| 57 | + 'semi': [ |
| 58 | + 'error', |
| 59 | + 'always' |
| 60 | + ], |
| 61 | + 'no-multiple-empty-lines': ['error', { 'max': 3, 'maxEOF': 1, 'maxBOF': 1 }], |
| 62 | + 'keyword-spacing': ['error', { 'before': true, 'after': true }], |
| 63 | + 'space-before-blocks': ['error'], |
| 64 | + 'space-before-function-paren': [ |
| 65 | + 'error', {'anonymous': 'always', 'named': 'never', 'asyncArrow': 'always'} |
| 66 | + ], |
| 67 | + 'camelcase': ['error'], |
| 68 | + 'no-tabs': [0], |
| 69 | + 'no-unused-vars': [ |
| 70 | + 'error', |
| 71 | + { |
| 72 | + 'argsIgnorePattern': '^_', |
| 73 | + 'varsIgnorePattern': '^_', |
| 74 | + 'caughtErrorsIgnorePattern': '^_' |
| 75 | + } |
| 76 | + ], |
| 77 | + 'global-require': [0], |
| 78 | + 'no-underscore-dangle': [0], |
| 79 | + 'no-plusplus': [0], |
| 80 | + 'no-shadow': [0], |
| 81 | + 'node/no-unpublished-require': [0], |
| 82 | + 'no-process-exit': [0], |
| 83 | + 'linebreak-style': [0], |
| 84 | + 'node/no-missing-require': [0], |
| 85 | + 'no-console': [0], |
| 86 | + 'node/no-unsupported-features/es-builtins': 0, |
| 87 | + 'node/no-unsupported-features/node-builtins': 0, |
| 88 | + 'func-names': [ |
| 89 | + 'error', |
| 90 | + 'never', |
| 91 | + { |
| 92 | + 'generators': 'never' |
| 93 | + } |
| 94 | + ] |
| 95 | + } |
| 96 | + }, |
| 97 | +]; |
0 commit comments