Eslint-plugin-vue: Problem: airbnb rules don't work with eslint-plugin-vue

Created on 28 Nov 2017  路  5Comments  路  Source: vuejs/eslint-plugin-vue

Tell us about your environment

  • ESLint Version: 4.12.0
  • eslint-plugin-vue Version: 3.11.0
  • Node Version: 8.9.1

Please show your full configuration:

module.exports = {
  root: true,
  parserOptions: {
    parser: 'babel-eslint',
    sourceType: 'module'
  },
  env: {
    browser: true,
  },
  extends: [
    'plugin:vue/essential',
    'airbnb-base'
  ],
  // required to lint *.vue files
  plugins: [
    'html'
  ],
......
}

What did you expect to happen?
Show warnings about no-console to keep track of them to clean up later

What actually happened? Please include the actual, raw output from ESLint.
Don't show any error of airbnb eslint base

question

Most helpful comment

Thank you for this issue.

Please remove HTML plugin:

module.exports = {
  root: true,
  parserOptions: {
    parser: 'babel-eslint',
    sourceType: 'module'
  },
  env: {
    browser: true,
  },
-  // required to lint *.vue files
-  plugins: [
-    'html'
-  ],
......
}

All 5 comments

Thank you for this issue.

Please remove HTML plugin:

module.exports = {
  root: true,
  parserOptions: {
    parser: 'babel-eslint',
    sourceType: 'module'
  },
  env: {
    browser: true,
  },
-  // required to lint *.vue files
-  plugins: [
-    'html'
-  ],
......
}

Works great,
Thank you!

if I removed the eslint-plugin-html, my eslint-plugin-prettier won't work again @mysticatea

@lyyourc This plugin requires whole source code of .vue file to lint <template>. I'm not familiar with eslint-plugin-prettier, but I guess eslint-plugin-prettier does not support HTML code itself.

@lyyourc

It tries to parse the vue (html) file with the Babylon (javascript) parser which doesn't work. The vue file support has not yet landed in prettier (we will do a release on Wednesday), so until then it's not going to work.

https://github.com/prettier/prettier/issues/2097

Was this page helpful?
0 / 5 - 0 ratings

Related issues

apertureless picture apertureless  路  4Comments

prograhammer picture prograhammer  路  3Comments

rodrigoabb picture rodrigoabb  路  3Comments

KristofMorva picture KristofMorva  路  4Comments

casprwang picture casprwang  路  4Comments