eslint-config-kaola-vue

0.0.5 • Public • Published

eslint-config-kaola-vue

Build Status

Install

$ npm install --save-dev eslint-config-kaola-vue eslint-plugin-vue

Usage

Add some ESLint config to your package.json:

{
    "name": "my-awesome-project",
    "eslintConfig": {
        "extends": ["kaola/esnext", "kaola-vue"]
    }
}

Or to .eslintrc:

{
    "extends": ["kaola/esnext", "kaola-vue"]
}

Tips

  1. If you already use other parser (e.g. "parser": "babel-eslint"), please move it into parserOptions, so it doesn't collide with the vue-eslint-parser:
- "parser": "babel-eslint",
  "parserOptions": {
+     "parser": "babel-eslint",
      "ecmaVersion": 2017,
      "sourceType": "module"
  }
  1. Make sure you don't have eslint-plugin-html in your config. The eslint-plugin-html extracts the content from <script> tags, but eslint-vue-plugin requires <script> tags and <template> tags in order to distinguish template and script in single file components:
"plugins": [
-   "html"
]
  1. Make sure your tool is set to lint .vue files. VSCode targets only JavaScript or HTML files by default. You have to add {"autoFix": true, "language": "vue"} into eslint.validate entry.
  2. With sublime, you have to add linters > eslint > selector: "source.js, text.html.vue".

Related

Package Sidebar

Install

npm i eslint-config-kaola-vue

Weekly Downloads

3

Version

0.0.5

License

none

Unpacked Size

8.1 kB

Total Files

4

Last publish

Collaborators

  • everywill