0.5.0 • Published 5 years ago

eslint-config-bom v0.5.0

Weekly downloads
26
License
MIT
Repository
-
Last release
5 years ago

eslint-config-bom

This package provides BOM's JS .eslintrc as an extensible shared config. It is based on Airbnb's eslint-config-airbnb-base.

How to use

Add this project to your own:

npm install --save-dev git+ssh://git@gitlab.bom.gov.au:ddd/eslint-config-bom.git#develop

Install the following dependencies:

npm install --save-dev eslint eslint-plugin-import

Create your .eslintrc

{
 "env": {
   "es6": true,
   "node": true,
   "browser": true,
   "jest": true
 },
 "plugins": [
   // extra plugins go here
 ],
 "extends": [
   "bom",
 ],
 "rules": {
   // custom rules go here
 }
}

Create your .eslintignore

The following is an example of directories to be ignored.

build/
config/
scripts/

Run eslint using npm

Add eslint script to your package.json

  "scripts": {
    "eslint": "eslint .",
    ...
  }

Call eslint script

npm run eslint

Run eslint from command-line

./node_modules/.bin eslint src/

Further reading