package
an enforcable script naming standard for package.json
npm install scriptlintGitHub-flavored package documentation.
Across all versions.
Download trend unavailable.
Runtime metadata.

Enforceable standards for your package.json scripts – like eslint for npm run
⚠️ Requires nodejs >= 14.x.x
package.json scripts are an integral part of the Node dev experience: we use them to start our projects, run our dev environments and for all kinds of formatting, linting and tooling in general. They are just as important as our code. Yet we don't treat them with the same meticulous attention to detail. Scripts need :heart: too!
One of the main goals for scriptlint was to enable people to use memorable and consistent script names across their projects. Tools like nps are great when you have to organize scripts with a certain level of complexity, but they don't help you with the structure and naming of your scripts.
This is where the scriptlint CLI shines: it makes best practices outlined in this documentation enforceable throughout your project(s). Think of it as eslint for your "scripts" section.
Here's the tl;dr of all the best practices we consider the "scriptlint standard"
Your package.json's "scripts" section should…
test script that is not the default script from npm initdev script and a start scripttest, not jest)"test:unit": "jest"): as a namespace separatorprefoobar, there must be a foobar script)camelCase for all script namesdevDependencies (no "jest": "jest")&& or & for sequential or parallel script execution(italic = strict rule)
Read more about the standard rules here
Install locally:
npm install scriptlint -D (or yarn add scriptlint -D)
… then run npx scriptlint --strict
Would you like a scriptlint badge for your project readme? No problem: have a look at https://scriptlint.peerigon.io/ or adapt the snippet below:
[](https://scriptlint.peerigon.io/issues/scriptlint/latest)Estimated unpacked size across 9 packages.
2.1 MB
Includes dependencies.
4 direct · 4 outdated
^4.1.2
6.0.1
^10.0.1
15.1.0
^8.1.3
10.0.1
^6.1.0
7.0.2