Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

tslint-config-m18

m18ru6MIT1.6.2

M18 config for TSLint

tslint, config, typescript, ts, m18

readme

NPM Dependencies DevDependencies

tslint-config-m18

M18 config for TSLint.

Installation

npm install --save-dev tslint tslint-config-m18

Usage

In tslint.json:

{
    "extends": "tslint-config-m18"
}

To use with type-check rules, in tslint-type-check.json:

{
    "extends": ["tslint-config-m18", "tslint-config-m18/typeCheck"]
}

And run with:

tslint -c tslint-type-check.json -p \"scripts/tsconfig.json\" --type-check

Example scripts for package.json:

{
  "scripts": {
    "lint:scripts-project": "tslint -c tslint-type-check.json -p tsconfig.json --type-check",
    "lint:scripts-other": "tslint \"{*.js,src/*.d.ts,test/*.{ts,tsx}}\"",
    "lint": "npm run lint:scripts-project && npm run lint:scripts-other"
  }
}

Rules

TSLint

Change Log

View changelog.

License

MIT.

changelog

Change Log

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog and this project adheres to Semantic Versioning.

[1.4.0] - 2017-06-07

Changed

  • Anonymous function should have space before paren.

[1.3.0] - 2017-06-07

Changed

  • tslint updated to version 5.4.3.

Added

  • Rule to prefer x + 1 over 1 + x.
  • Rule to check whether the final clause of a switch statement ends in break;.

[1.2.0] - 2017-05-12

Changed

  • Allow skipping types of parameters for arrow functions.

[1.1.0] - 2017-05-11

Added

  • Separate set of rules that require type information.

[1.0.3] - 2017-05-10

Changed

  • Allow usage of console.error.

[1.0.2] - 2017-05-10

Changed

  • Allow PascalCase for variable name format in JS (not TS).

[1.0.1] - 2017-05-10

Changed

  • Remove requiring of trailing comma in JS.

Fixed

  • tslint shoult be in peer and dev dependencies.
  • adjacent-overload-signatures rule is ts-only.