Skip to content

Instantly share code, notes, and snippets.

@Sequoya42
Last active January 30, 2019 10:27
Show Gist options
  • Save Sequoya42/2e58c7c9f7dcce8529c4d61b8764e299 to your computer and use it in GitHub Desktop.
Save Sequoya42/2e58c7c9f7dcce8529c4d61b8764e299 to your computer and use it in GitHub Desktop.
/*
Requires to have eslint and eslint-plugin vue installed locally.
(npm i -g eslint eslint-plugin-vue)
https://vuejs.github.io/eslint-plugin-vue/rules/
Put this in a ".eslintrc.json" at the root of the repository.
You can also put in in your $HOME.
*/
{
"env": {
"browser": true,
"es6": true,
"node": true
},
"extends": ["eslint:recommended", "plugin:vue/recommended"],
"parserOptions": {
"parser": "babel-eslint",
"ecmaVersion": 2018,
"sourceType": "module",
"allowImportExportEverywhere": true
},
"rules": {
"indent": ["error", 2],
"linebreak-style": ["error", "unix"],
"quotes": [
"error",
"double",
{
"allowTemplateLiterals": true
}
],
"no-unused-vars": [
"error",
{
"argsIgnorePattern": "^_"
}
],
"semi": ["error", "always"],
/*________ Vue specific ________ */
"vue/html-closing-bracket-spacing": [
"error",
{
"startTag": "never",
"endTag": "never",
"selfClosingTag": "never"
}
],
"vue/html-closing-bracket-newline": [
"error",
{
"singleline": "never",
"multiline": "never"
}
],
"vue/html-indent": [
"error",
2,
{
"attribute": 2,
"baseIndent": 1,
"closeBracket": 0,
"alignAttributesVertically": true,
"ignores": []
}
],
"vue/max-attributes-per-line": [
"error",
{
"singleline": 4,
"multiline": {
"max": 1,
"allowFirstLine": true
}
}
],
"vue/order-in-components": [
"error",
{
"order": [
"el",
"name",
"parent",
"functional",
["delimiters", "comments"],
["components", "directives", "filters"],
"extends",
"mixins",
"inheritAttrs",
"model",
["props", "propsData"],
"LIFECYCLE_HOOKS",
"data",
"watch",
"computed",
"methods",
["template", "render"],
"renderError"
]
}
]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment