eslint-config-uphold

Uphold-flavored ESLint config

Usage no npm install needed!

<script type="module">
  import eslintConfigUphold from 'https://cdn.skypack.dev/eslint-config-uphold';
</script>

README

eslint-config-uphold

Uphold-flavored ESLint config.

The rules defined here extend the eslint-recommended preset, as well as the overrides that allow the Prettier pretty-printer to reformat the code without conflicts.

Installation

$ npm install eslint eslint-config-uphold prettier --save-dev

Usage

Create an .eslintrc.yml file with the following content:

extends: uphold

Add a lint command to the scripts section of your package.json, like so:

{
  "scripts": {
    "lint": "eslint ."
  }
}

and run the linter with:

$ npm run lint

To automatically fix all lint issues, use the --fix option:

$ npm run lint --fix

Upgrading eslint

See the eslint repo for eslint's guidelines on semantic versioning.

A tilde range is set for the eslint dependency to pick up any patch changes by default.

For any minor/major upgrades to eslint it is recommended to update both eslint and eslint-config-uphold and keep them in parallel. This is down to the fact that no guarantee is made that minor upgrades do not cause conflicts or issues with existing or new rules. The downside here is a package update is required for any security or other bug fixes. The benefit however is the included rules are always guaranteed to be stable.