chore: migrate to package.json-based linting package management#2576
chore: migrate to package.json-based linting package management#2576MikeMcC399 wants to merge 5 commits into
Conversation
Move version definition of npm packages to package.json & package-lock.json: - doctoc - markdown-link-check - prettier Update linting workflows. Enable npm updating through Dependabot. Add scripts and documentation to aid local linting.
| "private": true, | ||
| "type": "commonjs", | ||
| "scripts": { | ||
| "format:toc": "doctoc --update-only .", |
There was a problem hiding this comment.
Playing with this locally I needed additional parameters, but maybe it was a version issue. I had "doctoc:README": "doctoc README.md --github --title \"## Table of Contents\"", separate targets, otherwise I thing the title stuff was causing a diff
There was a problem hiding this comment.
Which operating system are you running under?
but maybe it was a version issue
What version are you referring to? To test you should be using "doctoc": "2.5.0" defined in package.json
It should not be necessary to have a --title option in the command line unless you are creating a new ToC.
|
Many thanks for your review! I think I've addressed the points you raised. In parallel I submitted #2577 to remove https://sourceware.org/ from link testing. It has been flakily failing during my tests, so I'd just want to ignore it for future |
Description
Move version definition of npm packages to
package.json&package-lock.json:Use Node.js 24 (Active LTS).
Update linting workflows to run based on above package definitions:
workflow_dispatch:event triggers are added to make it easier to check linting issue before submitting a PR.Enable weekly npm updating through Dependabot.
Update CONTRIBUTING with prerequisites and linting instructions. Add Table of Contents.
Motivation and Context
The following workflows currently install npm dependencies on the fly. Code scanning alerts notes this as an issue.
latest)By moving the package version selection from GitHub Actions to npm
package.json&package-lock.jsonfiles, versions can be pinned exactly and maintained regularly by Dependabot.Setting Dependabot and npm minimum age to 5 days for updates, reduces the risk of fast supply-chain attacks:
Testing Details
Types of changes
Checklist