eslint-config-nhsuk
v1.0.0
Published
ESLint config. Primarily intended for use within NHSUK projects.
Downloads
2,783
Readme
NHSUK's ESLint config
This repo provides NHSUK's
.eslintrc
as a shareable config.
The config is an extension of
eslint-config-airbnb-base.
Details of the changes can be seen in the exported config defined in
index.js. The main changes are the addition of node
and mocha
environments along with a few small tweaks to the rules. The rule changes
better meet the personal preferences of the repo maintainers.
Installation
To install the package run:
- npm -
npm install eslint-config-nhsuk --save-dev
- yarn -
yarn add eslint-config-nhsuk --dev
The config relies upon several other packages. These are the Peer Dependencies. To get a list of the peerDependencies run the following command:
npm info eslint-config-nhsuk peerDependencies
All peerDependencies need to be installed.
Usage
Once the eslint-config-nhsuk
package has been installed it is ready to be
used. This is achieved by specifying nhsuk
in the
extends
section of your
eslint config file.
If there is no existing eslint config file it could be as simple as creating a
file named .eslintrc
with the following content:
{
"extends": "nhsuk"
}