Skip to content

Commit 676ae00

Browse files
committed
chore: update project
1 parent 2fec248 commit 676ae00

File tree

179 files changed

+14656
-6461
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

179 files changed

+14656
-6461
lines changed

.gitattributes

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# .gitattributes
2+
* text=auto eol=lf
3+
*.zip binary
4+
# GitHub Linguist Override
5+
.yarn/* linguist-vendored
6+
.pnp.js linguist-vendored

CONTRIBUTING.md .github/CONTRIBUTING.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -31,19 +31,19 @@ The linting configuration **should** be opinionated.
3131
> Why?
3232
3333
This guideline is designed for programmers.
34-
Thus the linting rules are customized to:
34+
Thus, the linting rules are customized to:
3535

3636
- Simplify usage
37-
- Minimize typings
37+
- Minimize typing
3838
- Utilize features for programmers
3939

4040
## Markdown Flavor
4141

42-
This guideline **should** use [github flavored markdown](https://help.github.com/articles/github-flavored-markdown/).
42+
This guideline **should** use [GitHub flavored Markdown](https://help.github.com/articles/github-flavored-markdown/).
4343

4444
> Why?
4545
46-
Because this guideline is saved in github and can be viewed there.
46+
Because this guideline is saved in GitHub and can be viewed there.
4747

4848
---
4949

@@ -245,12 +245,12 @@ Where `<>` is required, `[]` is optional.
245245

246246
## Requirement Level Keywords
247247

248-
We follows the [RFC 2119](https://www.ietf.org/rfc/rfc2119.txt) to describe the requirement levels.
248+
We follow the [RFC 2119](https://www.ietf.org/rfc/rfc2119.txt) to describe the requirement levels.
249249

250250
These keywords are: `MUST`, `MUST NOT`, `REQUIRED`, `SHALL`, `SHALL NOT`, `SHOULD`, `SHOULD NOT`, `RECOMMENDED`, `MAY`, and `OPTIONAL`.
251251

252252
The keywords will be highlighted in `bold` (e.g. `**must**`).
253253

254254
> Why?
255255
256-
Provide a consistent verbage for the recommendation.
256+
Provide a consistent verbiage for the recommendation.

.github/mergify.yml

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
pull_request_rules:
2+
- name: automatic merge for Dependabot pull requests
3+
conditions:
4+
- author~=^dependabot(|-preview)\[bot\]$
5+
- title~=^Bump [^\s]+ from ([\d]+)\..+ to \1\.
6+
actions:
7+
merge:
8+
method: squash
9+
- name: automatic merge for Renovate pull requests (except major)
10+
conditions:
11+
- author=renovate[bot]
12+
- head~=^(?!major-)
13+
actions:
14+
merge:
15+
method: squash
16+
- name: automatic merge for Snyk pull requests
17+
conditions:
18+
- title~=^\[Snyk\]
19+
- head~=^snyk-fix
20+
- check-success~=^security/snyk
21+
actions:
22+
merge:
23+
method: squash

.github/renovate.json

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"extends": [
3+
"github>unional/renovate-preset"
4+
]
5+
}

.github/workflows/ci.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: ci
22
on:
33
push:
44
branches:
5-
- master
5+
- main
66
pull_request:
77
types: [opened, synchronize]
88
jobs:

.gitignore

+44
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,52 @@ node_modules
4242
# typings
4343
/typings/
4444

45+
# yarn
46+
.pnp.*
47+
.yarn/*
48+
!.yarn/patches
49+
!.yarn/plugins
50+
!.yarn/releases
51+
!.yarn/sdks
52+
!.yarn/versions
53+
4554
# output folder
55+
.turbo
4656
out/
4757
lib/
4858
._.DS_Store
4959
tsconfig.tsbuildinfo
60+
61+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
62+
63+
# dependencies
64+
node_modules
65+
.pnp
66+
.pnp.js
67+
68+
# testing
69+
coverage
70+
71+
# next.js
72+
.next/
73+
out/
74+
build
75+
76+
# misc
77+
.DS_Store
78+
*.pem
79+
80+
# debug
81+
npm-debug.log*
82+
yarn-debug.log*
83+
yarn-error.log*
84+
.pnpm-debug.log*
85+
86+
# local env files
87+
.env.local
88+
.env.development.local
89+
.env.test.local
90+
.env.production.local
91+
92+
# turbo
93+
.turbo

.gitmodules

-6
This file was deleted.

.husky/commit-msg

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#!/bin/sh
2+
yarn commitlint --edit $1

.markdownlint.json

-5
This file was deleted.

.releaserc.json

-12
This file was deleted.

.vscode/ltex.dictionary.en-US.txt

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
CommonJS
2+
unional
3+
Homa
4+
NONINFRINGEMENT
5+
Async
6+
Descructuring
7+
Accessor
8+
Destructuring
9+
tsconfig
10+
11+
json
12+
StackOverflow
13+
@semlinker
14+
@dzharii
15+
npm-url
16+
Docusaurus
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"rule":"MORFOLOGIK_RULE_EN_US","sentence":"^\\Q[NPM version]npm-url [GitHub NodeJS]github-action-url\\E$"}

.vscode/settings.json

+21-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,22 @@
11
{
2-
"typescript.tsdk": "node_modules\\typescript\\lib"
3-
}
2+
"search.exclude": {
3+
"**/.yarn": true
4+
},
5+
"typescript.tsdk": "node_modules\\typescript\\lib",
6+
"cSpell.words": [
7+
"apos",
8+
"clsx",
9+
"dzharii",
10+
"horiz",
11+
"stroustrup"
12+
],
13+
"markdownlint.ignore": [
14+
"LICENSE"
15+
],
16+
"markdownlint.config": {
17+
"default": true,
18+
"MD013": false,
19+
"MD024": false,
20+
"MD033": false
21+
}
22+
}

