Skip to content

Commit c0b0cfe

Browse files
committed
main
1 parent f41f4c8 commit c0b0cfe

34 files changed

Lines changed: 1698 additions & 443 deletions

.oxfmtrc.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"printWidth": 100,
3+
"tabWidth": 2,
4+
"singleQuote": true,
5+
"trailingComma": "all",
6+
"arrowParens": "avoid"
7+
}

.oxlintrc.json

Lines changed: 148 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,148 @@
1+
{
2+
"plugins": [
3+
"unicorn",
4+
"typescript",
5+
"oxc"
6+
],
7+
"categories": {},
8+
"rules": {
9+
"constructor-super": "warn",
10+
"for-direction": "warn",
11+
"no-async-promise-executor": "warn",
12+
"no-caller": "warn",
13+
"no-class-assign": "warn",
14+
"no-compare-neg-zero": "warn",
15+
"no-cond-assign": "warn",
16+
"no-const-assign": "warn",
17+
"no-constant-binary-expression": "warn",
18+
"no-constant-condition": "warn",
19+
"no-control-regex": "warn",
20+
"no-debugger": "warn",
21+
"no-delete-var": "warn",
22+
"no-dupe-class-members": "warn",
23+
"no-dupe-else-if": "warn",
24+
"no-dupe-keys": "warn",
25+
"no-duplicate-case": "warn",
26+
"no-empty-character-class": "warn",
27+
"no-empty-pattern": "warn",
28+
"no-empty-static-block": "warn",
29+
"no-eval": "warn",
30+
"no-ex-assign": "warn",
31+
"no-extra-boolean-cast": "warn",
32+
"no-func-assign": "warn",
33+
"no-global-assign": "warn",
34+
"no-import-assign": "warn",
35+
"no-invalid-regexp": "warn",
36+
"no-irregular-whitespace": "warn",
37+
"no-loss-of-precision": "warn",
38+
"no-new-native-nonconstructor": "warn",
39+
"no-nonoctal-decimal-escape": "warn",
40+
"no-obj-calls": "warn",
41+
"no-self-assign": "warn",
42+
"no-setter-return": "warn",
43+
"no-shadow-restricted-names": "warn",
44+
"no-sparse-arrays": "warn",
45+
"no-this-before-super": "warn",
46+
"no-unassigned-vars": "warn",
47+
"no-unsafe-finally": "warn",
48+
"no-unsafe-negation": "warn",
49+
"no-unsafe-optional-chaining": "warn",
50+
"no-unused-expressions": "warn",
51+
"no-unused-labels": "warn",
52+
"no-unused-private-class-members": "warn",
53+
"no-unused-vars": "warn",
54+
"no-useless-backreference": "warn",
55+
"no-useless-catch": "warn",
56+
"no-useless-escape": "warn",
57+
"no-useless-rename": "warn",
58+
"no-with": "warn",
59+
"require-yield": "warn",
60+
"use-isnan": "warn",
61+
"valid-typeof": "warn",
62+
"oxc/bad-array-method-on-arguments": "warn",
63+
"oxc/bad-char-at-comparison": "warn",
64+
"oxc/bad-comparison-sequence": "warn",
65+
"oxc/bad-min-max-func": "warn",
66+
"oxc/bad-object-literal-comparison": "warn",
67+
"oxc/bad-replace-all-arg": "warn",
68+
"oxc/const-comparisons": "warn",
69+
"oxc/double-comparisons": "warn",
70+
"oxc/erasing-op": "warn",
71+
"oxc/missing-throw": "warn",
72+
"oxc/number-arg-out-of-range": "warn",
73+
"oxc/only-used-in-recursion": "warn",
74+
"oxc/uninvoked-array-callback": "warn",
75+
"typescript/await-thenable": "warn",
76+
"typescript/no-array-delete": "warn",
77+
"typescript/no-base-to-string": "warn",
78+
"typescript/no-duplicate-enum-values": "warn",
79+
"typescript/no-duplicate-type-constituents": "warn",
80+
"typescript/no-extra-non-null-assertion": "warn",
81+
"typescript/no-floating-promises": "warn",
82+
"typescript/no-for-in-array": "warn",
83+
"typescript/no-implied-eval": "warn",
84+
"typescript/no-meaningless-void-operator": "warn",
85+
"typescript/no-misused-new": "warn",
86+
"typescript/no-misused-spread": "warn",
87+
"typescript/no-non-null-asserted-optional-chain": "warn",
88+
"typescript/no-redundant-type-constituents": "warn",
89+
"typescript/no-this-alias": "warn",
90+
"typescript/no-unnecessary-parameter-property-assignment": "warn",
91+
"typescript/no-unsafe-declaration-merging": "warn",
92+
"typescript/no-unsafe-unary-minus": "warn",
93+
"typescript/no-useless-empty-export": "warn",
94+
"typescript/no-wrapper-object-types": "warn",
95+
"typescript/prefer-as-const": "warn",
96+
"typescript/require-array-sort-compare": "warn",
97+
"typescript/restrict-template-expressions": "warn",
98+
"typescript/triple-slash-reference": "warn",
99+
"typescript/unbound-method": "warn",
100+
"unicorn/no-await-in-promise-methods": "warn",
101+
"unicorn/no-empty-file": "warn",
102+
"unicorn/no-invalid-fetch-options": "warn",
103+
"unicorn/no-invalid-remove-event-listener": "warn",
104+
"unicorn/no-new-array": "warn",
105+
"unicorn/no-single-promise-in-promise-methods": "warn",
106+
"unicorn/no-thenable": "warn",
107+
"unicorn/no-unnecessary-await": "warn",
108+
"unicorn/no-useless-fallback-in-spread": "warn",
109+
"unicorn/no-useless-length-check": "warn",
110+
"unicorn/no-useless-spread": "warn",
111+
"unicorn/prefer-set-size": "warn",
112+
"unicorn/prefer-string-starts-ends-with": "warn"
113+
},
114+
"settings": {
115+
"jsx-a11y": {
116+
"polymorphicPropName": null,
117+
"components": {},
118+
"attributes": {}
119+
},
120+
"next": {
121+
"rootDir": []
122+
},
123+
"react": {
124+
"formComponents": [],
125+
"linkComponents": [],
126+
"version": null
127+
},
128+
"jsdoc": {
129+
"ignorePrivate": false,
130+
"ignoreInternal": false,
131+
"ignoreReplacesDocs": true,
132+
"overrideReplacesDocs": true,
133+
"augmentsExtendsReplacesDocs": false,
134+
"implementsReplacesDocs": false,
135+
"exemptDestructuredRootsFromChecks": false,
136+
"tagNamePreference": {}
137+
},
138+
"vitest": {
139+
"typecheck": false
140+
}
141+
},
142+
"env": {
143+
"builtin": true
144+
},
145+
"globals": {},
146+
"ignorePatterns": []
147+
}
148+

