Skip to content

Commit

Permalink
Merge branch 'release/0.5.0' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
gustmartins committed Feb 8, 2023
2 parents 6de5a4c + 455629a commit da2a25e
Show file tree
Hide file tree
Showing 3 changed files with 114 additions and 4 deletions.
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,25 @@ as part of the `standards` NPM script as well:
}
```

### check-node-version

Add a `check-node-version` task to package.json, providing the desired version of Node.js
and NPM that you wish to enforce. Execute it as part of the `test` NPM script as well.

```json
{
"scripts": {
"check-node-version": "check-node-version --node 16.15.0 --npm 8.11.0",
"test": "npm run check-node-version && nyc mocha -- -R spec 'tests/**/*.test.js'"
}
}
```

`check-node-version` allows us to enforce a Node.js and NPM version for our projects. It's
possible that some processes in some projects could fail when the wrong version of Node.js
is enabled in the developer's environment. This helps eliminate one factor from the
equation when troubleshooting.

## License

This software is released under the MIT license. See [the license file](LICENSE) for more
Expand Down
93 changes: 91 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
{
"name": "@gustmartins/standardization",
"version": "0.4.0",
"version": "0.5.0",
"description": "Linting and development standardization to be used in all of my repos",
"scripts": {
"check-node-version": "check-node-version --npm 8 --node 16",
"commitlint": "commitlint --from a8cea67de11452094a77ccb466b8ec08fc13cff9",
"markdownlint": "markdownlint -c .markdownlint.json -i CHANGELOG.md '{,!(node_modules)/**/}*.md'",
"eslint": "eslint .",
"standards": "npm run markdownlint && npm run eslint",
"pretest": "npm run standards",
"test": "echo \"Error: no test specified\" && exit 0"
"test": "npm run check-node-version"
},
"repository": {
"type": "git",
Expand All @@ -32,6 +33,7 @@
"@commitlint/cli": "17.4.2",
"@typescript-eslint/eslint-plugin": "5.51.0",
"@typescript-eslint/parser": "5.51.0",
"check-node-version": "^4.2.1",
"markdownlint-cli": "0.33.0",
"typescript": "4.9.5"
},
Expand Down

0 comments on commit da2a25e

Please sign in to comment.