Skip to content

Instantly share code, notes, and snippets.

@plugn
Last active March 27, 2019 11:25
Show Gist options
  • Save plugn/aa0b27fdcc99eb18222fb9e89061c6c0 to your computer and use it in GitHub Desktop.
Save plugn/aa0b27fdcc99eb18222fb9e89061c6c0 to your computer and use it in GitHub Desktop.
VSCode + prettier @author [email protected]
{
"parserOptions": {
"ecmaVersion": 2017,
"sourceType": "module",
"parser": "babel-eslint"
},
"settings": {
"import/resolver": {
"alias": {
"map": [
["@", "./src"],
["utils", "./src/utils/"]
],
"extensions": [
".vue", ".ts", ".js", ".jsx", ".json"
]
}
}
},
"extends" : [
"eslint:recommended",
"plugin:vue/recommended",
"plugin:prettier/recommended",
"@vue/prettier"
],
"plugins": [
"vue-a11y",
"vue"
],
"rules": {
"spaced-comment": 0,
"space-before-function-paren": 0,
"jsx-quotes": 0,
"no-class-assign": 0,
"indent": [
"error",
2
],
"brace-style": 0,
"no-return-assign": 0,
"no-trailing-spaces": 0,
"curly": [
0,
"multi"
],
"prettier/prettier": "off",
"vue/html-self-closing": [
"error",
{
"html": {
"void": "any"
}
}
]
}
}
module.exports = {
singleQuote: true,
semi: false,
};
{
// This file is required for VSCode to understand webpack aliases
"compilerOptions": {
// This must be specified if "paths" is set
"baseUrl": ".",
// Relative to "baseUrl"
"paths": {
"@/*": [
"./src/*"
],
}
}
}
{
"devDependencies" : {
"@vue/eslint-config-prettier": "latest",
"eslint": "5.13.0",
"vue-eslint-parser": "6.0.2",
"eslint-import-resolver-alias": "^1.1.2",
"eslint-import-resolver-webpack": "0.11.0",
"eslint-loader": "2.1.1",
"eslint-plugin-import": "^2.16.0",
"eslint-plugin-vue": "5.1.0",
}
}
{
"vetur.validation.template": false,
"eslint.validate": [
{
"language": "vue",
"autoFix": true
},
{
"language": "html",
"autoFix": true
},
{
"language": "javascript",
"autoFix": true
},
],
"eslint.autoFixOnSave": true,
"editor.formatOnSave": true
}
@plugn
Copy link
Author

plugn commented Mar 26, 2019

install Vetur extension for VSCode

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment