|
| 1 | +import antfu from '@antfu/eslint-config'; |
| 2 | +import type { Linter } from 'eslint'; |
| 3 | +import prettierConfig from 'eslint-config-prettier'; |
| 4 | + |
| 5 | +export default antfu( |
| 6 | + { |
| 7 | + typescript: { |
| 8 | + overrides: { |
| 9 | + 'ts/ban-ts-comment': 'off', |
| 10 | + 'ts/no-use-before-define': 'off', |
| 11 | + 'ts/no-wrapper-object-types': 'off', |
| 12 | + 'ts/member-ordering': 'warn', |
| 13 | + 'ts/explicit-member-accessibility': ['warn', { accessibility: 'no-public' }], |
| 14 | + 'ts/consistent-type-imports': [ |
| 15 | + 'warn', |
| 16 | + { |
| 17 | + prefer: 'type-imports', |
| 18 | + disallowTypeAnnotations: false, |
| 19 | + fixStyle: 'separate-type-imports', |
| 20 | + }, |
| 21 | + ], |
| 22 | + }, |
| 23 | + }, |
| 24 | + jsonc: false, |
| 25 | + yaml: false, |
| 26 | + markdown: false, |
| 27 | + ignores: ['/dist', '/test', '**/*.js'], |
| 28 | + }, |
| 29 | + prettierConfig as Linter.Config, |
| 30 | + { |
| 31 | + rules: { |
| 32 | + 'unicorn/new-for-builtins': 'off', |
| 33 | + 'node/prefer-global/buffer': 'off', |
| 34 | + 'antfu/curly': 'off', |
| 35 | + 'antfu/consistent-list-newline': 'off', |
| 36 | + 'style/semi': 'off', |
| 37 | + 'style/member-delimiter-style': 'off', |
| 38 | + 'style/arrow-parens': ['warn', 'as-needed'], |
| 39 | + 'style/brace-style': ['warn', '1tbs'], |
| 40 | + 'style/indent': 'off', |
| 41 | + 'style/operator-linebreak': 'off', |
| 42 | + 'style/quote-props': 'off', |
| 43 | + 'antfu/if-newline': 'off', |
| 44 | + 'antfu/top-level-function': 'off', |
| 45 | + 'no-console': 'off', |
| 46 | + 'no-cond-assign': 'off', |
| 47 | + 'no-useless-return': 'warn', |
| 48 | + 'symbol-description': 'off', |
| 49 | + 'unused-imports/no-unused-vars': 'warn', |
| 50 | + 'perfectionist/sort-imports': [ |
| 51 | + 'warn', |
| 52 | + { |
| 53 | + ignoreCase: false, |
| 54 | + newlinesBetween: 'never', |
| 55 | + internalPattern: ['^#.*'], |
| 56 | + groups: [ |
| 57 | + ['side-effect-style', 'side-effect'], |
| 58 | + 'builtin', |
| 59 | + 'external', |
| 60 | + 'internal', |
| 61 | + 'parent', |
| 62 | + 'sibling', |
| 63 | + 'index', |
| 64 | + 'object', |
| 65 | + ], |
| 66 | + }, |
| 67 | + ], |
| 68 | + }, |
| 69 | + }, |
| 70 | +); |
0 commit comments