node package manager

eslint-config-jane

eslint-config-jane

Shared eslint config for front-end projects at Jane.


Installation

npm i -D eslint-config-jane

You'll also need to install some plugins (peerDependencies), at least until there's some sort of resolution for this issue:

npm i -D eslint-plugin-babel eslint-plugin-jest eslint-plugin-jsx-a11y eslint-plugin-promise eslint-plugin-react eslint-plugin-unicorn

Usage

.eslintrc

{
  "root": true,
  "extends": "eslint-config-jane"
  // any custom configs
}

Notes

Our rules are heavily based on Standard.

Most rules only warn. Exceptions (rules that error):

  • comma-dangle: never
  • eol-last
  • indent: 2, SwitchCase 1
  • new-cap: newIsCap true, capIsNew false
  • no-duplicate-imports
  • no-eval
  • no-extend-native
  • no-global-assign
  • no-mixed-tabs-and-spaces
  • no-tabs
  • no-undef
  • no-undef-init
  • no-with
  • quotes: single, avoidEscape true
  • unicode-bom: never
  • unicorn/filename-case: kebab

Development

Rules go in config.json. After editing, please run the file through jq. Example: jq . < config.json > tmp && mv -f tmp config.json, or in vim :%!jq ..

LICENSE

MIT