Skip to content

Commit a9271c3

Browse files
committed
Add QA item about enabling fix-on-save
1 parent be2f9ba commit a9271c3

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,16 @@ Q: How to enable linting of Typescript code?
2727

2828
A: Make sure that eslint configuration in your project has `typescript-eslint` plugin configured. See https://github.com/typescript-eslint/typescript-eslint for more information.
2929

30+
Q: How to enable eslint to fix all issues automatically on saving the file?
31+
32+
A: Open `Preferences: LSP Settings` from the command palette and add or modify the following setting:
33+
34+
```js
35+
"lsp_code_actions_on_save": {
36+
"source.fixAll.eslint": true,
37+
},
38+
```
39+
3040
Q: How to use this in a Yarn 2 project?
3141

3242
A: Install ESLint in the project, run `yarn dlx @yarnpkg/pnpify --sdk base` ([docs](https://yarnpkg.com/advanced/editor-sdks)) and set `settings.nodePath` to `.yarn/sdks` either in `LSP-eslint`'s settings or, if you have other non-Yarn-2 projects, in your `.sublime-project`:

0 commit comments

Comments
 (0)