Skip to content

Repository files navigation

@humanmade/eslint-config

npm Tests

Human Made coding standards for JavaScript, for ESLint v9+ using flat config format.

Usage

Required: Create an eslint.config.js file in your project root (ESLint 9+ flat config format):

Basic Usage

import humanmadeConfig from '@humanmade/eslint-config';

export default humanmadeConfig;

With Custom Overrides

import humanmadeConfig from '@humanmade/eslint-config';

export default [
	...humanmadeConfig,
	// Your custom config overrides
	{
		rules: {
			'no-console': 'off', // Example override
		},
	},
];

Requirements

  • ESLint v9.0.0 or higher
  • Node.js 22.0.0 or higher (Latest stable recommended)

Installation

This package is an ESLint shareable configuration, and requires: babel-eslint, eslint, eslint-config-react-app, eslint-plugin-flowtype, eslint-plugin-import, eslint-plugin-jsx-a11y, eslint-plugin-jsdoc, eslint-plugin-react, eslint-plugin-react-hooks, eslint-plugin-sort-destructure-keys.

To install this config and the peerDependencies when using npm 5+:

npx install-peerdeps --dev @humanmade/eslint-config@latest

(Thanks to Airbnb's package for the command.)

You can then run ESLint on your files:

npx eslint .

Working with TypeScript

This config already supports TypeScript files (.ts, .tsx) out of the box via the WordPress ESLint plugin. No additional setup is required.

Global Installation

When installing globally, you need to ensure the peer dependencies are also installed globally.

Run the same command as above, but instead with --global:

npx install-peerdeps --global @humanmade/eslint-config@latest

Integration with Altis build script.

We require the use of Node v22+ (Node v24+ recommended), however the Altis build container may ship with older versions so it may not work out of the box.

As per the Altis documentation, you can install other versions of Node using nvm, so we recommend that you add the following to your build script.

nvm install 24
nvm use 24

Contributing

We welcome contributions to these standards. See CONTRIBUTING.md for how rule changes are decided, tested and released.

License

GNU General Public License v2.0 or later. See LICENSE.

About

Human Made JavaScript coding standards

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Packages

Contributors

Languages