Human Made coding standards for JavaScript, for ESLint v9+ using flat config format.
Required: Create an eslint.config.js file in your project root (ESLint 9+ flat config format):
import humanmadeConfig from '@humanmade/eslint-config';
export default humanmadeConfig;import humanmadeConfig from '@humanmade/eslint-config';
export default [
...humanmadeConfig,
// Your custom config overrides
{
rules: {
'no-console': 'off', // Example override
},
},
];- ESLint v9.0.0 or higher
- Node.js 22.0.0 or higher (Latest stable recommended)
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 .This config already supports TypeScript files (.ts, .tsx) out of the box via the WordPress ESLint plugin. No additional setup is required.
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@latestWe 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 24We welcome contributions to these standards. See CONTRIBUTING.md for how rule changes are decided, tested and released.
GNU General Public License v2.0 or later. See LICENSE.