-
Notifications
You must be signed in to change notification settings - Fork 1
The scriptlint "standard" tl;dr
tannerbaum edited this page Feb 26, 2020
·
2 revisions
Here's the tl;dr of all the best practices we consider the "scriptlint
standard"
Your package.json
's "scripts"
section should…
- have a
test
script that is not the default script fromnpm init
- have a
dev
script and astart
script - abstract script names from their implementation (
test
, notjest
) - use namespaces to categorize scripts (
"test:unit": "jest"
) - use
:
as a namespace separator - be in alphabetic or natural order
- have a trigger script for all hooks (if you have
preFoo
, there must be afoo
) - use
camelCase
for all script names - not alias
devDependencies
("jest": "jest"
) - not use
&&
or&
for sequential or parallel script execution (doesn't work on all operating systems)
(regular = default rule, italic = "strict" rule)
- Motivation
- The scriptlint "standard" tl;dr
-
The scriptlint "standard"
- Rules enforceable via the scriptlint CLI
- Best practices
- The scriptlint CLI
- Contributing to scriptlint