|
1 |
| -import antfu from '@antfu/eslint-config' |
| 1 | +// @ts-check |
| 2 | +import { createConfigForNuxt } from '@nuxt/eslint-config/flat' |
2 | 3 |
|
3 |
| -export default antfu({ |
4 |
| - rules: { |
5 |
| - 'no-use-before-define': 'off', |
6 |
| - 'node/prefer-global/buffer': 'off', |
7 |
| - 'node/prefer-global/process': 'off', |
| 4 | +export default createConfigForNuxt({ |
| 5 | + features: { |
| 6 | + stylistic: true, |
| 7 | + tooling: true, |
| 8 | + }, |
| 9 | + dirs: { |
| 10 | + src: ['./src', './client', './docs'], |
8 | 11 | },
|
9 | 12 | })
|
| 13 | + .override('nuxt/javascript', { |
| 14 | + rules: { |
| 15 | + 'no-console': ['error', { allow: ['warn', 'error'] }], |
| 16 | + }, |
| 17 | + }) |
| 18 | + .override('nuxt/typescript/rules', { |
| 19 | + rules: { |
| 20 | + '@typescript-eslint/ban-ts-comment': [ |
| 21 | + 'error', |
| 22 | + { |
| 23 | + 'ts-expect-error': 'allow-with-description', |
| 24 | + 'ts-ignore': true, |
| 25 | + }, |
| 26 | + ], |
| 27 | + '@typescript-eslint/consistent-type-definitions': ['error', 'interface'], |
| 28 | + // TODO: Discuss if we want to enable this |
| 29 | + '@typescript-eslint/no-invalid-void-type': 'off', |
| 30 | + // TODO: Discuss if we want to enable this |
| 31 | + '@typescript-eslint/no-explicit-any': 'off', |
| 32 | + }, |
| 33 | + }) |
| 34 | + .override('nuxt/vue/rules', { |
| 35 | + rules: { |
| 36 | + 'vue/multi-word-component-names': 'off', |
| 37 | + 'vue/no-v-html': 'off', |
| 38 | + 'vue/require-default-prop': 'off', |
| 39 | + 'vue/no-multiple-template-root': 'off', |
| 40 | + // NOTE: Disable this style rules if stylistic is not enabled |
| 41 | + 'vue/max-attributes-per-line': 'off', |
| 42 | + }, |
| 43 | + }) |
0 commit comments