|
| 1 | +import nodePlugin from 'eslint-plugin-n' |
| 2 | +import mocha from 'eslint-plugin-mocha' |
| 3 | +import globals from 'globals' |
| 4 | +import js from '@eslint/js' |
| 5 | +import eslintConfigPrettier from 'eslint-config-prettier' |
| 6 | +import eslint from '@eslint/js' |
| 7 | +import typescriptEslint from 'typescript-eslint' |
| 8 | + |
| 9 | +export default [ |
| 10 | + { |
| 11 | + ignores: ['packages/*/node_modules', '**/docs', 'packages/*/dist/*'], |
| 12 | + }, |
| 13 | + js.configs.recommended, |
| 14 | + nodePlugin.configs['flat/recommended-script'], |
| 15 | + mocha.configs['flat'].recommended, |
| 16 | + ...typescriptEslint.configs.recommended, |
| 17 | + eslintConfigPrettier, |
| 18 | + { |
| 19 | + languageOptions: { |
| 20 | + globals: { |
| 21 | + ...globals.node, |
| 22 | + ...globals.mocha, |
| 23 | + assert: false, |
| 24 | + makeTestFeature: false, |
| 25 | + shouldReject: false, |
| 26 | + }, |
| 27 | + ecmaVersion: 12, |
| 28 | + sourceType: 'commonjs', |
| 29 | + }, |
| 30 | + |
| 31 | + rules: { |
| 32 | + 'no-extra-semi': 'off', |
| 33 | + '@typescript-eslint/no-extra-semi': 'off', |
| 34 | + 'n/no-process-exit': 'off', |
| 35 | + 'no-var': 'error', |
| 36 | + |
| 37 | + 'n/no-extraneous-import': [ |
| 38 | + 'error', |
| 39 | + { |
| 40 | + allowModules: ['sinon', 'chai'], |
| 41 | + }, |
| 42 | + ], |
| 43 | + |
| 44 | + 'n/no-missing-import': 'off', |
| 45 | + 'n/no-missing-require': 'off', |
| 46 | + 'n/no-unpublished-import': 'off', |
| 47 | + 'n/no-unpublished-require': 'off', |
| 48 | + 'n/no-unsupported-features/es-builtins': 'error', |
| 49 | + 'n/no-unsupported-features/es-syntax': 'off', |
| 50 | + 'n/no-unsupported-features/node-builtins': 'error', |
| 51 | + 'n/hashbang': 'off', |
| 52 | + 'object-shorthand': 'error', |
| 53 | + 'prefer-arrow-callback': 'error', |
| 54 | + 'prefer-const': 'error', |
| 55 | + 'prefer-template': 'error', |
| 56 | + 'mocha/no-exclusive-tests': 'error', |
| 57 | + 'mocha/no-hooks-for-single-case': 'off', |
| 58 | + 'mocha/no-mocha-arrows': 'off', |
| 59 | + 'mocha/no-pending-tests': 'error', |
| 60 | + 'mocha/no-setup-in-describe': 'off', |
| 61 | + strict: ['error', 'never'], |
| 62 | + 'valid-jsdoc': 'off', |
| 63 | + '@typescript-eslint/no-var-requires': 'off', |
| 64 | + '@typescript-eslint/no-empty-function': 'off', |
| 65 | + '@typescript-eslint/no-require-imports': 'off', |
| 66 | + }, |
| 67 | + }, |
| 68 | +] |
0 commit comments