0.0.0-SEMANTICALLY-RELEASED • Published 4 years ago

eslint-ts-config-mailonline v0.0.0-SEMANTICALLY-RELEASED

Weekly downloads
-
License
MIT
Repository
github
Last release
4 years ago

eslint-ts-config-mailonline

NPM version Travis build status

MailOnline ESlint Typescript configuration.

Usage

Add eslint-ts-config-mailonline, eslint, typescript, prettier, husky, and pretty-quick as development dependencies:

yarn add --dev eslint-ts-config-mailonline eslint typescript prettier husky pretty-quick

Create ESLint configuration file (.eslintrc.json) that extends eslint-ts-config-mailonline:

{
  "extends": "eslint-ts-config-mailonline"
}

Create prettier.config.js on the root of your project with these contents:

module.exports = require('eslint-ts-config-mailonline/prettier');

Add the following script command to your package.json:

{
  "lint": "tsc --noEmit && eslint --ignore-path .gitignore './**/*.{js,jsx,ts,tsx}'"
}

and the following pre-commit hook:

"husky": {
  "hooks": {
    "pre-commit": "pretty-quick --staged && yarn run lint"
  }
}

Extended configs

The package also has separate entry points for some environments. Simply extend from the entry point as described below

{
  "extends": ["eslint-ts-config-mailonline", "eslint-ts-config-mailonline/react"]
}

react

{
  "extends": "eslint-ts-config-mailonline/react"
}

Breaking changes

Any changes to this package that might cause code using it to not validate anymore, will be a semver-major change.