docs/.vitepress/config.mts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@ type Is = ShikiThemeType extends VitepressThemeType ? true : false;
1616
const vitepressConfig = defineConfig({
1717
cleanUrls: true,
1818
markdown: {
19+
math: true,
1920
lineNumbers: true,
21+
image: { lazyLoading: true },
2022
theme: {
2123
light: 'github-light',
2224
dark: 'github-dark',

docs/.vitepress/theme/custom.css

Lines changed: 55 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,65 +1,71 @@
11
:root {
2-
--vp-home-hero-name-color: #fa5c15;
3-
--vp-home-hero-name-background: -webkit-linear-gradient(120deg, #fa5c15, rgb(251, 70, 202));
4-
--vp-font-family-mono: 'SF Mono SC', 'SF Mono', 'JetBrains Mono NL', 'JetBrains Mono', 'Fira Code', 'Noto Sans Mono', 'Cascadia Code', Menlo, Monaco,
5-
Consolas, 'Liberation Mono', 'Courier New', 'Nerd Font Symbols', ui-monospace, monospace;
6-
--vp-font-family-base: 'Chinese Quotes', 'Inter var', 'Inter', ui-sans-serif,
7-
system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
8-
'Helvetica Neue', Helvetica, Arial, 'Noto Sans', sans-serif,
9-
'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
10-
--vp-c-brand-1: #2cbc23;
11-
--vp-c-indigo-2: #fa5c15;
2+
--vp-home-hero-name-color: #fa5c15;
3+
--vp-home-hero-name-background: -webkit-linear-gradient(120deg, #fa5c15, rgb(251, 70, 202));
4+
--vp-font-family-mono:
5+
'IBM Plex Mono', 'SF Mono SC', 'SF Mono', 'JetBrains Mono NL', 'JetBrains Mono', 'Fira Code',
6+
'Noto Sans Mono', 'Cascadia Code', Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New',
7+
'Nerd Font Symbols', ui-monospace, monospace;
8+
--vp-font-family-base:
9+
'Chinese Quotes', 'Inter var', 'Inter', ui-sans-serif, system-ui, -apple-system,
10+
BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Helvetica, Arial, 'Noto Sans',
11+
sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
12+
--vp-c-brand-1: #2cbc23;
13+
--vp-c-indigo-2: #fa5c15;
1214
}
1315

1416
.dark {
15-
--vp-code-block-bg: #282c34;
16-
--vp-c-bg: #21252b;
17-
--vp-c-bg-alt: #282c34;
18-
--vp-c-bg-elv: #282c34;
19-
--vp-c-bg-soft: #282c34;
20-
/* inline code color */
21-
--vp-code-color: #2dbc24;
17+
--vp-code-block-bg: #282c34;
18+
--vp-c-bg: #21252b;
19+
--vp-c-bg-alt: #282c34;
20+
--vp-c-bg-elv: #282c34;
21+
--vp-c-bg-soft: #282c34;
22+
/* inline code color */
23+
--vp-code-color: #2dbc24;
2224
}
2325

2426
/* bold for second level sidebar-item */
2527
#VPSidebarNav h3 {
26-
font-weight: bold;
28+
font-weight: bold;
2729
}
2830

29-
.VPImage {
30-
border-radius: 20%;
31-
}
32-
33-
/* #region impl blur bav-bar */
34-
:root {
35-
--nav-c-bg: rgba(255, 255, 255, 0.5);
36-
}
37-
38-
.dark {
39-
--nav-c-bg: rgba(30, 30, 32, 0.5);
31+
.VPSidebar {
32+
scrollbar-width: thin;
4033
}
4134

42-
.curtain {
43-
display: none !important;
44-
}
45-
46-
.fill {
47-
background: transparent !important;
48-
}
49-
50-
.content-body {
51-
background: var(--nav-c-bg) !important;
35+
.VPImage {
36+
border-radius: 20%;
5237
}
5338

54-
.content-body::after {
55-
content: "";
56-
position: absolute;
57-
top: 0;
58-
left: 0;
59-
right: 0;
60-
bottom: 0;
61-
backdrop-filter: saturate(180%) blur(5px);
62-
z-index: -1;
63-
}
39+
/* #region impl blur bav-bar */
40+
/* :root { */
41+
/* --nav-c-bg: rgba(255, 255, 255, 0.5); */
42+
/* } */
43+
/**/
44+
/* .dark { */
45+
/* --nav-c-bg: rgba(30, 30, 32, 0.5); */
46+
/* } */
47+
/**/
48+
/* .curtain { */
49+
/* display: none !important; */
50+
/* } */
51+
/**/
52+
/* .fill { */
53+
/* background: transparent !important; */
54+
/* } */
55+
/**/
56+
/* .content-body { */
57+
/* background: var(--nav-c-bg) !important; */
58+
/* } */
59+
/**/
60+
/* .content-body::after { */
61+
/* content: ''; */
62+
/* position: absolute; */
63+
/* top: 0; */
64+
/* left: 0; */
65+
/* right: 0; */
66+
/* bottom: 0; */
67+
/* backdrop-filter: saturate(180%) blur(5px); */
68+
/* z-index: -1; */
69+
/* } */
6470

6571
/* #endregion */

docs/.vitepress/theme/style.css

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
* in custom container, badges, etc.
4444
* -------------------------------------------------------------------------- */
4545

46-
:root {
46+
:root {
4747
--vp-c-default-1: var(--vp-c-gray-1);
4848
--vp-c-default-2: var(--vp-c-gray-2);
4949
--vp-c-default-3: var(--vp-c-gray-3);
@@ -92,17 +92,9 @@
9292

9393
:root {
9494
--vp-home-hero-name-color: transparent;
95-
--vp-home-hero-name-background: -webkit-linear-gradient(
96-
120deg,
97-
#bd34fe 30%,
98-
#41d1ff
99-
);
100-
101-
--vp-home-hero-image-background-image: linear-gradient(
102-
-45deg,
103-
#bd34fe 50%,
104-
#47caff 50%
105-
);
95+
--vp-home-hero-name-background: -webkit-linear-gradient(120deg, #bd34fe 30%, #41d1ff);
96+
97+
--vp-home-hero-image-background-image: linear-gradient(-45deg, #bd34fe 50%, #47caff 50%);
10698
--vp-home-hero-image-filter: blur(44px);
10799
}
108100

@@ -136,4 +128,3 @@
136128
.DocSearch {
137129
--docsearch-primary-color: var(--vp-c-brand-1) !important;
138130
}
139-

docs/document/Skill/FSharp/docs/Functional Quick Start.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ let _ = student.name // dot accessor for records // [!code highlight]
8282

8383
**Discriminate Unions** uses new type to **wrap** over a known type to provide extra **label/description**.
8484
Such semantic difference is enforced by **nominal type system**. The following example shows how to define a `Shape` union with sub-types,
85-
the subjective relation is **not done by object inheritance** but by simple grouping since we don't need to maintain the statue thanks to **immutability**.
85+
the subjective relation is **not done by object inheritance** but by simple grouping since we don't need to maintain the object state thanks to **immutability**.
8686

8787
```fsharp
8888
type Shape =

0 commit comments

Comments
 (0)