ipavlenko / eslint-plugin-chronobank

ESLint plugin for the ChronoBank related projects

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

eslint-plugin-chronobank

ESLint plugin for the ChronoBank related projects.

Usage

  1. npm install ChronoBank/eslint-plugin-chronobank --save-dev
  2. Create a file named .eslintrc in your project:
{
  extends: ['plugin:chronobank/recommended']
}
  1. Add to your package.json (you'll probably need to change src and specs 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",
  1. Use npm test before any commit and in your travis.yml:
script:
  ...
  - npm test -- --coverage

after_script:
  - cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js

Rules

Extends

This package extends eslint:recommended

Overrides

This package overrides several rules:

Override Description Reason
"no-constant-condition": 0 link We often use const declarations together with JSX checks
"semi": ["error", "never"] link We hate them
"no-case-declarations": 1 link Warning on case declarations (need code refactoring before setting "error" level)
'curly': [2, 'multi-line'] link Enforce curly braces in multiline blocks
'dot-location': [2, 'property'] link Enforce the dot to be on the same line as the property
'eol-last': 2 link Enforce new line at the end of file
'eqeqeq': [2, 'always', {'null': 'ignore'}] link Enforce using of type-safe equality operators except the cases when it is isNil check
'handle-callback-err': [2, '^(err|error)$' ] link Enforce handling of callback errors
'indent': [2, 2, { 'SwitchCase': 1 }] link Enforce indent in switch statements
'space-before-function-paren': ['error', 'always'] link Enforce space before function parenthesis

License

GPL-3.0

About

ESLint plugin for the ChronoBank related projects

License:GNU General Public License v3.0


Languages

Language:JavaScript 100.0%