eslint-config-mfb-node
Version:
My Food Bag's ESLint configuration for Node.js code
40 lines (25 loc) • 1.07 kB
Markdown
# eslint-config-mfb-node [](https://travis-ci.org/MyFoodBag/eslint-config-mfb-node)
[My Food Bag](https://github.com/MyFoodBag)'s [ESLint](http://eslint.org/) configuration for Node.js code.
## Installation
```
npm install --save-dev eslint-config-mfb-node
```
or
```
yarn add -D eslint-config-mfb-node
```
Add `"extends": "mfb-node"` to your `.eslintrc`, e.g.
```json
{
"extends": "mfb-node",
"rules": {
}
}
```
## Git hooks
You can add a pre-commit [hook](https://www.atlassian.com/git/tutorials/git-hooks/) that will check your code before you commit it.
A bash script, `pre-commit.sh`, is provided with this repository that you can optionally enable by linking to it from the root directory of your project like this:
```bash
$ ln -s ../../pre-commit.sh .git/hooks/pre-commit
```
n.b. This will not run in Source Tree for OS X due to [an issue](https://jira.atlassian.com/browse/SRCTREE-3126) with Source Tree.