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

Package detail

tslint-config-common

streamich2k1.6.2

Common TSLint config

tslint, config

readme

Linting setup for TypeScript project

  • TSLint
  • Prettier
  • Commitlint

Usage

Install dependencies

yarn add --dev tslint-config-common tslint typescript prettier pretty-quick husky @commitlint/cli @commitlint/config-conventional

Run below command to add necessary scripts to package.json.

yarn global add climod-add-script \
  && climod-add-script --name=tslint --cmd="tslint 'src/**/*.{js,jsx,ts,tsx}' -t verbose" \
  && climod-add-script --name=prettier --cmd="prettier --ignore-path .gitignore --write 'src/**/*.{ts,tsx,js,jsx}'" \
  && climod-add-script --name="prettier:diff" --cmd="prettier -l 'src/**/*.{ts,tsx,js,jsx}'" \
  && climod-add-script --name=commitmsg --cmd="commitlint -E GIT_PARAMS" \
  && climod-add-script --name=precommit --cmd="pretty-quick --staged && yarn tslint" \
  && climod-add-script --name=prepush --cmd="yarn prettier:diff"

Or add those scripts manually.

{
  "scripts": {
    "tslint": "tslint 'src/**/*.{js,jsx,ts,tsx}' -t verbose",
    "prettier": "prettier --ignore-path .gitignore --write 'src/**/*.{ts,tsx,js,jsx}'",
    "prettier:diff": "prettier -l 'src/**/*.{ts,tsx,js,jsx}'",
    "commitmsg": "commitlint -E GIT_PARAMS",
    "precommit": "pretty-quick --staged && yarn tslint",
    "prepush": "yarn prettier:diff"
  }
}

changelog

1.6.0 (2018-11-29)

Features

1.5.0 (2018-11-25)

Features

  • remove no-inferrable-types (ac9aac7)

1.4.0 (2018-11-25)

Features

  • don't ask user to await before return (a46b345)

1.3.0 (2018-11-25)

Features

  • disable couple of dynamic deletes and null assertion (c69cd2e)

1.2.0 (2018-11-05)

Features

  • don't require newline before return (d8a7efd)

1.1.1 (2018-10-28)

Bug Fixes

  • 🐛 move disabled rules to the end (9697fba)

1.1.0 (2018-10-28)

Bug Fixes

  • 🐛 remove disable rule twice (82723e3)

Features

  • 🎸 disable some rules (4851b3d)

1.0.0 (2018-08-08)

Features