microsoft / vscode-typescript-tslint-plugin

VS Code extension that provides TSLint support using the typescript-tslint-plugin
https://marketplace.visualstudio.com/items?itemName=ms-vscode.vscode-typescript-tslint-plugin
MIT License
188 stars 35 forks source link

Some workspace and user settings are ignored #62

Closed tjahn closed 1 year ago

tjahn commented 5 years ago

Hello,

I was trying to set "tslint.ignoreDefinitionFiles" to false. However, unmarking the checkbox in the User-Settings or Workspace-Settings of Visual Studio 3.31.1 has no effect. Unmarking the checkbox results in the setting to be undefined, instead of being set to false explicitly. Inserting the settings in json-mode is working.

Also, the check-box is unchecked by default, but the plugin manual says, that its default is true. It's probably necessary to tell VSCode about this default value or something to fix that.

Many thanks for the plugin

tjahn commented 5 years ago

I see that there is some code in the indes.js of the extension like:

    // Make sure the user has actually set the value.
    // VS Code will return the default values instead of `undefined`, even if user has not don't set anything.
    if (typeof configSetting.globalValue === 'undefined' && typeof configSetting.workspaceFolderValue === 'undefined' && typeof configSetting.workspaceValue === 'undefined') {
        return;
    }

This code does not let "false" values pass if they are encoded as undefined. Also it results the checkboxes in vscodes settings to be checked wrong if the default value of the parameter is supposed to be true.

tjahn commented 5 years ago

Rob Laurens from https://github.com/Microsoft/VSCode wrote:

When a setting is set to its default, we remove it from the settings file. It looks like that setting doesn't have a default declared so we would assume it's false. If it's actually true, they should declare the setting with that default. Could you file an issue on that extension?

mjbvz commented 5 years ago

What we want a three state value for these settings: true, false, and unset, with unset falling back to use the configuration from the tsconfig.json

With the current design of the settings UI, we cannot tell false from unset. Not sure what the best way to fix this is

mjbvz commented 1 year ago

Closing as TSLint has been deprecated in favor of ESLint and this extension is no longer being maintained

Please look into migrating to use ESLint and the ESLint VS Code extension