Skip to content

Should we have an option to generate editor-specific workspace files, like a .vscode folder? #818

Closed
@chrisvfritz

Description

@chrisvfritz

I often do this for clients and they tend to find it very helpful. For example, in a project that uses SCSS, ESLint, Stylelint, Prettier, and Jest, these are some settings that basically everyone tends to want for .vscode/settings.json:

{
  // ===
  // GENERAL FORMATTING
  // ===
  "editor.formatOnSave": true,
  // ===
  // HTML
  // ===
  "html.format.enable": false,
  "html.suggest.angular1": false,
  "html.suggest.ionic": false,
  "vetur.validation.template": false,
  "vetur.format.defaultFormatter.html": "none",
  // ===
  // JS(ON)
  // ===
  "javascript.format.enable": false,
  "json.format.enable": false,
  "eslint.run": "onSave",
  "eslint.autoFixOnSave": true,
  "eslint.validate": ["javascript", "javascriptreact", "vue"],
  "vetur.validation.script": false,
  "vetur.format.scriptInitialIndent": false,
  "vetur.format.defaultFormatter.js": "prettier",
  "prettier.eslintIntegration": true,
  // ===
  // CSS
  // ===
  "stylelint.enable": true,
  "stylelint.additionalDocumentSelectors": ["vue"],
  "css.validate": false,
  "scss.validate": false,
  "vetur.validation.style": false,
  "vetur.format.styleInitialIndent": false,
  "vetur.format.defaultFormatter.css": "prettier",
  "vetur.format.defaultFormatter.scss": "prettier",
  "vetur.format.defaultFormatter.postcss": "prettier",
  "prettier.stylelintIntegration": true
}

And some recommended extensions in .vscode/extensions.json:

{
  // See http://go.microsoft.com/fwlink/?LinkId=827846
  // for the documentation about the extensions.json format
  "recommendations": [
    // Syntax highlighting and more for .vue files
    // https://github.com/vuejs/vetur
    "octref.vetur",
    // Lint-on-save with ESLint
    // https://github.com/Microsoft/vscode-eslint
    "dbaeumer.vscode-eslint",
    // Lint-on-save with Stylelint
    // https://github.com/shinnn/vscode-stylelint
    "shinnn.stylelint",
    // Format-on-save with Prettier
    "esbenp.prettier-vscode",
    // SCSS intellisense
    "mrmlnc.vscode-scss",
    // Test `.spec.js` files on save with Jest
    "Orta.vscode-jest"
  ]
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions