

To run this, either run the Source Action. Some simple errors can be automatically fixed by tslint using the source code action in VS Code. Tslint.suppressWhileTypeErrorsPresent - Suppress tslint errors from being reported while other errors are present. Tslint.alwaysShowRuleFailuresAsWarnings - Always show rule failures as warnings, ignoring the severity configuration in the tslint.json configuration. Any file matching these globs will not be linted. Tslint.exclude - A glob or an array of globs. Tslint.ignoreDefinitionFiles - Control if TypeScript definition files should be ignored. Tslint.jsEnable - Enable/disable tslint for. A relative file path is resolved relative to the project root. nfigFile - The configuration file that tslint should use instead of the default tslint.json. Note the VS Code based configuration overrides the tsconfig or jsconfig configuration.

You can either configure the TSLint extension using a tsconfig or jsconfig as described here, or configure it with VS Code settings.

You can click on the status bar entry to configure Workspace Library Execution as well. If the extension detects a workspace version of TSLint, it will show a warning in the editor and in the status bar. Use a workspace version of TypeScript that is installed alongside TSLint.Įnable workspace library execution by running the TSLint: Manage Workspace Library Execution command. To use enable using a local TSLint install and custom rules from the workspace, you must either: The extension always allows using globally installed versions of TSLint ( npm install -g tslint). If you are using VS Code 1.30 or older and are using a workspace version of typescript, you must currently configure the TS Server plugin manually by following these instructions Workspace Library Executionīy default this extension will not load TSLint or custom rules from your workspace if you are using a global version of TypeScript. You do not need to configure the plugin in your tsconfig.json if you are using VS Code's version of TypeScript. This extension works using VS Code's built-in version of TypeScript and a local or global install of tslint. ❗ Important: If you also have the vscode-tslint extension in VS Code installed, please disable it to avoid linting files twice.* Please refer to the tslint documentation for how to configure the linting rules. Please look into migrating your projects to ESLint.Īdds tslint to VS Code using the TypeScript TSLint language service plugin. ❗IMPORTANT: TSLint has been deprecated in favor of ESLint and this extension has also been deprecated in favor of ESLint's tooling.
