You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+34Lines changed: 34 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -12,6 +12,10 @@ On new folders you might also need to create a `.eslintrc` configuration file. Y
12
12
13
13
This section describes major releases and their improvements. For a detailed list of changes please refer to the [change log](./CHANGELOG.md).
14
14
15
+
### Version 2.2.0
16
+
17
+
Added support for ESLint V8.0 Beta. This release also switch to the ESLint class API that got introduced in version 7. In addition the rules taken into consideration during code action on save can now be configured.
18
+
15
19
### Version 2.1.22
16
20
17
21
Adapt VS Code's workspace trust model. As a consequence the custom dialog ESLint introduced in version `2.1.7` got removed. In addition the `off` value got added to the eslint rule customization support.
@@ -180,6 +184,36 @@ This extension contributes the following variables to the [settings](https://cod
180
184
- `all`: fixes all possible problems by revalidating the file's content. This executes the same code path as running eslint with the `--fix` option in the terminal and therefore can take some time. This is the default value.
181
185
- `problems`: fixes only the currently known fixable problems as long as their textual edits are non overlapping. This mode is a lot faster but very likely only fixes parts of the problems.
182
186
187
+
- `eslint.codeActionsOnSave.rules` (@since 2.2.0): controls the rules which are taken into consideration during code action on save execution. If not specified all rules specified via the normal ESLint configuration mechanism are consider. An empty array results in no rules being considered. If the array contains more than one entry the order matters and the first match determines the rule's on / off state.
188
+
189
+
In this example only semicolon related rules are considered:
190
+
191
+
```json
192
+
"eslint.codeActionsOnSave.rules": [
193
+
"*semi*"
194
+
]
195
+
```
196
+
197
+
This example removes all TypeScript ESLint specific rules from the code action on save pass but keeps all other rules:
198
+
199
+
```json
200
+
"eslint.codeActionsOnSave.rules": [
201
+
"!@typescript-eslint/*",
202
+
"*"
203
+
]
204
+
```
205
+
206
+
This example keeps the indent and semi rule from TypeScript ESLint, disables all other TypeScript ESLint rules and keeps the rest:
207
+
208
+
```json
209
+
"eslint.codeActionsOnSave.rules": [
210
+
"@typescript-eslint/semi",
211
+
"@typescript-eslint/indent",
212
+
"!@typescript-eslint/*",
213
+
"*"
214
+
]
215
+
```
216
+
183
217
-`eslint.rules.customizations` (@since 2.1.20): force rules to report a different severity within VS Code compared to the project's true ESLint configuration. Contains two properties:
184
218
-`"rule`": Select on rules with names that match, factoring in asterisks as wildcards: `{ "rule": "no-*", "severity": "warn" }`
185
219
- Prefix the name with a `"!"` to target all rules that _don't_ match the name: `{ "rule": "!no-*", "severity": "info" }`
0 commit comments