Eslint-plugin-vue: Not working

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

Tell us about your environment

  • ESLint Version: 4.12.0
  • eslint-plugin-vue Version: 4.0.0-beta.0
  • Node Version: 9.2.0

Please show your full configuration:


"eslintConfig": {
    "root": true,
    "parser": "babel-eslint",
    "parserOptions": {
      "ecmaFeatures": {
        "globalReturn": true,
        "generators": false,
        "objectLiteralDuplicateProperties": false,
        "experimentalObjectRestSpread": true
      },
      "ecmaVersion": 2017,
      "sourceType": "module"
    },
    "extends": [
      "standard",
      "plugin:vue/recommended",
      "plugin:import/errors",
      "plugin:import/warnings"
    ],
    "globals": {
      "wp": true,
      "google": true,
      "browser": true,
      "import": true
    },
    "env": {
      "node": true,
      "es6": true,
      "amd": true,
      "browser": true,
      "jquery": false
    },
    "plugins": [
      "import",
      "html"
    ],
    "settings": {
      "import/core-modules": [],
      "import/ignore": [
        "node_modules",
        "\\.(coffee|scss|css|less|hbs|svg|json)$"
      ]
    },
    "rules": {
      "import/no-unresolved": 0
    }
  }


So, I installed eslint-plugin-vue@next and added it to my extends in my eslint config.
However I always get following error:

Error while loading rule 'vue/attribute-hyphenation': Cannot convert undefined or null to object

I've read in the readme that I have to move the babel-parser into the parserOptions. I've done this too. But then nothing is working. No rules are enforced. Not the vue-eslint nor the standard.

Tried in vscode and terminal.

duplicate question

Most helpful comment

Removing the html plugin solved it.

All 4 comments

Have you tried modifying your config based on the "gotya" listed in the FAQ?

You mean moving the parser into the parserOptions?

I've read in the readme that I have to move the babel-parser into the parserOptions. I've done this too. But then nothing is working. No rules are enforced. Not the vue-eslint nor the standard.

Thank you for this issue.

I guess that this is duplicate of #259.
Also, yes. Please move the parser property into parserOptions.

Removing the html plugin solved it.

Was this page helpful?
0 / 5 - 0 ratings