File tree Expand file tree Collapse file tree 1 file changed +41
-0
lines changed Expand file tree Collapse file tree 1 file changed +41
-0
lines changed Original file line number Diff line number Diff line change @@ -7,3 +7,44 @@ git clone https://github.com/<your-name-here>/template-typescript-node-package
7
7
cd template-typescript-node-package
8
8
pnpm install
9
9
```
10
+
11
+ > This repository includes a list of suggested VS Code extensions.
12
+ > It's a good idea to use [ VS Code] ( https://code.visualstudio.com ) and accept its suggestion to install them, as they'll help with development.
13
+
14
+ ## Building
15
+
16
+ Run [ TypeScript] ( https://typescriptlang.org ) locally to type check and build source files from ` src/ ` into output files in ` lib/ ` :
17
+
18
+ ``` shell
19
+ pnpm build --watch
20
+ ```
21
+
22
+ You should also see suggestions from TypeScript in your editor.
23
+
24
+ ## Formatting
25
+
26
+ [ Prettier] ( https://prettier.io ) is used to format code.
27
+ It should be applied automatically when you save files in VS Code or make a Git commit.
28
+
29
+ ## Linting
30
+
31
+ This package includes several forms of linting to enforce consistent code quality and styling.
32
+ Each should be shown in VS Code, and can be run manually on the command-line:
33
+
34
+ - ` pnpm lint ` ([ ESLint] ( https://eslint.org ) with [ typescript-eslint] ( https://typescript-eslint.io ) ): Lints JavaScript and TypeScript source files
35
+ - ` pnpm lint:md ` ([ Markdownlint] ( https://github.com/DavidAnson/markdownlint ) ): Checks Markdown source files
36
+ - ` pnpm lint:package ` ([ npm-package-json-lint] ( https://npmpackagejsonlint.org/ ) ): Lints the ` package.json ` file
37
+ - ` pnpm lint:packages ` ([ pnpm-deduplicate] ( https://github.com/ocavue/pnpm-deduplicate ) ): Deduplicates packages in the ` pnpm-lock.yml ` file
38
+ - ` pnpm lint:prune ` ([ ts-prune] ( https://github.com/nadeesha/ts-prune ) ): Detects unused exports in TypeScript source files
39
+ - ` pnpm lint:spelling ` ([ cspell] ( https://cspell.org ) ): Spell checks across all source files
40
+
41
+ ## Testing
42
+
43
+ [ Vitest] ( https://vitest.dev ) is used for tests.
44
+ You can run it locally on the command-line:
45
+
46
+ ``` shell
47
+ pnpm test
48
+ ```
49
+
50
+ Test coverage is computed by running tests and placed in the ` coverage/ ` directory locally.
You can’t perform that action at this time.
0 commit comments