|
| 1 | +// @ts-check |
| 2 | + |
| 3 | +import eslint from '@eslint/js'; |
| 4 | +import jsdoc from 'eslint-plugin-jsdoc'; |
| 5 | +import { defineConfig } from 'eslint/config'; |
| 6 | +import tseslint from 'typescript-eslint'; |
| 7 | +import eslintConfigPrettier from 'eslint-config-prettier/flat'; |
| 8 | + |
| 9 | +export default defineConfig( |
| 10 | + eslint.configs.recommended, |
| 11 | + tseslint.configs.recommendedTypeChecked, |
| 12 | + eslintConfigPrettier, |
| 13 | + jsdoc.configs['flat/logical-typescript'], |
| 14 | + { |
| 15 | + languageOptions: { |
| 16 | + parserOptions: { |
| 17 | + projectService: { |
| 18 | + allowDefaultProject: ['*.js', 'bin/*.js', '*.mjs'], |
| 19 | + }, |
| 20 | + }, |
| 21 | + }, |
| 22 | + }, |
| 23 | + { |
| 24 | + rules: { |
| 25 | + '@typescript-eslint/await-thenable': ['off'], |
| 26 | + '@typescript-eslint/no-empty-object-type': ['off'], |
| 27 | + '@typescript-eslint/no-explicit-any': ['off'], |
| 28 | + '@typescript-eslint/no-floating-promises': ['off'], |
| 29 | + '@typescript-eslint/no-misused-promises': ['off'], |
| 30 | + '@typescript-eslint/no-redundant-type-constituents': ['off'], |
| 31 | + '@typescript-eslint/no-unsafe-argument': ['off'], |
| 32 | + '@typescript-eslint/no-unsafe-assignment': ['off'], |
| 33 | + '@typescript-eslint/no-unsafe-call': ['off'], |
| 34 | + '@typescript-eslint/no-unsafe-function-type': ['off'], |
| 35 | + '@typescript-eslint/no-unsafe-member-access': ['off'], |
| 36 | + '@typescript-eslint/no-unsafe-return': ['off'], |
| 37 | + '@typescript-eslint/no-wrapper-object-types': ['off'], |
| 38 | + '@typescript-eslint/require-await': ['off'], |
| 39 | + '@typescript-eslint/restrict-plus-operands': ['off'], |
| 40 | + '@typescript-eslint/unbound-method': ['off'], |
| 41 | + 'no-control-regex': ['off'], |
| 42 | + 'no-empty': ['off'], |
| 43 | + 'no-new-wrappers': ['error'], |
| 44 | + 'jsdoc/check-tag-names': ['error', { definedTags: ['remarks', 'packageDocumentation'] }], |
| 45 | + }, |
| 46 | + }, |
| 47 | + { |
| 48 | + files: ['**/*.js'], |
| 49 | + languageOptions: { |
| 50 | + globals: { |
| 51 | + module: 'readonly', |
| 52 | + require: 'readonly', |
| 53 | + }, |
| 54 | + }, |
| 55 | + rules: { |
| 56 | + '@typescript-eslint/no-require-imports': ['off'], |
| 57 | + }, |
| 58 | + }, |
| 59 | + { |
| 60 | + ignores: ['build/**', 'dist/**', 'packages/**/*.js'], |
| 61 | + }, |
| 62 | +); |
0 commit comments