Issues with Eslint and Vue/Comment directives
P粉312195700
P粉312195700 2024-03-26 09:36:09
0
1
427

Hello, I just ran my website and got 20 errors like this:

Module Error (from ./node_modules/eslint-loader/dist/cjs.js): 
error  clear  vue/comment-directive

Any idea what's going wrong here?

P粉312195700
P粉312195700

reply all(1)
P粉419164700

All eslint plugins contain rules that allow eslint to use the eslint-disable feature in "templates". It supports the use of the following annotations:

  • eslint disable
  • Enable eslint
  • eslint disable line
  • eslint-disable-next-line

You can resolve the error you are experiencing if you can turn off the vue/comment-directive for the default rules by adding a custom rule in .eslintrc.js > file

rules: {
    'nuxt/no-cjs-in-config': 'off',
    'vue/comment-directive': 'off'
  }
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!