oli8
oli8
NNuxt
Created by oli8 on 4/7/2025 in #❓・help
Eslint: error using withNuxt & antfu config
Hey guys, I'm having trouble configuring eslint in a new nuxt project. I want to use a custom config based on antfu's and use withNuxt. I've tried this:
export default withNuxt(
antfu({
ignores: ['*.json', '*.yml'],
}, {
files: ['**/*.vue', '**/*.ts', '*.cjs'],
rules: {
'sort-imports': 'off',
'style/quotes': ['warn', 'single', { avoidEscape: true }],
'node/prefer-global/process': 'off',
'style/brace-style': ['error', '1tbs', { allowSingleLine: true }],
'antfu/if-newline': 'off',
'vue/html-self-closing': ['warn', {
html: {
void: 'always',
normal: 'never',
component: 'always',
},
}],
},
})
)
export default withNuxt(
antfu({
ignores: ['*.json', '*.yml'],
}, {
files: ['**/*.vue', '**/*.ts', '*.cjs'],
rules: {
'sort-imports': 'off',
'style/quotes': ['warn', 'single', { avoidEscape: true }],
'node/prefer-global/process': 'off',
'style/brace-style': ['error', '1tbs', { allowSingleLine: true }],
'antfu/if-newline': 'off',
'vue/html-self-closing': ['warn', {
html: {
void: 'always',
normal: 'never',
component: 'always',
},
}],
},
})
)
but i get
Error: ESLintFlatConfigUtils: Different instances of plugin "import" found in multiple configs:
nuxt/import/rules, antfu/imports/rules.
You might forget to set `standalone: false`.
Error: ESLintFlatConfigUtils: Different instances of plugin "import" found in multiple configs:
nuxt/import/rules, antfu/imports/rules.
You might forget to set `standalone: false`.
I've added eslint.config.standalone to false in nuxt.config.ts but same result. Any help appreciated, thanks
10 replies