JSPM

@visuallylab/tslint-config-frontend

1.0.13
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 9
  • Score
    100M100P100Q82538F
  • License MIT

Lint rules related to web frontend development using React

Package Exports

  • @visuallylab/tslint-config-frontend

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@visuallylab/tslint-config-frontend) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

tslint-config-frontend

Lint rules related to web frontend development using React

Prerequisite

  1. tslint
  2. typescript
  3. prettier

Usage

Follow these steps to use the rules in tslint, and enable the pre-commit hook.

  1. Install the package
npm install --save-dev @visuallylab/tslint-config-frontend lint-staged husky

or

yarn add --dev @visuallylab/tslint-config-frontend lint-staged husky
  1. Add config in tslint.json
{
  "extends": "@visuallylab/tslint-config-frontend"
}
  1. Add configs to the package.json of your project
{
  "husky": {
    "hooks": {
      "pre-commit": "lint-staged"
    }
  },
  "lint-staged": {
    "*.{ts,tsx,js,json,css,md}": ["prettier --write", "git add"]
  },
  "prettier": {
  "singleQuote": true,
  "jsxSingleQuote": false,
  "trailingComma": "all"
  }
}