4.0.0 • Public • Published


We use ESLint to lint our JavaScript (and TypeScript) code.

We also use Prettier to format our code.

Our config is organized into a set of composable, extendable eslint configs.

This means that you can mix and match our configs. For example, if you are writing TypeScript, testing with Jest, and using React, your .eslintrc might look like:


  "extends": ["hzdg", "hzdg/jest", "hzdg/react", "hzdg/typescript"]

read the Getting Started and Configs sections for more info on installing peer dependencies and other configuration details.

Getting Started

Get up and running using yarn:

# Add eslint-config-hzdg and base config peer dependencies. 
yarn add --dev \
  eslint \
  eslint-config-hzdg \
  eslint-config-prettier \
  eslint-plugin-eslint-comments \
  eslint-plugin-import \
  eslint-plugin-prettier \

Then configure eslint to use the Recommended HZDG config in your .eslintrc:


  "extends": ["hzdg"]

Next, read the Prettier config section for more on editor integrations and related configurations.

Then, depending on the project you are configuring, you may want to extend one or more of our other recommended configs, for example React, TypeScript, or Jest.


This package includes a number of composable configs in the conventional form "eslint-config-hzdg/<config-name>". In an .eslintrc file, this can be shortened to "hzdg/<config-name>". Below are short descriptions of each of these configs and their project dependencies and integrations.


Note: you don't need to explicitly extend hzdg/recommended if you are already extending hzdg.

Our 'base' configuration (detailed above) uses this config, so this and the following .eslintrc configs are equivalent:


  "extends": ["hzdg"]


  "extends": ["hzdg/recommended"]


The Recommended config includes support for Prettier, which has its own configuration. While we could configure it to our liking directly in the .eslintrc, it is better to provide a standalone prettier.config.js file which can be used by other tools, such as prettier-vscode.

This package ships with a prettier config that you can extend in your project prettier.config.js:


module.exports = require('eslint-config-hzdg/prettier.config.js');


Configure eslint to extend the HZDG TypeScript config:


  "extends": ["hzdg", "hzdg/typescript"]

Add the necessary TypeScript peer dependencies:

yarn add --dev \
  @typescript-eslint/eslint-plugin \
  @typescript-eslint/parser \
  eslint-import-resolver-typescript \

TypeScript has its own configuration file that is used by the compiler and other tools, like editor integrations. This project ships with a tsconfig.json that you can extend in your project:


  "extends": "eslint-config-hzdg/tsconfig"


Configure eslint to extend the HZDG React config:


  "extends": ["hzdg", "hzdg/react"]

Add the necessary React peer dependencies:

yarn add --dev eslint-plugin-jsx-a11y eslint-plugin-react eslint-plugin-react-hooks


Configure eslint to extend the HZDG Jest config:


  "extends": ["hzdg", "hzdg/jest"]

Add the necessary Jest peer dependencies:

yarn add --dev eslint-plugin-jest

Editor Integration



Install lerna globally with yarn global add lerna or npm install -g lerna

Updating the project

  1. Pull down the project.
  2. Run lerna init in the top level directory.
  3. If adding a new package, run lerna add <package>[@version] [--dev].
  4. Run tests with yarn test.
  5. Commit&Push.

Package Sidebar


Weekly Downloads






Unpacked Size

15.8 kB

Total Files


Last publish


  • hzdgadmin
  • kenzic
  • lettertwo