diff --git a/.commitlintrc.mjs b/.commitlintrc.mjs new file mode 100644 index 00000000..b275098a --- /dev/null +++ b/.commitlintrc.mjs @@ -0,0 +1,42 @@ +/** @type { import('cz-git').UserConfig } */ +export default { + rules: { + // @see: https://commitlint.js.org/#/reference-rules + }, + prompt: { + alias: { fd: "docs: fix typos" }, + useEmoji: false, + emojiAlign: "center", + useAI: false, + aiNumber: 1, + themeColorCode: "", + scopes: ["docs:c", "docs:cpp", "docs:development", "components:*"], + allowCustomScopes: true, + allowEmptyScopes: true, + customScopesAlign: "bottom", + customScopesAlias: "custom", + emptyScopesAlias: "empty", + upperCaseSubject: null, + markBreakingChangeMode: false, + allowBreakingChanges: ["feat", "fix"], + breaklineNumber: 100, + breaklineChar: "|", + skipQuestions: [], + issuePrefixes: [ + { value: "closed", name: "closed: ISSUES has been processed" }, + ], + customIssuePrefixAlign: "top", + emptyIssuePrefixAlias: "skip", + customIssuePrefixAlias: "custom", + allowCustomIssuePrefix: true, + allowEmptyIssuePrefix: true, + confirmColorize: true, + scopeOverrides: undefined, + defaultBody: "", + defaultIssues: "", + defaultScope: "", + defaultSubject: "", + enableMultipleScopes: true, + scopeEnumSeparator: ",", + }, +}; diff --git a/.prettierrc b/.prettierrc index 0967ef42..34110b28 100644 --- a/.prettierrc +++ b/.prettierrc @@ -1 +1,6 @@ -{} +{ + "tabWidth": 2, + "singleQuote": false, + "trailingComma": "es5", + "semi": true +} diff --git a/src/lib/doc-index.ts b/src/lib/doc-index.ts index 55158c0e..0ac2e1c3 100644 --- a/src/lib/doc-index.ts +++ b/src/lib/doc-index.ts @@ -25,7 +25,7 @@ async function buildKeyIndex(): Promise> { if (index.has(key)) { console.warn( - `Key "${key}" is already assigned to "${index.get(key)}", cannot reassign it to "${doc.id}"`, + `Key "${key}" is already assigned to "${index.get(key)}", cannot reassign it to "${doc.id}"` ); continue; } diff --git a/src/lib/revision.ts b/src/lib/revision.ts index 74569346..c5ffb942 100644 --- a/src/lib/revision.ts +++ b/src/lib/revision.ts @@ -38,7 +38,7 @@ export function getLanguageFromRevision(rev: CxxRevision): Language { export function getRevisions( lang: Language, - range?: RevisionRange, + range?: RevisionRange ): CxxRevision[] { const revisions: CxxRevision[] = lang === "C++" ? CPP_REVISIONS : C_REVISIONS; @@ -52,7 +52,7 @@ export function getRevisions( export function compareRevisions( lhs: CxxRevision, - rhs: CxxRevision, + rhs: CxxRevision ): number | undefined { const lhsLang = getLanguageFromRevision(lhs); const rhsLang = getLanguageFromRevision(rhs); @@ -67,7 +67,7 @@ export function compareRevisions( export function isRevisionInRange( rev: CxxRevision, - range: RevisionRange, + range: RevisionRange ): boolean | undefined { const lang = getLanguageFromRevision(rev); if (range.since && lang !== getLanguageFromRevision(range.since)) {