-
-
Notifications
You must be signed in to change notification settings - Fork 675
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error "clear" from vue/comment-directive only with flat configuration #2356
Comments
Yes, the workaround is to add the rule:
But I don't have found an explanation of why it triggers and if blocking it hides other errors. |
This repo doesn't have official "Flat config" support yet, see Did you try with the experimental implementation in #2319? |
I was having the same issue, just fixed it by adding processor to the config import tsparser from '@typescript-eslint/parser'
import vue from 'eslint-plugin-vue'
import parser from 'vue-eslint-parser'
export default {
name: 'dethdkn/vue/parser',
files: ['**/*.vue'],
languageOptions: {
parser,
parserOptions: {
extraFileExtensions: ['.vue'],
parser: tsparser,
sourceType: 'module' as const,
},
},
processor: vue.processors['.vue'],
} I have no idea why, but it worked for me 😶 |
Since flat config is now supported, you can use something like this, see https://eslint.vuejs.org/user-guide/#configuration-eslint-config-js: import pluginVue from 'eslint-plugin-vue'
export default [
// add more generic rulesets here, such as:
// js.configs.recommended,
...pluginVue.configs['flat/recommended'],
{
rules: {
// override/add rules settings here
}
}
] I'll close this as resolved, feel free to comment if it is still an issue. |
Hello @FloEdelmann, this way you enable the recommended rules right?, if so, how do I enable only the plugin? so I can add all the rules by myself. |
Thanks for your work!
to:
And now everything works perfectly (and the |
@dethdkn Use the |
This is what I was missing! That was driving me slowly insane. Thank you 🙏🏻 |
Checklist
Tell us about your environment
Please show your full configuration:
I just started experimenting with this flat config file
eslint.config.mjs
:What did you do?
What did you expect to happen?
As using yaml config, I want no errors reported also using flat config.
What actually happened?
The errors happens at the closing tag of
</template>
and</script>
Repository to reproduce this issue
Zipped project to reproduce the issue
The text was updated successfully, but these errors were encountered: