Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
chrisvfritz opened this issue Feb 9, 2018 · 1 comment

Comments

@chrisvfritz
Copy link
Contributor

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"
  ]
}
@yyx990803
Copy link
Member

I think the core should stay editor agnostic - I believe this can be implemented as separate plugins for dedicated editors.

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

No branches or pull requests

2 participants