Home  >  Q&A  >  body text

Issues with Eslint and Vue/Comment directives

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粉312195700P粉312195700207 days ago399

reply all(1)I'll reply

  • P粉419164700

    P粉4191647002024-03-27 00:35:31

    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'
      }

    reply
    0
  • Cancelreply