![require(esm) Backported to Node.js 20, Paving the Way for ESM-Only Packages](https://cdn.sanity.io/images/cgdhsj6q/production/be8ab80c8efa5907bc341c6fefe9aa20d239d890-1600x1097.png?w=400&fit=max&auto=format)
Security News
require(esm) Backported to Node.js 20, Paving the Way for ESM-Only Packages
require(esm) backported to Node.js 20, easing the transition to ESM-only packages and reducing complexity for developers as Node 18 nears end-of-life.
eslint-plugin-matrix-org
Advanced tools
eslint-plugin-matrix-org
contains ESLint rules and configs used by Matrix.org
projects. It codifies
https://github.com/matrix-org/matrix-react-sdk/blob/develop/code_style.md.
This package contains several main ESLint configs for different project styles:
matrix-org/javascript
: The style for native JavaScript projects.matrix-org/babel
: The style for Babel JavaScript projects. It extends
matrix-org/javascript
.matrix-org/typescript
: The style for TypeScript projects. It extends
matrix-org/javascript
.There is also a mixin config that can be used together with any of the above:
matrix-org/react
: The style for React projects.Add this package as a development dependency:
yarn add eslint-plugin-matrix-org --dev
You can then add any of the following to your ESLint config:
Standard native JavaScript
{
plugins: [
"matrix-org",
],
extends: [
"plugin:matrix-org/javascript",
]
}
Standard Babel JavaScript
{
plugins: [
"matrix-org",
],
extends: [
"plugin:matrix-org/babel",
]
}
Standard TypeScript
{
plugins: [
"matrix-org",
],
extends: [
"plugin:matrix-org/typescript",
]
}
Standard native JavaScript with React
{
plugins: [
"matrix-org",
],
extends: [
"plugin:matrix-org/javascript",
"plugin:matrix-org/react",
]
}
Standard Babel JavaScript with React
{
plugins: [
"matrix-org",
],
extends: [
"plugin:matrix-org/babel",
"plugin:matrix-org/react",
]
}
Standard TypeScript with React
{
plugins: [
"matrix-org",
],
extends: [
"plugin:matrix-org/typescript",
"plugin:matrix-org/react",
]
}
Standard TypeScript with React and jsx a11y
{
plugins: [
"matrix-org",
],
extends: [
"plugin:matrix-org/typescript",
"plugin:matrix-org/react",
"plugin:matrix-org/a11y"
]
}
To require a copyright header:
{
plugins: [
"matrix-org",
],
rules: [
"matrix-org/require-copyright-header": "error",
// provide a header template as a string to insert on --fix
// the current year can be inserted into the template with the placeholder `%%CURRENT_YEAR%%`
"matrix-org/require-copyright-header": ["error", HEADER_TEMPLATE]
]
}
This package does not hold any dependencies itself, as it causes conflicts the versions of the same dependencies downstream and also would imply installing the union of all tools. You should expect that you may need to add some of the following depending on the configs you enable:
Use "Run workflow". Refer to SemVer for versioning semantics. This workflow will bump the version, publish NPM, and create a GitHub release.
FAQs
ESLint rules and configs used by Matrix.org projects
The npm package eslint-plugin-matrix-org receives a total of 2,054 weekly downloads. As such, eslint-plugin-matrix-org popularity was classified as popular.
We found that eslint-plugin-matrix-org demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
require(esm) backported to Node.js 20, easing the transition to ESM-only packages and reducing complexity for developers as Node 18 nears end-of-life.
Security News
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.