6.2.0 • Published 5 years ago

tslint-microsoft-contrib v6.2.0

Weekly downloads
325,765
License
MIT
Repository
github
Last release
5 years ago

tslint-microsoft-contrib

npm version Downloads TravisCI Build Status Azure Pipelines Build Status Join the chat at https://gitter.im/Microsoft/tslint-microsoft-contrib code style: prettier

A set of TSLint rules used on some Microsoft projects.

Installation

npm install tslint-microsoft-contrib --save-dev

TSLint and corresponding tslint-microsoft-contrib version

TSLint versiontslint-microsoft-contrib version
>= 5.x5.x and 6.x (supporting TypeScript 2.3.x, >=2.4, 3.x)
>= 4.x4.x (supporting TypeScript 2.1.x)
>= 3.2.x2.x
3.1.xunsupported
3.0.xunsupported
2.x1.x

Configuration

Add "node_modules/tslint-microsoft-contrib" under your "rulesDirectory" configuration to inform TSLint it should look under this package for additional rules in your tslint.json:

{
    "rulesDirectory": ["node_modules/tslint-microsoft-contrib"],
    "rules": {
        // ...
    }
}

Which Rules Should I Turn On?

There certainly are a lot of options!

If you extend from one of the following configurations, rulesDirectory will have node_modules/tslint-microsoft-contrib included for you.

Please note, some of the default ruleset rules require the --project TSLint option.

Recommended

To start, you can enable our stable "recommended" defaults that come with tslint-microsoft-contrib (recommended.json) by adding "tslint-microsoft-contrib/recommended" under "extends" in your tslint.json:

{
    "extends": ["tslint-microsoft-contrib/recommended"]
    // ...
}

These rules will not be added to in minor or patch releases, but will be in major releases.

Latest

To run with the latest and greatest rules (latest.json), extend from tslint-microsoft-contrib/latest:

{
    "extends": ["tslint-microsoft-contrib/latest"]
    // ...
}

These rules will not be added to in patch releases, but will be in minor releases.

Legacy

The old "recommended" ruleset that ships by extending tslint-microsoft-contrib itself contains a list of rules that includes core TSLint rules.

To start, you can enable our recommended defaults (recommended.json) by adding just "tslint-microsoft-contrib" under "extends" in your tslint.json:

{
    "extends": ["tslint-microsoft-contrib"]
    // ...
}

This ruleset is considered legacy; it is generally preferable to extend from the 'recommended' or 'latest' rulesets. We recommend you instead explicitly include tslint:recommended, tslint:latest, or tslint:all in your tslint.json rather than enable core rules through this configuration.

In the next major version of TSLint, this will instead be an alias for "tslint-microsoft-contrib/recommended".

Overriding Configurations

You can disable rules you don't find useful.

If you rely on version ranges in your dependencies then you may find that new rules being added to the product create violations and fail your build. We recommend you specify exact versions of lint libraries, including tslint-microsoft-contrib, in your package.json.

Supported Rules

Development

See CONTRIBUTING.md.

Release notes

Check GitHub Releases for individual release notes or CHANGELOG.md for full project changelog.

@severen/tslint-configkelvin-id-generator-aws-xrayotel-aws-xray-id-generator@bolder/tslint-config@tsukiy0/tslint-rules@ngxa/rulestslint-config-escapace@airship/tslint-react-a11y@infinitebrahmanuniverse/nolb-tsl@postmates/tslint-config@everything-registry/sub-chunk-2982lynt@uifabric/tslint-rules@tradie/node-scripts@uhc/tslint-config-uhc@tinkoff/linters@ukho/ts-codestyle@shiftcode/translation-markup-loader@shiftcode/translation-markup-plugin@sinos/config@springworks/tslint-config@strictr/tslint-config@ssense/tslint-config@starlab/tslint-config@superevilmegaco/superevil-tslint-config-airbnb@swellaby/tslint-config@zaihui/tslint-config-baseangular-strict-tslint-rules@amplience/sap-product-browser@ark120202/tslint-config@3angletech/tslint@aaronchenwei/tslint-configconnect-build@davidnhk/tslint-config-david-recommendedconverteer@dex-rules/tslint-rules@briisk/tslint-config@braces/tslint-config@braces/tslint-config-airbnb@callstack/tslint-config@gentlemen/tslint-config-gentlemanquiafugapractical-tslint-config@clearpeaks/tslint-configzoottelkeepertslint-config-gentlemantslint-config-globalidtslint-config-envatotslint-config-fdiotslint-config-fideetslint-config-genttslint-config-bit2metslint-config-blvdtslint-config-clean-codetslint-config-inmotionnowtslint-config-lddubeautslint-config-david-recommendedtslint-config-dawntslint-config-dcardtslint-config-airbnbtslint-config-appsontslint-config-lynt-react-typedtslint-config-nbstslint-config-niftytslint-config-nokatslint-config-trucknet-iotslint-config-videoamptslint-config-visibacaretslint-config-plustwotslint-config-poeteztslint-config-redpandatslint-config-replicatedtslint-config-shadowmanutslint-config-spartancodetslint-config-xotslint-config-mrmlnctslint-config-ms-recommendedtslint-config-tinkofftslint-config-triboutslint-neosofttslint-react-a11ytslint-secoyatslint-haezl-nodetslint-haezl-reacttslint-wix-reacttslint-xotslint-stricttranslation-markup-loadertypestrictxxi-tslint-rulesutransfer-tslintslime-tslint-rulesspk-cachestricter-tslint-config@celo/typescript@credsimple/run-scripts@heydovetail/tslint-configemmaramirez.medanthedev-code-style@dock365/tslint-config
6.2.0

5 years ago

6.2.0-beta

5 years ago

6.1.1

5 years ago

6.1.1-beta1

5 years ago

6.1.1-beta

5 years ago

6.1.0

5 years ago

6.1.0-beta2

5 years ago

6.1.0-beta

5 years ago

6.0.0

5 years ago

6.0.0-beta

5 years ago

5.2.1

6 years ago

5.2.0

6 years ago

5.1.0

6 years ago

5.0.3

6 years ago

5.0.2

6 years ago

5.0.1

7 years ago

5.0.0

7 years ago

4.0.1

7 years ago

4.0.0

7 years ago

2.0.14

7 years ago

2.0.13

7 years ago

2.0.12

8 years ago

2.0.11

8 years ago

2.0.10

8 years ago

2.0.9

8 years ago

2.0.8

8 years ago

2.0.7

8 years ago

2.0.6

8 years ago

2.0.5

8 years ago

2.0.3

8 years ago

2.0.2

8 years ago

2.0.1

8 years ago

2.0.0

8 years ago

1.0.0

8 years ago

0.0.4

9 years ago

0.0.3

9 years ago

0.0.1

9 years ago