Vscode-eslint: Please mention editor.codeActionsOnSave > source.fixAll.eslint in the settings.json autoconverter popup

Created on 17 Dec 2019  路  2Comments  路  Source: microsoft/vscode-eslint

As I understand the former eslint.autoFixOnSave has been deprecated and now we should use editor.codeActionsOnSave with a key of source.fixAll.eslint instead. That's fine, but the current way the settings.json file is converted automatically can be quite confusing.

If the old eslint.autoFixOnSave is present in settings.json, a new editor.codeActionsOnSave is added automatically to the end of that settings file. Trying to toggle that new option is very confusing, as its value is forced from the deprecated setting:

Peek 2019-12-17 15-35

The popup however does not mention the new setting (source.fixAll.eslint) at all, whereas the README linked in the popup does not mention the old setting at all (autoFixOnSave). We are left to make that connection ourselves somehow, which can be tough if you rarely ever touch these settings.

I think just adding those mentions would help a lot with "transitioning" settings like this.

Thanks!

Most helpful comment

@cb109 very good catch and suggestion. I should document that in the read me and in addition don't convert if the setting is set actively to false.

All 2 comments

@cb109 very good catch and suggestion. I should document that in the read me and in addition don't convert if the setting is set actively to false.

I added a confirmation dialog to inform the user about the conversion.

Was this page helpful?
0 / 5 - 0 ratings