# eslint-plugin-harmony

> eslint config that works in harmony with different IDEs

Latest version **8.0.0** (published 2026-09-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install eslint-plugin-harmony
pnpm add eslint-plugin-harmony
yarn add eslint-plugin-harmony
bun add eslint-plugin-harmony
```

## Health

**Score 75/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; has provenance; recently updated; high maintenance score; high quality score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 8.0.0 |
| Published | 2026-09-07 |
| First published | 2018-03-07 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | ^20.19.0 \|\| ^22.13.0 \|\| >=24 |
| Dependencies | 2 |
| Unpacked size | 51.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 1 |
| Author | Unional |
| Maintainers | unional |
| Keywords | eslint, eslint-plugin, eslintplugin, javascript, prettier, styleguide, tslint, typescript |

## Links

- npm: https://www.npmjs.com/package/eslint-plugin-harmony
- Repository: https://github.com/repobuddy/eslint-plugin-harmony
- Issues: https://github.com/repobuddy/eslint-plugin-harmony/issues
- npm.io page: https://npm.io/package/eslint-plugin-harmony

## Dependencies (2)

- [@typescript-eslint/utils](https://npm.io/package/@typescript-eslint/utils.md) ^8.0.0
- [@typescript-eslint/parser](https://npm.io/package/@typescript-eslint/parser.md) ^8.69.0

## Alternatives

- [eslint-plugin-sonarjs](https://npm.io/package/eslint-plugin-sonarjs.md) — 2.9M weekly downloads
- [eslint-config-expo](https://npm.io/package/eslint-config-expo.md) — 1.5M weekly downloads
- [@matter/protocol](https://npm.io/package/@matter/protocol.md) — 63.5K weekly downloads
- [@eventcatalog/linter](https://npm.io/package/@eventcatalog/linter.md) — 24.8K weekly downloads
- [@inrupt/eslint-config-base](https://npm.io/package/@inrupt/eslint-config-base.md) — 4.5K weekly downloads

## Recent versions

- 8.0.0 (latest) — 2026-09-07
- 1.0.1 (next) — 2018-03-07
- 7.2.1 — 2026-09-01
- 7.2.0 — 2024-01-21
- 7.1.2 — 2023-03-14
- 7.1.1 — 2022-11-20
- 7.1.0 — 2022-05-16
- 7.0.2 — 2022-05-15
- 7.0.1 — 2022-05-12
- 7.0.0 — 2022-05-12
- 6.1.0 — 2022-04-24
- 6.0.4 — 2022-04-24
- 6.0.3 — 2022-04-24
- 6.0.2 — 2022-04-02
- 6.0.1 — 2022-04-02
- … 29 more at https://npm.io/package/eslint-plugin-harmony/versions

## README

# eslint-plugin-harmony

[![NPM version][npm-image]][npm-url]
[![NPM downloads][downloads-image]][downloads-url]

[![GitHub Action][github-release]][github-action-url]

[![Visual Studio Code][vscode-image]][vscode-url]
[![phpStorm][phpStorm-image]][phpStorm-url]
[![Atom][atom-image]][atom-url]

A [`eslint`](https://eslint.org/) config styles package that work across IDEs.

## Design Principles

There are several configurations available in this package.
Although they are different as they are designed for different programmers,
here are the principles that they all follow:

- They are designed to be used by team
- Each team member can use one of the supported IDE
- The formatter available on each IDE should work with each configuration
- Code should look well and consistent on each IDE with folding
  - so that when you stop by your team member's cube, the code looks the same.
- Thrive for easy to write (with the fewest keystrokes) while keeping the code clean

## Supported IDE

- Visual Studio Code (1.20.0): <https://code.visualstudio.com/>
- phpStorm (2017.3.4): <https://www.jetbrains.com/phpstorm/>
- Atom (1.24.0): <https://atom.io/>

## Requirements

- Node.js `^20.19.0 || ^22.13.0 || >=24` — this package is ESM only
- ESLint `>=8.57.0`

## Installation

```sh
npm install --save-dev eslint eslint-plugin-harmony
```

## Usage

`eslint.config.js` (flat config) is the supported way to use this package on every
ESLint version it supports:

```js
import { defineConfig } from 'eslint/config'
import harmony from 'eslint-plugin-harmony'

export default defineConfig([
  { files: ['**/*.js'], plugins: { harmony }, extends: ['harmony/recommended'] }
])
```

`extends: ['harmony/<name>']` needs ESLint 9.23 or later, which falls back to the
`flat/<name>` entry of the plugin. On ESLint 8 and 9.22 and earlier, spread the
config instead — this works on every version:

```js
import harmony from 'eslint-plugin-harmony'

export default [...harmony.configs['flat/recommended']]
```

### The configs

| `extends` name | spread name | notes |
| --- | --- | --- |
| `harmony/recommended` | `harmony.configs['flat/recommended']` | the JavaScript style |
| `harmony/latest` | `harmony.configs['flat/latest']` | `recommended` without the indentation rule |
| `harmony/es5` | `harmony.configs['flat/es5']` | pins the language to ES5 |
| `harmony/es5-strict` | `harmony.configs['flat/es5-strict']` | ES5, plus `semi` and no trailing commas |
| `harmony/ts-recommended` | `harmony.configs['flat/ts-recommended']` | TypeScript |
| `harmony/ts-recommended-type-check` | `harmony.configs['flat/ts-recommended-type-check']` | TypeScript, type-aware rules |
| `harmony/ts-recommended-requiring-type-checking` | … | same, older name |
| `harmony/ts-recommended-cra` | … | Create React App variant |
| `harmony/ts-recommended-type-check-cra` | … | Create React App variant |
| `harmony/ts-prettier` | `harmony.configs['flat/ts-prettier']` | experimental; pair with `eslint-config-prettier` |

### These configs are overlays

The eslintrc configs pull in `eslint:recommended`, `plugin:@typescript-eslint/*`
and `prettier` by name. Flat config has no string `extends`, so the flat configs
carry only the rules harmony itself sets and you compose the bases yourself —
harmony last, so its style wins:

```js
import { defineConfig } from 'eslint/config'
import js from '@eslint/js'
import harmony from 'eslint-plugin-harmony'

export default defineConfig([
  js.configs.recommended,
  { files: ['**/*.js'], plugins: { harmony }, extends: ['harmony/recommended'] }
])
```

Two other deliberate differences from the eslintrc twins:

- The `ts-*` flat configs apply to `**/*.{ts,tsx,mts,cts}` on their own. eslintrc
  left that to your `overrides.files`.
- No `ecmaVersion` is pinned, except in `es5` and `es5-strict` where it is the
  point. The eslintrc configs pinned ES2018/ES2019, which in flat config would
  win over yours and turn `a?.b` into a parsing error.

### TypeScript

The `ts-*` flat configs set `@typescript-eslint/*` rules but do not register the
plugin or the parser — pinning a parser here would override the one your
`typescript-eslint` version installs. Compose them on top of
[`typescript-eslint`](https://typescript-eslint.io), which supplies both:

```js
import { defineConfig } from 'eslint/config'
import tseslint from 'typescript-eslint'
import harmony from 'eslint-plugin-harmony'

export default defineConfig([
  ...tseslint.configs.recommended,
  { files: ['**/*.ts', '**/*.tsx'], plugins: { harmony }, extends: ['harmony/ts-recommended'] }
])
```

For the type-aware configs, also give `typescript-eslint` your
`languageOptions.parserOptions.project` — harmony does not set it.

For `harmony/ts-prettier`, put `eslint-config-prettier` last so it turns the
formatting rules off again.

## Legacy: eslintrc (ESLint 8 and 9 only)

> ESLint 10 removed the eslintrc format. `.eslintrc.*` files are not read there
> at all, and `ESLINT_USE_FLAT_CONFIG=false` no longer brings it back, so
> `plugin:harmony/*` cannot be used on ESLint 10. Move to the flat configs above.

The `plugin:harmony/*` configs are unchanged from earlier versions:

```json
{
  "extends": ["plugin:harmony/recommended"],
  "overrides": [
    {
      "files": ["*.ts", "*.tsx"],
      "extends": ["plugin:harmony/ts-recommended"]
    }
  ]
}
```

Available: `plugin:harmony/recommended`, `plugin:harmony/latest`,
`plugin:harmony/es5`, `plugin:harmony/es5-strict`, `plugin:harmony/ts-prettier`,
`plugin:harmony/ts-recommended`, `plugin:harmony/ts-recommended-type-check`,
`plugin:harmony/ts-recommended-cra`, `plugin:harmony/ts-recommended-type-check-cra`.

For `ts-recommended-type-check` you still need to specify
`parserOptions.project`:

```json
{
  "extends": ["plugin:harmony/recommended"],
  "overrides": [
    {
      "files": ["*.ts", "*.tsx"],
      "extends": ["plugin:harmony/ts-recommended-type-check"],
      "parserOptions": { "project": "tsconfig.json" }
    }
  ]
}
```

### JetBrains IDE

After you import the settings,
you need to use them in the setting:

![setting](2018-03-06-16-12-17.png)

You also need to change your language version appropriately:

![language version](2018-03-06-16-14-48.png)

## Contribute

```sh
pnpm i
pnpm bootstrap
```

[npm-image]: https://img.shields.io/npm/v/eslint-plugin-harmony.svg?style=flat
[npm-url]: https://npmjs.org/package/eslint-plugin-harmony
[downloads-image]: https://img.shields.io/npm/dm/eslint-plugin-harmony.svg?style=flat
[downloads-url]: https://npmjs.org/package/eslint-plugin-harmony
[github-release]: https://github.com/repobuddy/eslint-plugin-harmony/workflows/release/badge.svg
[github-action-url]: https://github.com/repobuddy/eslint-plugin-harmony/actions
[vscode-image]:https://img.shields.io/badge/vscode-ready-green.svg
[vscode-url]:https://code.visualstudio.com/
[phpStorm-image]:https://img.shields.io/badge/phpStorm-ready-green.svg
[phpStorm-url]:https://www.jetbrains.com/phpstorm/
[atom-image]:https://img.shields.io/badge/atom-ready-green.svg
[atom-url]:https://atom.io/

---
_Source: https://npm.io/package/eslint-plugin-harmony · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
