1.0.2 • Published 3 years ago

@kevinbai/lint-rules v1.0.2

Weekly downloads
-
License
ISC
Repository
-
Last release
3 years ago

Custom ESLint rules

Rules are based on @rushstack/eslint-config

Installation

npm i -D @kevinbai/lint-rules

Add .eslintrc

Choose the appropriate profile depending on the project

// .eslintrc
{
  "extends": "./node_modules/@kevinbai/lint-rules/onde/.eslintrc.js"
}

Add .prettierrc

//.prettierrc
"@kevinbai/lint-rules/.prettierrc.json"

Add .eslintignore

node_modules
...any other files

Add lint script to package.json

{
  "scripts": {
    "lint": "eslint . --fix"
  }
}
// or eslint src --fix

Profiles

  • Node: @kevinbai/lint-rules/node/.eslintrc.js
  • React: @kevinbai/lint-rules/react/.eslintrc.js