.yarnrc.yml

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
nodeLinker: node-modules

LICENSE

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2016 Homa Wong
3+
Copyright © 2018 Homa Wong (unional) ([email protected])
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal
@@ -9,13 +9,13 @@ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
99
copies of the Software, and to permit persons to whom the Software is
1010
furnished to do so, subject to the following conditions:
1111

12-
The above copyright notice and this permission notice shall be included in all
13-
copies or substantial portions of the Software.
12+
The above copyright notice and this permission notice shall be included in
13+
all copies or substantial portions of the Software.
1414

1515
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1616
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1717
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1818
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1919
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21-
SOFTWARE.
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21+
THE SOFTWARE.

README.md

+49-51
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
# Typescript Guidebook
22

33
[![NPM version][npm-image]][npm-url]
4-
[![Github NodeJS][github-nodejs]][github-action-url]
4+
[![GitHub NodeJS][github-nodejs]][github-action-url]
55

66
Welcome to the TypeScript Guidebook.
77

8-
This guidebook suppliments the official [TypeScript Handbook](http://www.typescriptlang.org/docs/handbook/basic-types.html) while focusing on _how to get the most out of TypeScript with minimal effort_.
8+
This guidebook supplements the official [TypeScript Handbook] while focusing on *how to get the most out of TypeScript with minimal effort*.
99

1010
I will cover anything and everything you need when writing TypeScript.
1111
From how to use the language, to coding style and any tool that may be useful.
@@ -22,7 +22,7 @@ From how to use the language, to coding style and any tool that may be useful.
2222
- Formatter
2323
- [prettier](https://prettier.io/)
2424
- Linter
25-
- [eslint](https://eslint.org/)
25+
- [ESLint](https://eslint.org/)
2626

2727
## Watch this repo
2828

@@ -32,53 +32,53 @@ You can click the watch button if you want to be notified.
3232
## Disclaimer
3333

3434
Recently I do most of my work in VS Code.
35-
So if you find that some of the guidelines doesn't work well in your IDE,
36-
let me know and we can see how to get it working on your IDE.
35+
So if you find that some guidelines doesn't work well in your IDE,
36+
let me know, and we can see how to get it working on your IDE.
3737

3838
## Table of Contents
3939

40-
- [What's new](/pages/00-updates/README.md)
41-
- [Introduction](/pages/01-introduction/README.md)
42-
- [What is TypeScript](/pages/01-introduction/what-is-typescript.md)
43-
- [JavaScript Syntax](/pages/02-javascript-syntax/README.md)
44-
- [Array](/pages/02-javascript-syntax/array.md)
45-
- [Arrow Function](/pages/02-javascript-syntax/arrow-function.md)
46-
- [Assignment](/pages/02-javascript-syntax/assignment.md)
47-
- [Async Await](/pages/02-javascript-syntax/async-await.md)
48-
- [Boolean](/pages/02-javascript-syntax/boolean.md)
49-
- [Class](/pages/02-javascript-syntax/class.md)
50-
- [Declaration Statements](/pages/02-javascript-syntax/declaration-statements.md)
51-
- [Decorator](/pages/02-javascript-syntax/decorator.md)
52-
- [Default Parameters](/pages/02-javascript-syntax/default-parameters.md)
53-
- [Error](/pages/02-javascript-syntax/error.md)
54-
- [Function](/pages/02-javascript-syntax/function.md)
55-
- [Module](/pages/02-javascript-syntax/module.md)
56-
- [Object Descructuring](/pages/02-javascript-syntax/object-destructuring.md)
57-
- [Object Literal](/pages/02-javascript-syntax/object-literal.md)
58-
- [Property Accessor](/pages/02-javascript-syntax/property-accessor.md)
59-
- [String](/pages/02-javascript-syntax/string.md)
60-
- [this](/pages/02-javascript-syntax/this.md)
61-
- [TypeScript Syntax](/pages/04-typescript-syntax/README.md)
62-
- [Type Declaration](/pages/04-typescript-syntax/type-declaration.md)
63-
- [Basic Types](/pages/04-typescript-syntax/basic-types.md)
64-
- [Interfaces](/pages/04-typescript-syntax/interfaces.md)
65-
- [Modules](/pages/04-typescript-syntax/modules.md)
66-
- [Tuple Type](/pages/04-typescript-syntax/tuple-type.md)
67-
- [Files and Projects](/pages/07-files-and-projects/README.md)
68-
- [Compiler Options](/pages/07-files-and-projects/compiler-options.md)
69-
- [Files](/pages/07-files-and-projects/file-types.md)
70-
- [Code Organization](/pages/07-files-and-projects/code-organization.md)
71-
- [tsconfig.json](/pages/07-files-and-projects/tsconfig.md)
72-
- [package.json](/pages/07-files-and-projects/package.json.md)
73-
- [Converting from JavaScript](/pages/07-files-and-projects/converting-from-javascript.md)
40+
- [What's new](/docs/pages/00-updates/README.md)
41+
- [Introduction](/docs/pages/01-introduction/README.md)
42+
- [What is TypeScript](/docs/pages/01-introduction/what-is-typescript.md)
43+
- [JavaScript Syntax](/docs/pages/02-javascript-syntax/README.md)
44+
- [Array](/docs/pages/02-javascript-syntax/array.md)
45+
- [Arrow Function](/docs/pages/02-javascript-syntax/arrow-function.md)
46+
- [Assignment](/docs/pages/02-javascript-syntax/assignment.md)
47+
- [Async Await](/docs/pages/02-javascript-syntax/async-await.md)
48+
- [Boolean](/docs/pages/02-javascript-syntax/boolean.md)
49+
- [Class](/docs/pages/02-javascript-syntax/class.md)
50+
- [Declaration Statements](/docs/pages/02-javascript-syntax/declaration-statements.md)
51+
- [Decorator](/docs/pages/02-javascript-syntax/decorator.md)
52+
- [Default Parameters](/docs/pages/02-javascript-syntax/default-parameters.md)
53+
- [Error](/docs/pages/02-javascript-syntax/error.md)
54+
- [Function](/docs/pages/02-javascript-syntax/function.md)
55+
- [Module](/docs/pages/02-javascript-syntax/module.md)
56+
- [Object Destructuring](/docs/pages/02-javascript-syntax/object-destructuring.md)
57+
- [Object Literal](/docs/pages/02-javascript-syntax/object-literal.md)
58+
- [Property Accessor](/docs/pages/02-javascript-syntax/property-accessor.md)
59+
- [String](/docs/pages/02-javascript-syntax/string.md)
60+
- [this](/docs/pages/02-javascript-syntax/this.md)
61+
- [TypeScript Syntax](/docs/pages/04-typescript-syntax/README.md)
62+
- [Type Declaration](/docs/pages/04-typescript-syntax/type-declaration.md)
63+
- [Basic Types](/docs/pages/04-typescript-syntax/basic-types.md)
64+
- [Interfaces](/docs/pages/04-typescript-syntax/interfaces.md)
65+
- [Modules](/docs/pages/04-typescript-syntax/modules.md)
66+
- [Tuple Type](/docs/pages/04-typescript-syntax/tuple-type.md)
67+
- [Files and Projects](/docs/pages/07-files-and-projects/README.md)
68+
- [Compiler Options](/docs/pages/07-files-and-projects/compiler-options.md)
69+
- [Files](/docs/pages/07-files-and-projects/file-types.md)
70+
- [Code Organization](/docs/pages/07-files-and-projects/code-organization.md)
71+
- [tsconfig.json](/docs/pages/07-files-and-projects/tsconfig.md)
72+
- [package.json](/docs/pages/07-files-and-projects/package.json.md)
73+
- [Converting from JavaScript](/docs/pages/07-files-and-projects/converting-from-javascript.md)
7474
- Coding Practice
75-
- [Testing](pages/08-testing/testing.md)
76-
- [Typings](pages/typings/README.md)
77-
- [Functions](pages/typings/functions.md)
78-
- [Overloading](pages/typings/overloading.md)
79-
- [Namespaces and Modules](pages/typings/namespaces-and-modules.md)
80-
- [Shape of typings](pages/typings/shape-of-typings.md)
81-
- [tslint configuration](pages/typings/tslint.md)
75+
- [Testing](/docs/pages/08-testing/testing.md)
76+
- [Typings](/docs/pages/typings/README.md)
77+
- [Functions](/docs/pages/typings/functions.md)
78+
- [Overloading](/docs/pages/typings/overloading.md)
79+
- [Namespaces and Modules](/docs/pages/typings/namespaces-and-modules.md)
80+
- [Shape of typings](/docs/pages/typings/shape-of-typings.md)
81+
- [TSLint configuration](/docs/pages/typings/tslint.md)
8282

8383
## Other Resources
8484

@@ -92,9 +92,9 @@ Here are some additional resources in JavaScript and TypeScript:
9292
- [TypeScript Playground](https://www.typescriptlang.org/play/index.html) is a great way if you want to quickly test out TypeScript syntax.
9393
- [TypeScript Deep Dive](https://basarat.gitbooks.io/typescript/) by [That TypeScript Guy](https://twitter.com/basarat)
9494
- [StackOverflow](https://stackoverflow.com/questions/tagged/typescript) always a great place to ask questions
95-
- [TypeScript Gitter Channel](https://gitter.im/Microsoft/TypeScript) the official gitter channel for the TypeScript repository.\\
95+
- [TypeScript Gitter Channel](https://gitter.im/Microsoft/TypeScript) the official Gitter channel for the TypeScript repository.\\
9696
You can get help from the TypeScript team directly here.
97-
- [Airbnb Javascript](https://github.com/airbnb/javascript)
97+
- [Airbnb JavaScript](https://github.com/airbnb/javascript)
9898
- [@dzharii Awesome TypeScript](https://github.com/dzharii/awesome-typescript)
9999
- [@semlinker Awesome TypeScript](https://github.com/semlinker/awesome-typescript)
100100

@@ -105,9 +105,7 @@ Interested in helping to make this guideline more useful to everyone? Great 🌷
105105
You can check out this [contributing guide](/CONTRIBUTING.md) to get you get familiar with the convention we use here.
106106

107107
[npm-image]: https://img.shields.io/npm/v/typescript-style.svg?style=flat
108-
109108
[npm-url]: https://npmjs.org/package/typescript-style
110-
111109
[github-nodejs]: https://github.com/unional/typescript-guidebook/workflows/ci/badge.svg
112-
113110
[github-action-url]: https://github.com/unional/typescript-guidebook/actions
111+
[TypeScript Handbook]: http://www.typescriptlang.org/docs/handbook/basic-types.html

0 commit comments

Comments
 (0)