LinuxCommandLibrary

tslint

Deprecated TypeScript linter

TLDR

Lint files

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

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.

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)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community