Skip to content

natural order

Moritz Jacobs edited this page Sep 18, 2020 · 2 revisions

natural-order

This rule is fixable ✓

Why?/How?/Examples

Scripts can be sorted in what we consider a "natural order", so pre*/post* hooks are grouped with their callers – the rest is alphabetical:

{
	"prebuild": "foo",
	"build": "foo",
	"build:cleanup": "bar",
	"postbuild": "foo",
	"publish": "ok",
	"prepublishOnly": "else",
	"pretest": "baz",
	"test": "jest",
	"test:lint": "baz",
	"posttest": "baz",
	"update": "foo",
	"update:dependencies": "updtr",
	"update:typings": "something"
}


scriptlint status
npm version badge
dependency badge
Issue badge
CI badge

Clone this wiki locally