5.3.2 • Published 2 months ago
eslint-plugin-ckeditor5-rules v5.3.2
CKEditor 5 ESLint plugins
A set of plugins used by the CKEditor 5 team for Eslint
By default this plugin is added to our eslint-config-ckeditor5
preset.
Usage
npm i --save-dev eslint-plugin-ckeditor5-rules
Configure ESLint with a .eslintrc
file using the following contents:
{
// ...
plugins: [
// ...
'ckeditor5-rules' // Add the plugin to the linter.
],
rules: {
'ckeditor5-rules/no-relative-imports': 'error',
'ckeditor5-rules/license-header': [ 'error', {
headerLines: [
'/**',
' * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.',
' * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license',
' */'
]
} ]
// ...
}
// ...
}
Rules
no-relative-imports
A rule that inspects for relative imports to other CKEditor 5's packages:
// Incorrect import:
import Position from '../../ckeditor5-engine/src/model/position';
// Will be fixed to:
import Position from '@ckeditor/ckeditor5-engine/src/model/position';
license-header
This rule checks if each file starts with proper @license
block comment. It requires configuration:
rules: {
'ckeditor5-rules/license-header': [ 'error', {
headerLines: [
'/**',
' * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.',
' * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license',
' */'
]
} ]
}
5.3.2
2 months ago
5.3.1
2 months ago
5.3.0
4 months ago
5.2.1
5 months ago
5.2.0
5 months ago
5.1.3
5 months ago
5.1.2
7 months ago
5.1.1
10 months ago
5.1.0
11 months ago
5.0.1
11 months ago
5.0.0
11 months ago
4.4.0
1 year ago
4.3.0
1 year ago
4.2.1
1 year ago
4.2.0
1 year ago
4.1.0
2 years ago
4.1.1
1 year ago
4.0.2
2 years ago
4.0.1
2 years ago
4.0.0
2 years ago
1.3.0
3 years ago
1.2.5
3 years ago
1.2.4
3 years ago
1.2.3
3 years ago
1.2.2
3 years ago
1.2.1
3 years ago
1.2.0
3 years ago
1.1.0
4 years ago
1.0.0
4 years ago
0.0.5
4 years ago
0.0.4
4 years ago
0.0.3
5 years ago
0.0.2
5 years ago
0.0.1
5 years ago