Skip to content
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

Support editor.codeActionsOnSave #80

Closed
auxves opened this issue Mar 20, 2020 · 1 comment
Closed

Support editor.codeActionsOnSave #80

auxves opened this issue Mar 20, 2020 · 1 comment

Comments

@auxves
Copy link

auxves commented Mar 20, 2020

With the ESLint, TSLint, and StyleLint extensions, there are code actions that fix all auto-fixable problems when saving. It would be great if this extension supported it as well.

Example

// settings.json

{
  "editor.codeActionsOnSave": {
    "source.fixAll.xo": true
  }
}
@sheedy
Copy link

sheedy commented Aug 20, 2020

@arnohovhannisyan It works with these settings:

"xo.enable": true,
"xo.format.enable": true,
"editor.defaultFormatter": "samverschueren.linter-xo",
"[javascript]": {
  "editor.formatOnSave": true,
  "editor.codeActionsOnSave": {
    "source.fixAll": true
  },
  "editor.defaultFormatter": "samverschueren.linter-xo"
}

I also duplicate the [javascript] for [javascriptreact].

@auxves auxves closed this as completed Aug 20, 2020
alex-page pushed a commit to alex-page/vscode-linter-xo that referenced this issue Feb 27, 2021
Right now the readme has how to enable and format with xo. This doesn't format on save as mentioned in this issue xojs#80. This documentation adds a simple configuration to format on save.

I was thinking about replacing the previous section but wasn't entirely sure that would be the best approach.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants