0.0.5 • Published 6 years ago

eslint-config-kaola-vue v0.0.5

Weekly downloads
17
License
-
Repository
github
Last release
6 years ago

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

0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago