Skip to content

Instantly share code, notes, and snippets.

@natemate90
Last active January 25, 2019 12:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save natemate90/b56a49d32ef681b70621ef167ebccf90 to your computer and use it in GitHub Desktop.
Save natemate90/b56a49d32ef681b70621ef167ebccf90 to your computer and use it in GitHub Desktop.
Vue Visual Studio Code user settings with lintfixing and prettier formatting on save
# editorconfig.org
root = true
[*]
indent_size = 2
indent_style = space
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
[*.md]
trim_trailing_whitespace = false
module.exports = {
root: true,
env: {
browser: true,
node: true
},
parserOptions: {
parser: "babel-eslint"
},
extends: [
"eslint:recommended",
"plugin:vue/recommended",
"plugin:prettier/recommended"
],
rules: {
"no-console": process.env.NODE_ENV === "production" ? "error" : "off",
"no-debugger": process.env.NODE_ENV === "production" ? "error" : "off",
semi: [2, "never"],
"vue/max-attributes-per-line": "off",
"prettier/prettier": ["error", { semi: false }],
"vue/html-self-closing": [
"error",
{
"html": {
"void": "any"
}
}
]
},
plugins: ["vue"]
};
# dependencies
node_modules
# logs
npm-debug.log
# other
.DS_Store
.vscode
# Nuxt build
.nuxt
# Nuxt generate
dist
# Environment
.env
module.exports = {
root: true,
env: {
browser: true,
node: true
},
parserOptions: {
parser: "babel-eslint"
},
extends: [
"eslint:recommended",
// https://github.com/vuejs/eslint-plugin-vue#priority-a-essential-error-prevention
// consider switching to `plugin:vue/strongly-recommended` or `plugin:vue/recommended` for stricter rules.
"plugin:vue/recommended",
"plugin:prettier/recommended"
],
// required to lint *.vue files
plugins: ["vue"],
// add your custom rules here
rules: {
semi: [2, "never"],
"no-console": "off",
"vue/max-attributes-per-line": "off",
"prettier/prettier": ["error", { semi: false }],
"vue/html-self-closing": [
"error",
{
"html": {
"void": "any"
}
}
]
}
};
[{
"key": "ctrl+space",
"command": "cursorRight"
}]
//tab out of quotes, parentheses etc. easily
{
"name": "sample project nuxt",
"version": "1.0.0",
"description": "Some sample packages, take care of the devDependencies especially.",
"author": "Nathan Alder",
"private": false,
"scripts": {
"dev": "nuxt",
"build": "nuxt build",
"start": "nuxt start",
"generate": "nuxt generate",
"lint": "eslint --ext .js,.vue --ignore-path .gitignore .",
"lintfix": "eslint --fix --ext .js,.vue --ignore-path .gitignore .",
"precommit": "npm run lint",
"heroku-postbuild": "npm run build",
"eslint-check": "eslint --print-config . | eslint-config-prettier-check",
"deploy": "push-dir --dir=dist --branch=release --cleanup"
},
"dependencies": {
"@nuxtjs/axios": "^5.3.6",
"@nuxtjs/google-analytics": "^2.0.2",
"@nuxtjs/proxy": "^1.3.1",
"dotenv": "^6.1.0",
"google-maps": "^3.3.0",
"nuxt": "^2.2.0",
"nuxt-i18n": "^5.4.4",
"push-dir": "^0.4.1",
"tiny-cookie": "^2.3.0",
"v-click-outside": "^1.0.5",
"vue-carousel": "^0.14.0",
"vue-no-ssr": "^1.1.0",
"vue-scrollto": "^2.13.0"
},
"devDependencies": {
"autoprefixer": "^9.3.1",
"babel-eslint": "^10.0.1",
"babel-plugin-array-includes": "^2.0.3",
"babel-plugin-transform-array-find": "^1.0.0",
"cssnano": "^4.1.7",
"eslint": "^5.9.0",
"eslint-config-prettier": "^3.3.0",
"eslint-loader": "^2.1.1",
"eslint-plugin-prettier": "^3.0.0",
"eslint-plugin-vue": "^4.7.1",
"glob-all": "^3.1.0",
"postcss-import": "^12.0.1",
"postcss-loader": "^3.0.0",
"postcss-preset-env": "^5.3.0",
"postcss-url": "^8.0.0",
"prettier": "^1.15.2",
"purgecss-webpack-plugin": "^0.23.0",
"tailwindcss": "^0.6.6"
}
}
{
"breadcrumbs.enabled": true,
"workbench.colorTheme": "Material Theme Darker High Contrast",
"window.zoomLevel": 0,
"sync.gist": "0fd79d5ec56534921b027da9d3a6ad59",
"search.location": "panel",
"sync.syncExtensions": false,
"eslint.alwaysShowStatus": true,
"eslint.run": "onSave",
"eslint.validate": [
{
"language": "vue",
"autoFix": true
},
{
"language": "html",
"autoFix": true
},
{
"language": "javascript",
"autoFix": true
}
],
"vetur.format.defaultFormatter.js": "prettier-eslint",
"vetur.format.defaultFormatter.html": "none",
"javascript.format.insertSpaceBeforeFunctionParenthesis": true,
"eslint.autoFixOnSave": true,
"editor.tabSize": 2,
"editor.wordWrap": "on",
"editor.autoClosingBrackets": "always",
"editor.autoClosingQuotes": "always"
}
// extensions enabled: vetur, eslint, material theme, jshint
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment