in nuxt 4 how to add vue/component-tags-order rule? #618
-
|
In a Nuxt 4 project using ESLint module, how can I enable and configure the Vue ESLint rule I already have // @ts-check
import withNuxt from './.nuxt/eslint.config.mjs';
import prettierPlugin from 'eslint-plugin-prettier';
export default withNuxt().append({
plugins: {
prettier: prettierPlugin,
},
rules: {
'no-console': 'warn',
semi: ['error', 'always'],
'vue/html-self-closing': 'off',
'vue/component-tags-order': [
'error',
{ order: ['script', 'template', 'style'] },
],
},
});when I run Oops! Something went wrong! :(
ESLint: 9.36.0
TypeError: Key "rules": Key "vue/component-tags-order": Could not find "component-tags-order" in plugin "vue".how to fix that? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Beta Was this translation helpful? Give feedback.
-
UpdateEdit: Hope it works for you. |
Beta Was this translation helpful? Give feedback.


Update
Ooohhhhhhh
Edit:
Working for me now. I run
eslint . --fix, and all the rules are applied. Had to add the'SLOT'order after'TWO_WAY_BINDING'. Thev-modelgoes on top of the other attributes.The
<script>moves to top if I place it somewhere else.Hope it works for you.