Registry / testing / eslint-plugin-ckeditor5-rules

eslint-plugin-ckeditor5-rules

JSON →
library15.0.0jsnpmunverified

Official ESLint plugin used by the CKEditor 5 team for enforcing project-specific code style and linting rules. Current stable version is 15.0.0 (released as part of CKEditor 5 linters config). The plugin follows CKEditor 5's major/minor versioning policy, with breaking changes occurring in major releases. It provides rules for import validation, license headers, no-enum, module tag validation, changelog formatting, and more. Typically used via the eslint-config-ckeditor5 preset, but can be used standalone. Requires Node.js >=24.11.0. Differentiators: tightly coupled with CKEditor 5 development workflow; includes rules like `cross-package-imports`, `no-relative-imports`, and `allow-imports-only-from-main-package-entry-point` that enforce strict module boundaries.

npm install eslint-plugin-ckeditor5-rules
INSTALL
IMPORT
SIG · ESLINT-PLUGIN-CKED
E
eslint-plugin-ckeditor5-rules
testingjavascriptv15.0.0
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

default
import ckeditor5Rules from 'eslint-plugin-ckeditor5-rules'
const ckeditor5Rules = require('eslint-plugin-ckeditor5-rules')
ESM-only package since v13; does not provide CommonJS export
plugins
plugins: { 'ckeditor5-rules': ckeditor5Rules }
plugins: ['ckeditor5-rules']
ESLint flat config requires plugin object, not string array
rules
'ckeditor5-rules/no-relative-imports': 'error'
'no-relative-imports': 'error'
Rule names must be prefixed with 'ckeditor5-rules/' in flat config

Minimal ESLint flat config using the plugin with two CKEditor 5 rules

import { defineConfig } from 'eslint/config'; import ckeditor5Rules from 'eslint-plugin-ckeditor5-rules'; export default defineConfig([ { plugins: { 'ckeditor5-rules': ckeditor5Rules }, rules: { 'ckeditor5-rules/no-relative-imports': 'error', 'ckeditor5-rules/license-header': ['error', { headerLines: [ '/**', ' * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.', ' * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license', ' */' ] }], 'ckeditor5-rules/no-enum': 'error' } } ]);
Debug
Known issues
breakingRemoved 'ckeditor-imports' rule in v14.0.0
fix
Use 'allow-imports-only-from-main-package-entry-point' rule instead
affects: >=14.0.0
breakingRemoved 'no-legacy-imports' rule in v14.0.0
fix
Remove the rule from your config; it is no longer needed
affects: >=14.0.0
deprecatedThe 'ckeditor5-rules/no-enum' rule is enabled by default in eslint-config-ckeditor5 since v15.0.0, disallowing enums unconditionally
fix
Use TypeScript union types instead of enums, or disable the rule if you must use enums
affects: >=15.0.0
gotchaRequires Node.js >=24.11.0; older Node versions will cause runtime errors
fix
Upgrade Node.js to 24.11.0 or later
affects: >=14.0.0
gotchaESM-only package; cannot be used with CommonJS require or older ESLint (legacy .eslintrc) formats
fix
Use import syntax and ESLint flat config
affects: >=13.0.0
breakingEnabled 'enforce-node-protocol' rule for all JS/TS files in v13.0.0
fix
Ensure all 'node:' imports use the full URL (e.g., 'node:fs') or disable the rule
affects: >=13.0.0
Errors
Common errors & fixes
Error: Cannot find module 'eslint-plugin-ckeditor5-rules'
Package not installed or incorrect import path
fix
Run 'npm install --save-dev eslint-plugin-ckeditor5-rules' and verify the import is correct (ESM only)
ESLint configuration error: ["ckeditor5-rules/no-relative-imports"] is not a valid rule
Rule name not prefixed correctly in flat config
fix
Use 'ckeditor5-rules/no-relative-imports': 'error' (include the prefix)
TypeError: ckeditor5Rules is not a function or object
Using CommonJS require() on an ESM-only package
fix
Change to 'import ckeditor5Rules from 'eslint-plugin-ckeditor5-rules'' and ensure your project uses ESM
Unsupported rule: ckeditor5-rules/ckeditor-imports
Rule was removed in v14.0.0
fix
Use 'ckeditor5-rules/allow-imports-only-from-main-package-entry-point' instead
Upgrade
Version history
15.0.0latest on npm
Audit
Dependencies
eslintrequiredpeer dependency for plugin functionality
Agent activity
2 hits · last 30 days
node
2
Resources