.gitignore added
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-prettier / node_modules / tslint / README.md
1 [![NPM version](https://badge.fury.io/js/tslint.svg)](http://badge.fury.io/js/tslint)
2 [![Downloads](http://img.shields.io/npm/dm/tslint.svg)](https://npmjs.org/package/tslint)
3 [![Dependency Status](https://david-dm.org/palantir/tslint.svg)](https://david-dm.org/palantir/tslint)
4 [![devDependency Status](https://david-dm.org/palantir/tslint/dev-status.svg)](https://david-dm.org/palantir/tslint/?type=dev)
5 [![peerDependency Status](https://david-dm.org/palantir/tslint/peer-status.svg)](https://david-dm.org/palantir/tslint/?type=peer)
6 [![Circle CI](https://circleci.com/gh/palantir/tslint.svg?style=svg)](https://circleci.com/gh/palantir/tslint)
7
8 # TSLint
9
10 TSLint is an extensible static analysis tool that checks [TypeScript](https://github.com/Microsoft/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.
11
12 :warning: __TSLint will be deprecated some time in 2019__. See this issue for more details: [Roadmap: TSLint → ESLint](https://github.com/palantir/tslint/issues/4534). If you're interested in helping with the TSLint/ESLint migration, please check out our [OSS Fellowship](https://medium.com/palantir/fellowships-for-open-source-developers-3892e6b75ee1) program.
13
14 TSLint currently supports:
15
16 -   an extensive set of core rules
17 -   custom lint rules
18 -   custom formatters (failure reporters)
19 -   inline disabling and enabling of rules with comment flags in source code
20 -   configuration presets (`tslint:latest`, `tslint-react`, etc.) and plugin composition
21 -   automatic fixing of formatting & style violations
22 -   integration with [MSBuild](https://github.com/joshuakgoldberg/tslint.msbuild), [Grunt](https://github.com/palantir/grunt-tslint), [Gulp](https://github.com/panuhorsmalahti/gulp-tslint), [Atom](https://github.com/AtomLinter/linter-tslint), [Eclipse](https://github.com/palantir/eclipse-tslint), [Emacs](https://www.flycheck.org/), [Sublime](https://packagecontrol.io/packages/SublimeLinter-contrib-tslint), [Vim](https://github.com/scrooloose/syntastic), [Visual Studio 2015](https://marketplace.visualstudio.com/items?itemName=MadsKristensen.WebAnalyzer), [Visual Studio 2017](https://marketplace.visualstudio.com/items?itemName=RichNewman.TypeScriptAnalyzer), [Visual Studio code](https://marketplace.visualstudio.com/items?itemName=ms-vscode.vscode-typescript-tslint-plugin) (alternative: use [this extension](https://marketplace.visualstudio.com/items?itemName=eg2.tslint) for TS <3.2), [WebStorm](https://www.jetbrains.com/webstorm/help/tslint.html) and [more](https://palantir.github.io/tslint/usage/third-party-tools/)
23
24 ## Installation & Usage
25
26 Please refer to the full installation & usage documentation on the [TSLint website](https://palantir.github.io/tslint/). There, you'll find information about
27
28 -   [configuration](https://palantir.github.io/tslint/usage/configuration/),
29 -   [core rules](https://palantir.github.io/tslint/rules/),
30 -   [core formatters](https://palantir.github.io/tslint/formatters/), and
31 -   [customization of TSLint](https://palantir.github.io/tslint/develop/custom-rules/).
32 -   [inline disabling and enabling of rules with comment flags](https://palantir.github.io/tslint/usage/rule-flags/)
33
34 ## TSLint Playground
35
36 There is a sandbox environment for TSLint at [palantir.github.io/tslint-playground](https://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](https://github.com/palantir/tslint-playground).
37
38 ## Custom Rules & Plugins
39
40 #### Custom rule sets from Palantir
41
42 -   [tslint-react](https://github.com/palantir/tslint-react) - Lint rules related to React & JSX.
43 -   [tslint-blueprint](https://github.com/palantir/tslint-blueprint) - Lint rules to enforce best practices with [blueprintjs libraries](https://github.com/palantir/blueprint)
44
45 #### Custom rule sets from the community
46
47 If we don't have all the rules you're looking for, you can either write your own [custom rules](https://palantir.github.io/tslint/develop/custom-rules/) or use rules implementations developed by the community. The repos below are a good source of custom rules:
48
49 -   [ESLint rules for TSLint](https://github.com/buzinas/tslint-eslint-rules) - Improve your TSLint with the missing ESLint Rules
50 -   [tslint-microsoft-contrib](https://github.com/Microsoft/tslint-microsoft-contrib) - A set of TSLint rules used on some Microsoft projects
51 -   [codelyzer](https://github.com/mgechev/codelyzer) - A set of tslint rules for static code analysis of Angular TypeScript projects
52 -   [vrsource-tslint-rules](https://github.com/vrsource/vrsource-tslint-rules)
53 -   [tslint-immutable](https://github.com/jonaskello/tslint-immutable) - TSLint rules to disable mutation in TypeScript
54 -   [tslint-consistent-codestyle](https://github.com/ajafff/tslint-consistent-codestyle) - TSLint rules to enforce consistent code style in TypeScript
55 -   [tslint-sonarts](https://github.com/SonarSource/SonarTS) - Bug-finding rules based on advanced code models to spot hard to find errors in TypeScript
56 -   [tslint-clean-code](https://github.com/Glavin001/tslint-clean-code) - A set of TSLint rules inspired by the Clean Code handbook
57 -   [rxjs-tslint-rules](https://github.com/cartant/rxjs-tslint-rules) - TSLint rules for RxJS
58
59 ## Development
60
61 Prerequisites:
62
63 -   `node` v7+
64 -   `yarn` v1.0+
65
66 #### Quick Start
67
68 ```bash
69 git clone git@github.com:palantir/tslint.git --config core.autocrlf=input --config core.eol=lf
70 yarn
71 yarn compile
72 yarn test
73 ```