explaingit

palantir/tslint

5,908TypeScriptAudience · developerComplexity · 2/5Setup · easy

TLDR

TSLint was a static analysis (linting) tool for TypeScript that caught bugs, style issues, and bad patterns before you run your code. It is now deprecated, new projects should use typescript-eslint instead.

Mindmap

mindmap
  root((TSLint))
    Rules
      Built-in rules
      Custom rules
      Third-party packages
      Disable per line
    Configuration
      JSON config file
      Extend presets
      Override rules
    Editor Support
      VS Code
      WebStorm
      Vim and Emacs
      Sublime Atom Eclipse
    Build Tools
      Grunt
      Gulp
      MSBuild
    Auto Fix
      Style violations
      TSLint Playground
    Status
      Deprecated
      Migrate to ESLint
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Catch bugs and style problems in TypeScript code before running it, so your team ships cleaner code faster.

USE CASE 2

Enforce consistent coding rules across a team using a shared config file everyone inherits.

USE CASE 3

Automatically fix certain style issues in your codebase without manually editing files.

USE CASE 4

Reference deprecated TSLint rules when migrating an old TypeScript project to typescript-eslint.

Tech stack

TypeScriptNode.jsESLintGruntGulpMSBuild

Getting it running

Difficulty · easy Time to first run · 30min

TSLint is deprecated, use typescript-eslint for new projects. For reference or migration only: install via npm, add a tslint.json config, and run tslint against your source files.

License not mentioned in the explanation.

In plain English

TSLint was a static analysis tool for TypeScript, the typed variant of JavaScript. A linter like TSLint reads your source code without running it and flags problems: style inconsistencies, potential bugs, code that is hard to maintain, and patterns that do not follow the rules your team has agreed on. It was created by Palantir and became widely adopted across the TypeScript community. An important note at the top of the README: TSLint is deprecated. Development stopped, and the community has moved to typescript-eslint, which is a set of TypeScript-specific rules that run inside ESLint. If you are starting a new TypeScript project today, you would use typescript-eslint rather than TSLint. Existing projects using TSLint are encouraged to migrate. When it was active, TSLint supported a large set of built-in rules covering readability and functionality checks, the ability to write custom rules, multiple output formats for reporting violations, and comment flags to disable specific rules on individual lines of code. It could automatically fix certain style violations. It integrated with most editors and build tools of the era, including VS Code, WebStorm, Vim, Emacs, Sublime Text, Eclipse, Atom, Grunt, Gulp, and MSBuild. The configuration system used a JSON file where you could extend shared presets (such as tslint:latest or tslint-react) and add or override rules. A sandbox environment called TSLint Playground was available for testing rules interactively without setting up a project. Third-party rule packages extended TSLint's built-in rules. Community contributions covered areas like Angular, React, RxJS, immutability enforcement, and rules inspired by the Clean Code programming philosophy.

Copy-paste prompts

Prompt 1
What are the most important TSLint rules I should enable to catch real bugs in a TypeScript project?
Prompt 2
How do I write a custom TSLint rule that flags a specific pattern in my codebase?
Prompt 3
Show me a tslint.json config file that extends tslint:latest and adds a few custom rule overrides.
Prompt 4
What is the step-by-step process to migrate a project from TSLint to typescript-eslint?
Prompt 5
How do I disable a TSLint rule for just one line of code using a comment flag?
Open on GitHub → Explain another repo

← palantir on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.