mirror of
https://github.com/darksaid98/auto-changelog.git
synced 2026-12-01 22:14:52 +00:00
refactor: enhance ESLint configuration and type safety
This commit replaces `.eslintrc.yml` with `eslint.config.mts`, and updates the ESLint setup with Noir and Flat Gitignore configs. Signed-off-by: Ardalan Amini <[email protected]>
This commit is contained in:
32 files changed
+1140
-752
No files matched your search
@@ -22,7 +22,7 @@
|
||||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
const REGEX = /^(?<type>[^!:() ]*)(?:\((?<scope>[^!()]*?)\)|)(?<breaking>!?): *(?<description>.+?) *(?:\(#(?<pr>[1-9]\d*?)\)|) *(?:\[(?<flag>[^[\]]*?)]|)\s*$/;
|
||||
const REGEX = /^(?<type>[^ !():]*)(?:\((?<scope>[^!()]*?)\)|)(?<breaking>!?): *(?<description>.+?) *(?:\(#(?<pr>[1-9]\d*?)\)|) *(?:\[(?<flag>[^[\]]*?)]|)\s*$/;
|
||||
|
||||
export function parseCommitMessage(message: string): ParsedCommitMessageI {
|
||||
const { description, flag, pr, scope, type, breaking } = REGEX.exec(message)?.groups ?? {};
|
||||
@@ -39,9 +39,14 @@ export function parseCommitMessage(message: string): ParsedCommitMessageI {
|
||||
|
||||
export interface ParsedCommitMessageI {
|
||||
breaking: boolean;
|
||||
|
||||
description?: string;
|
||||
|
||||
flag?: string;
|
||||
|
||||
pr?: string;
|
||||
|
||||
scope?: string;
|
||||
|
||||
type?: string;
|
||||
}
|
||||
Reference in new issue
Block a user