Socket
Socket
Sign inDemoInstall

tslint

Package Overview
Dependencies
46
Maintainers
1
Versions
182
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    tslint

An extensible static analysis linter for the TypeScript language


Version published
Weekly downloads
1.6M
decreased by-22.23%
Maintainers
1
Install size
3.81 MB
Created
Weekly downloads
 

Package description

What is tslint?

The tslint npm package is a static analysis tool that checks TypeScript code for readability, maintainability, and functionality errors. It is widely used to enforce a consistent code style by checking the code against a set of linting rules.

What are tslint's main functionalities?

Linting TypeScript Files

This feature allows you to lint TypeScript files by specifying a configuration file and a pattern to match files. The command will process all TypeScript files in the 'src' directory and its subdirectories.

tslint -c tslint.json 'src/**/*.ts'

Fixing Linting Errors Automatically

This feature automatically fixes linting errors that can be corrected without human intervention. It is useful for fixing simple issues like whitespace or semicolon usage.

tslint --fix -c tslint.json 'src/**/*.ts'

Custom Rules

This feature allows you to use custom linting rules in addition to the predefined rules. You can specify a directory containing custom rule definitions to be applied to your code.

tslint -c tslint.json 'src/**/*.ts' --rules-dir custom_rules

Other packages similar to tslint

Changelog

Source

v6.1.3

  • [bugfix] add support for TypeScript 4.0 peer dependency (#4943)

Readme

Source

NPM version Downloads Dependency Status devDependency Status peerDependency Status Circle CI

TSLint

:warning: TSLint is deprecated.

See this issue for more details: Roadmap: TSLint → ESLint. If you're interested in helping with the TSLint/ESLint migration, please check out our OSS Fellowship program.

TSLint is an extensible static analysis tool that checks TypeScript code for readability, maintainability, and functionality errors. It is widely supported across modern editors & build systems and can be customized with your own lint rules, configurations, and formatters.

TSLint currently supports:

Installation & Usage

Please refer to the full installation & usage documentation on the TSLint website. There, you'll find information about

TSLint Playground

There is a sandbox environment for TSLint at palantir.github.io/tslint-playground, which can be used to test rules and see how TSLint works. Issues can be filed against tslint-playground here.

Custom Rules & Plugins

Custom rule sets from Palantir
Custom rule sets from the community

If we don't have all the rules you're looking for, you can either write your own custom rules or use rules implementations developed by the community. The repos below are a good source of custom rules:

Development

Prerequisites:

  • node v7+
  • yarn v1.0+
Quick Start
git clone git@github.com:palantir/tslint.git --config core.autocrlf=input --config core.eol=lf
yarn
yarn compile
yarn test

Keywords

FAQs

Last updated on 31 Jul 2020

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc