eslint configs for opengovsg


101.0.7a year ago3 years agoMinified + gzip package size for @opengovsg/eslint-config-opengovsg in KB



This package provides Open Government Product's base JS .eslintrc as an extensible shared config.


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.

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.