eslint-plugin-matrix-org

raw JSON →
3.0.0 verified Sat Apr 25 auth: no javascript

ESLint plugin providing shareable configs and custom rules used by Matrix.org projects. Current stable version is 3.0.0. It codifies the code style from element-web and offers configs for JavaScript, TypeScript, Babel, React, and Jest. The plugin deliberately has zero runtime dependencies to avoid version conflicts; users must install peer dependencies manually. Key differentiator: it bundles multiple configs (Google, Prettier, unicorn, etc.) into a cohesive set aligned with Matrix.org's style guide.

error Error: Cannot find module 'eslint-plugin-matrix-org'
cause Plugin not installed.
fix
Run 'npm install eslint-plugin-matrix-org --save-dev'.
error Error: Failed to load config 'matrix-org/javascript' to extend from.
cause Missing 'plugin:' prefix in extends.
fix
Use 'plugin:matrix-org/javascript' instead.
error Error: Cannot find module '@typescript-eslint/parser'
cause Missing peer dependency for TypeScript config.
fix
Install '@typescript-eslint/parser' as a dev dependency.
error Rule 'matrix-org/require-copyright-header' does not exist
cause Config or rule name misspelled or not loaded.
fix
Ensure the plugin is in 'plugins' array and use correct rule name.
breaking Version 3.0.0 drops support for ESLint 9+; requires eslint <9.
fix Downgrade ESLint to version 8 or use an older version of the plugin.
deprecated Version 2.x removed the matrix-org/a11y config; use matrix-org/react instead.
fix Replace 'plugin:matrix-org/a11y' with 'plugin:matrix-org/react'.
gotcha Plugin has zero bundled dependencies; missing peer deps cause runtime errors.
fix Install all required peer dependencies listed in the README.
gotcha Configs are not automatically applied; you must specify them in extends.
fix Add 'plugin:matrix-org/javascript' (or other) to your ESLint extends array.
npm install eslint-plugin-matrix-org
yarn add eslint-plugin-matrix-org
pnpm add eslint-plugin-matrix-org

Basic ESLint configuration using the JavaScript config from eslint-plugin-matrix-org.

// .eslintrc.json
{
  "plugins": ["matrix-org"],
  "extends": ["plugin:matrix-org/javascript"]
}