tslint

Deprecated TypeScript linter

TLDR

Lint files
$ tslint [file.ts]
Lint with config
$ tslint -c [tslint.json] [file.ts]
Fix automatically
$ tslint --fix [file.ts]
Lint project
$ tslint -p [tsconfig.json]
Output as JSON
$ tslint --format json [file.ts]
Lint all TypeScript
$ tslint -p . "[src/**/*.ts]"

SYNOPSIS

tslint [-c config] [-p project] [--fix] [options] files

DESCRIPTION

TSLint was a static analysis tool for TypeScript that checked code for readability, maintainability, and functional correctness. It enforced configurable rules covering style conventions, potential errors, and best practices.The tool supported automatic fixing of many rule violations and integrated with editors and CI systems. Configuration was managed through a tslint.json file that specified which rules to enable and their severity levels.TSLint was deprecated in 2019 in favor of ESLint with the typescript-eslint plugin, which provides the same TypeScript linting capabilities within the more widely adopted ESLint ecosystem.

PARAMETERS

-c FILE

Config file.
-p FILE
Project tsconfig.
--fix
Auto-fix issues.
--format FMT
Output format.
-e PATTERN
Exclude pattern.

INSTALL

yay -S tslint

CAVEATS

Deprecated in favor of ESLint. TypeScript-specific. Node.js required.

HISTORY

TSLint was the standard TypeScript linter until 2019 when the team deprecated it in favor of ESLint with TypeScript support.

SEE ALSO

eslint(1), tsc(1), prettier(1)