ESLint plugin for the ChronoBank related projects.
npm install ChronoBank/eslint-plugin-chronobank-react --save-dev
- Create a file named
.eslintrc
in your project:
{
extends: ['plugin:chronobank-react/recommended']
}
- Add to your
package.json
(you'll probably need to changesrc
andspecs
folders to your own):
"scripts": {
...
"lint": "./node_modules/eslint/bin/eslint.js --ext .js,.jsx --fix src specs",
"lint:test": "./node_modules/eslint/bin/eslint.js --ext .js,.jsx src specs",
"test": "npm run lint:test && jest --useStderr --forceExit --runInBand",
- Use
npm test
before any commit and in yourtravis.yml
:
script:
...
- npm test -- --coverage
after_script:
- cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js
This package extends eslint:recommended, plugin:react/recommended and plugin:chronobank/recommended
This package overrides rules:
Override | Description | Reason |
---|---|---|
'jsx-quotes': [2, 'prefer-single'] |
link | Use single quotes in JSX |