1.0.7 • Published 4 years ago
@opengovsg/eslint-config-opengovsg v1.0.7
eslint-config-opengovsg
This package provides Open Government Product's base JS .eslintrc as an extensible shared config.
Usage
Our default export contains all of our ESLint rules, including ECMAScript 6+. It requires eslint
and eslint-config-standard
.
Install the correct versions of each package, which are listed by the command:
npm info "@opengovsg/eslint-config-opengovsg@latest" peerDependencies
If using npm 5+, use this shortcut
npx install-peerdeps --dev @opengovsg/eslint-config-opengovsg
If using npm < 5, Linux/OSX users can run
(
export PKG=@opengovsg/eslint-config-opengovsg;
npm info "$PKG@latest" peerDependencies --json | command sed 's/[\{\},]//g ; s/: /@/g' | xargs npm install --save-dev "$PKG@latest"
)
If using npm < 5, Windows users can either install all the peer dependencies manually, or use the install-peerdeps cli tool.
npm install -g install-peerdeps
install-peerdeps --dev @opengovsg/eslint-config-opengovsg
Add "extends": "@opengovsg/eslint-config-opengovsg"
to your .eslintrc.
Instructions derived from eslint-config-airbnb-base.