eslint-config-kaola-vue
v0.0.5
Published
ESLint shareable config for Vue to be used with eslint-config-kaola
Downloads
5
Readme
eslint-config-kaola-vue
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
- If you already use other parser (e.g.
"parser": "babel-eslint"
), please move it intoparserOptions
, so it doesn't collide with thevue-eslint-parser
:
- "parser": "babel-eslint",
"parserOptions": {
+ "parser": "babel-eslint",
"ecmaVersion": 2017,
"sourceType": "module"
}
- Make sure you don't have
eslint-plugin-html
in your config. Theeslint-plugin-html
extracts the content from<script>
tags, buteslint-vue-plugin
requires<script>
tags and<template>
tags in order to distinguish template and script in single file components:
"plugins": [
- "html"
]
- 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.
- With sublime, you have to add linters > eslint > selector: "source.js, text.html.vue".
Related
- eslint-config-kaola - ESLint shareable config for Kaola
- Kaola-fed