Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
type: Feature
scope: eslint-plugin-ckeditor5-rules
closes: https://github.com/ckeditor/ckeditor5/issues/18777
---

Add the `validate-changelog-entry` rule for validating Markdown-based changelog entries.
15 changes: 10 additions & 5 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,8 @@ commands:

jobs:
notify_ci_failure:
machine: true
docker:
- image: cimg/node:22.12.0
Comment on lines +83 to +84
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

parameters:
hideAuthor:
type: string
Expand Down Expand Up @@ -108,7 +109,8 @@ jobs:
no_output_timeout: 1h

validate_and_tests:
machine: true
docker:
- image: cimg/node:22.12.0
steps:
- checkout
- bootstrap_repository_command
Expand All @@ -120,7 +122,8 @@ jobs:
command: yarn run test

release_prepare:
machine: true
docker:
- image: cimg/node:22.12.0
steps:
- checkout
- bootstrap_repository_command
Expand All @@ -129,7 +132,8 @@ jobs:
command: yarn run release:prepare-packages --verbose --compile-only

trigger_release_process:
machine: true
docker:
- image: cimg/node:22.12.0
steps:
- checkout
- bootstrap_repository_command
Expand All @@ -153,7 +157,8 @@ jobs:
command: yarn ckeditor5-dev-ci-trigger-circle-build

release_project:
machine: true
docker:
- image: cimg/node:22.12.0
steps:
- checkout
- bootstrap_repository_command
Expand Down
23 changes: 23 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,18 @@
* For licensing, see LICENSE.md.
*/

import fs from 'fs';
import path from 'path';
import globals from 'globals';
import { defineConfig } from 'eslint/config';
import ckeditor5Config from 'eslint-config-ckeditor5';
import ckeditor5Rules from 'eslint-plugin-ckeditor5-rules';

const projectPackages = fs
.readdirSync( path.resolve( import.meta.dirname, 'packages' ), { withFileTypes: true } )
.filter( dirent => dirent.isDirectory() )
.map( dirent => dirent.name );

export default defineConfig( [
{
extends: ckeditor5Config,
Expand Down Expand Up @@ -40,5 +47,21 @@ export default defineConfig( [
]
} ]
}
},
{
files: [ '.changelog/**/*.md' ],
plugins: {
'ckeditor5-rules': ckeditor5Rules
},
language: 'markdown/gfm',
languageOptions: {
frontmatter: 'yaml'
},
rules: {
'ckeditor5-rules/validate-changelog-entry': [ 'error', {
allowedScopes: projectPackages,
repositoryType: 'mono'
} ]
}
}
] );
22 changes: 21 additions & 1 deletion packages/eslint-config-ckeditor5/eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import globals from 'globals';
import { defineConfig } from 'eslint/config';
import js from '@eslint/js';
import ts from 'typescript-eslint';
import markdown from '@eslint/markdown';
import mocha from 'eslint-plugin-mocha';
import stylistic from '@stylistic/eslint-plugin';
import ckeditor5Rules from 'eslint-plugin-ckeditor5-rules';
Expand All @@ -24,6 +25,8 @@ const rulesGeneral = [
ecmaVersion: 2020,
sourceType: 'module'
},

files: [ '**/*.@(js|ts|tsx)' ],

rules: {
/*
Expand Down Expand Up @@ -482,10 +485,27 @@ const rulesDocs = [
}
];

const rulesChangelog = [
{
files: [ '**/*.md' ],

plugins: {
markdown
},

language: 'markdown/gfm',

languageOptions: {
frontmatter: 'yaml'
}
}
];

export default defineConfig( [
rulesGeneral,
rulesTypeScript,
rulesSourceCode,
rulesTests,
rulesDocs
rulesDocs,
rulesChangelog
] );
1 change: 1 addition & 0 deletions packages/eslint-config-ckeditor5/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
},
"dependencies": {
"@eslint/js": "^9.26.0",
"@eslint/markdown": "^6.6.0",
"@stylistic/eslint-plugin": "^4.2.0",
"eslint-plugin-ckeditor5-rules": "^11.0.1",
"eslint-plugin-mocha": "^11.0.0",
Expand Down
3 changes: 2 additions & 1 deletion packages/eslint-plugin-ckeditor5-rules/lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ module.exports = {
'allow-svg-imports-only-in-icons-package': require( './rules/allow-svg-imports-only-in-icons-package.js' ),
'prevent-license-key-leak': require( './rules/prevent-license-key-leak' ),
'require-as-const-returns-in-methods': require( './rules/require-as-const-returns-in-methods' ),
'require-file-extensions-in-imports': require( './rules/require-file-extensions-in-imports' )
'require-file-extensions-in-imports': require( './rules/require-file-extensions-in-imports' ),
'validate-changelog-entry': require( './rules/validate-changelog-entry' )
}
};
Loading