Home > Mobile >  Error with eslint and vue/comment directive
Error with eslint and vue/comment directive

Time:05-15

Hello I was just running my website and I have 20 errors like this :

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

Any idea what is the problem here?

CodePudding user response:

Rules that allow eslint to use eslint-disable functionality in the 'template' are included in all eslint plugin.It supports usage of the following comments:

  • eslint-disable
  • eslint-enable
  • eslint-disable-line
  • eslint-disable-next-line

The error you are getting can be solved if you can turn off the vue/comment-directive of the default rules by adding a custom rule in the .eslintrc.js file


 rules: {
    'nuxt/no-cjs-in-config': 'off',
    'vue/comment-directive': 'off'
  }
  • Related