1.0.0 • Published 6 years ago

@twostoryrobot/eslint v1.0.0

Weekly downloads
1
License
MIT
Repository
github
Last release
6 years ago

2SR eslint

Usage

Installing the package will make a symlink in the root of your project to the eslint config in this repo. It is recommended to add .eslintrc.js to your .gitignore so you don't accidentally commit the symlink.

npm install @twostoryrobot/eslint

Make sure to install the peer dependencies

npm install eslint eslint-plugin-jest

Scripts

Now you can add a script to your project's package.json that calls eslint and it will reference the config file in the root of your project directory.

"scripts": {
  "eslint": "eslint '**/*.js'"
}

Hooks

If you install husky you can invoke eslint as a hook for various actions (precommit, prepush, etc)

"scripts": {
  "precommit": "eslint '**/*.js'"
}