eslint-plugin-ckeditor5-rules
raw JSON →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.
Common errors
error Error: Cannot find module 'eslint-plugin-ckeditor5-rules' ↓
error ESLint configuration error: ["ckeditor5-rules/no-relative-imports"] is not a valid rule ↓
error TypeError: ckeditor5Rules is not a function or object ↓
error Unsupported rule: ckeditor5-rules/ckeditor-imports ↓
Warnings
breaking Removed 'ckeditor-imports' rule in v14.0.0 ↓
breaking Removed 'no-legacy-imports' rule in v14.0.0 ↓
deprecated The 'ckeditor5-rules/no-enum' rule is enabled by default in eslint-config-ckeditor5 since v15.0.0, disallowing enums unconditionally ↓
gotcha Requires Node.js >=24.11.0; older Node versions will cause runtime errors ↓
gotcha ESM-only package; cannot be used with CommonJS require or older ESLint (legacy .eslintrc) formats ↓
breaking Enabled 'enforce-node-protocol' rule for all JS/TS files in v13.0.0 ↓
Install
npm install eslint-plugin-ckeditor5-rules yarn add eslint-plugin-ckeditor5-rules pnpm add eslint-plugin-ckeditor5-rules Imports
- default wrong
const ckeditor5Rules = require('eslint-plugin-ckeditor5-rules')correctimport ckeditor5Rules from 'eslint-plugin-ckeditor5-rules' - plugins wrong
plugins: ['ckeditor5-rules']correctplugins: { 'ckeditor5-rules': ckeditor5Rules } - rules wrong
'no-relative-imports': 'error'correct'ckeditor5-rules/no-relative-imports': 'error'
Quickstart
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'
}
}
]);