Skip to content

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 from npm init
  • have a dev script and a start script
  • abstract script names from their implementation (test, not jest)
  • 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 a foo)
  • 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)


scriptlint status
npm version badge
dependency badge
Issue badge
CI badge

Clone this wiki locally