tshint

0.0.2 • Public • Published

tshint

super simple and lightweight zero-config linter for ts and js projects.

Intro

tshint is a zero-config linter based on eslint, with all the recommended rules built inside. By default, the base presets include

  • eslint:recommended
  • @typescript-eslint/recommended
  • @typescript-eslint/recommended-requiring-type-checking

Install

install tshint along with typescript

yarn add -D tshint typescript

Usage

Configure in package.json

{
  "scripts": {
    "lint": "tshint",
    "lint:fix": "tshint --fix", // lint and apply fixes
    "lint:src": "tshint src/**/*" // lint specific files
  }
}

Run lint with yarn scripts

yarn lint

Command Line Arguments

--fix: apply fixes onto the files

Custom Eslint Configurations

Eslint config fields extends, plugins and rules are available to be configured in eslintConfig field from package.json. They will be merged with default rules in tshint.

package.json

{
  "eslintConfig": {
    "plugins": [
      "jest"
    ],
    "extends": [
      "plugin:jest/recommended"
    ]
  }
}

Readme

Keywords

none

Package Sidebar

Install

npm i tshint

Weekly Downloads

42

Version

0.0.2

License

MIT

Unpacked Size

7.25 kB

Total Files

4

Last publish

Collaborators

  • huozhi