@lego/tslint-config-prettier
TypeScript icon, indicating that this package has built-in type declarations

3.0.0 • Public • Published

@lego/tslint-config-prettier

Purpose

This is a stand-alone all-round configuration that inherits prettier configurations from @lego/prettier-config and is tailored towards usage with tslint.

If you want to use your own tslint ruleset without the other packages like @lego/tslint-config then you should install this package, otherwise refer to the aforementioned.

Installation

Install this config package:

npm i -D @lego/tslint-config-prettier

Usage

Extend your tslint.json, and make sure @lego/tslint-config-prettier is at the end:

{
  "extends": ["tslint:latest", "@lego/tslint-config-prettier"]
}

Rules

This package currently implements rules from the following tslint extensions:

Overriding Rules

With the above tslint.json configuration example, you can still use or override already defined rules as such:

{
  "extends": ["tslint:latest", "@lego/tslint-config-prettier"],
  "rules": {
    "prettier": [true, {
      "printWidth": 100,
      "semi": true,
      "singleQuote": true,
      "trailingComma": "es5",
      "arrowParens": "always",
      "proseWrap": "preserve"',
    }],
  }
}

Package Sidebar

Install

npm i @lego/tslint-config-prettier

Weekly Downloads

16

Version

3.0.0

License

MIT

Unpacked Size

15.2 kB

Total Files

9

Last publish

Collaborators

  • mbogh
  • xshteff
  • vincentbriglia
  • giovannidegani