Webpack loader for TSLint, version 3.5.4, last updated in 2019. Integrates TSLint into webpack build pipeline to lint TypeScript files during compilation. Supports custom config files, type-checked rules, formatters, and file output. Compatible with webpack 1-4, but requires TSLint >=4.0.0. Key differentiator: seamlessly adds linting as a pre-loader step in webpack, with options to emit errors or fail builds on hints. Less active now due to TSLint deprecation in favor of ESLint with TypeScript.
npm install tslint-loaderVerified import paths — ran on the pinned version, not inferred.
Configures tslint-loader as a pre-loader in webpack to lint all .ts files before compilation, with options for type checking and error handling.
Use eslint-loader with @typescript-eslint/parser and @typescript-eslint/eslint-plugin.
Update TSLint to version 4.0.0 or higher.
Set enforce: 'pre' in the rule configuration.
Use appropriate configuration syntax for your webpack version.
Ensure tsconfig.json exists and contains necessary compiler options.
Use webpack 3 or lower, or switch to eslint-loader.
Run 'npm install --save-dev tslint tslint-loader'.
Set configFile to a string like 'tslint.json' or false.
Run 'npm install --save-dev tslint'.