mirror of
https://github.com/goldbergyoni/nodebestpractices.git
synced 2026-03-13 08:40:16 +08:00
Various fixes
This commit is contained in:
@@ -18,13 +18,13 @@ jobs:
|
||||
NODE_ENV: test
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Setup Node.js environment
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: '18'
|
||||
- name: Setup Node.js environment
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: "18"
|
||||
|
||||
- run: npm install
|
||||
- run: npm run lint
|
||||
- run: npm install
|
||||
- run: npm run lint
|
||||
|
||||
@@ -703,7 +703,7 @@ b. [Node.js testing - beyond the basics](https://github.com/testjavascript/nodej
|
||||
|
||||
## ![✔] 4.4 Ensure Node version is unified
|
||||
|
||||
**TL;DR:** Use tools that encourage or enforce the same Node.js version across different environments and developers. Tools like [nvm](https://github.com/nvm-sh/nvm), and [Volta](https://volta.sh/) allow specifying the project's version in a file so each team member can run a single command to conform with the project's version. Optionally, this definition can be replicated to CI and the production runtime (e.g., copy the specified value to .Dockerfile build and to the CI declaration file).
|
||||
**TL;DR:** Use tools that encourage or enforce the same Node.js version across different environments and developers. Tools like [nvm](https://github.com/nvm-sh/nvm), and [Volta](https://volta.sh/) allow specifying the project's version in a file so each team member can run a single command to conform with the project's version. Optionally, this definition can be replicated to CI and the production runtime (e.g., copy the specified value to .Dockerfile build and to the CI declaration file)
|
||||
|
||||
**Otherwise:** A developer might face or miss an error because she uses a different Node.js version than her teammates. Even worse - the production runtime might be different than the environment where tests were executed
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
"description": "[✔]: assets/images/checkbox-small-blue.png",
|
||||
"main": "gen-html.js",
|
||||
"scripts": {
|
||||
"lint": "markdownlint ../README*.md"
|
||||
"lint": "markdownlint ./README*.md"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
Reference in New Issue
Block a user