Skip to content

Commit 139a7f8

Browse files
merge: branch 'main' of https://github.com/cppdoc-cc/cppdoc
2 parents 4c389e5 + 0a7d4c4 commit 139a7f8

File tree

6 files changed

+61
-5
lines changed

6 files changed

+61
-5
lines changed

.commitlintrc.mjs

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
/** @type { import('cz-git').UserConfig } */
2+
export default {
3+
rules: {
4+
// @see: https://commitlint.js.org/#/reference-rules
5+
},
6+
prompt: {
7+
alias: { fd: "docs: fix typos" },
8+
useEmoji: false,
9+
emojiAlign: "center",
10+
useAI: false,
11+
aiNumber: 1,
12+
themeColorCode: "",
13+
scopes: ["docs:c", "docs:cpp", "docs:development", "components:*"],
14+
allowCustomScopes: true,
15+
allowEmptyScopes: true,
16+
customScopesAlign: "bottom",
17+
customScopesAlias: "custom",
18+
emptyScopesAlias: "empty",
19+
upperCaseSubject: null,
20+
markBreakingChangeMode: false,
21+
allowBreakingChanges: ["feat", "fix"],
22+
breaklineNumber: 100,
23+
breaklineChar: "|",
24+
skipQuestions: [],
25+
issuePrefixes: [
26+
{ value: "closed", name: "closed: ISSUES has been processed" },
27+
],
28+
customIssuePrefixAlign: "top",
29+
emptyIssuePrefixAlias: "skip",
30+
customIssuePrefixAlias: "custom",
31+
allowCustomIssuePrefix: true,
32+
allowEmptyIssuePrefix: true,
33+
confirmColorize: true,
34+
scopeOverrides: undefined,
35+
defaultBody: "",
36+
defaultIssues: "",
37+
defaultScope: "",
38+
defaultSubject: "",
39+
enableMultipleScopes: true,
40+
scopeEnumSeparator: ",",
41+
},
42+
};

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ dist/
77
# dependencies
88
node_modules/
99
yarn.lock
10+
pnpm-lock.yaml
11+
pnpm-workspace.yaml
1012

1113
# logs
1214
npm-debug.log*

.prettierrc

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,6 @@
1-
{}
1+
{
2+
"tabWidth": 2,
3+
"singleQuote": false,
4+
"trailingComma": "es5",
5+
"semi": true
6+
}

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,13 @@ An open documentation for the C/C++ programming languages and their standard lib
55
> [!TIP]
66
> Currently CppDoc community members are working hard on migrating [cppreference](https://en.cppreference.com/index.html) pages to CppDoc. You’re more than welcomed to join us if you want to help!
77
8+
<a href="https://discord.gg/TYgbKkM4" target="_blank">
9+
<img src="https://img.shields.io/badge/Discord-5865F2?style=for-the-badge&logo=discord&logoColor=white" alt="Discord server" />
10+
</a>
11+
<a href="https://t.me/+Rck2PsPCxBZkZWE1" target="_blank">
12+
<img src="https://img.shields.io/badge/Telegram-2CA5E0?style=for-the-badge&logo=telegram&logoColor=white" alt="Telegram group" />
13+
</a>
14+
815
## Quick Start
916

1017
Clone the project to your local:

src/lib/doc-index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ async function buildKeyIndex(): Promise<Map<string, string>> {
2525

2626
if (index.has(key)) {
2727
console.warn(
28-
`Key "${key}" is already assigned to "${index.get(key)}", cannot reassign it to "${doc.id}"`,
28+
`Key "${key}" is already assigned to "${index.get(key)}", cannot reassign it to "${doc.id}"`
2929
);
3030
continue;
3131
}

src/lib/revision.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export function getLanguageFromRevision(rev: CxxRevision): Language {
3838

3939
export function getRevisions(
4040
lang: Language,
41-
range?: RevisionRange,
41+
range?: RevisionRange
4242
): CxxRevision[] {
4343
const revisions: CxxRevision[] = lang === "C++" ? CPP_REVISIONS : C_REVISIONS;
4444

@@ -52,7 +52,7 @@ export function getRevisions(
5252

5353
export function compareRevisions(
5454
lhs: CxxRevision,
55-
rhs: CxxRevision,
55+
rhs: CxxRevision
5656
): number | undefined {
5757
const lhsLang = getLanguageFromRevision(lhs);
5858
const rhsLang = getLanguageFromRevision(rhs);
@@ -67,7 +67,7 @@ export function compareRevisions(
6767

6868
export function isRevisionInRange(
6969
rev: CxxRevision,
70-
range: RevisionRange,
70+
range: RevisionRange
7171
): boolean | undefined {
7272
const lang = getLanguageFromRevision(rev);
7373
if (range.since && lang !== getLanguageFromRevision(range.since)) {

0 commit comments

Comments
 (0)