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:
Ardalan Amini committed 2025-06-07 17:27:28 +03:30
1 parent 43d0d5f60d
commit 04e49adbba
32 files changed
+1140 -752

No files matched your search

+6 -1
View File
@@ -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;
}