Skip to content

Instantly share code, notes, and snippets.

@agebhar1
Created February 19, 2020 21:42
Show Gist options
  • Select an option

  • Save agebhar1/5809bfac83bd2f6cdac711482aa34869 to your computer and use it in GitHub Desktop.

Select an option

Save agebhar1/5809bfac83bd2f6cdac711482aa34869 to your computer and use it in GitHub Desktop.
Basic Vue/VS Code -/- Command Line Configuration

VS Code

Plugins

Configuration

settings.json (VS Code config):

{
  "editor.defaultFormatter": "esbenp.prettier-vscode",
  "eslint.validate": [
      "html",
      "vue",
      "javascript",
      "typescript",
      "javascriptreact",
      "typescriptreact"
  ],
  "vetur.validation.template": false,
  "prettier.printWidth": 65536
}

ESLint

Configuration

.eslintrc.js:

module.exports = {
  root: true,
  env: {
    browser: true,
    node: true
  },
  extends: [
    "plugin:vue/recommended",
    "eslint:recommended",
    "plugin:prettier/recommended"
  ],
  parserOptions: {
    parser: "babel-eslint",
    module: "module"
  },
  rules: {
    "vue/html-self-closing": "off",
    "vue/max-attributes-per-line": "off",
    "no-console": process.env.NODE_ENV === "production" ? "error" : "off",
    "no-debugger": process.env.NODE_ENV === "production" ? "error" : "off"
  }
}

Prettier

Configuration

.prettierrc.js:

module.exports = {
  semi: false,
  printWidth: 65536,
  vueIndentScriptAndStyle: true
}

Other(s)

.browserlistrc

> 1%
last 2 versions

.editorconfig:

[*]
charset = utf-8
indent_style = space
indent_size = 2
end_of_line = lf
insert_final_newline = false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment