-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
enhancementNew feature or requestNew feature or request
Description
It would be nice to have a linting rule that enforces to group scripts.
I want this:
"scripts": {
"test": "jest",
"test:lint": "eslint *.js src --ext ts",
"posttest": "run-p test:lint",
"build": "tsc -p ./tsconfig.build-cjs.json",
"build:cleanup": "rimraf build-cjs build-esm",
"update:psl-fixture": "ts-node --transpile-only ./src/scripts/update-psl-fixture.ts",
"update:tries": "ts-node --transpile-only ./src/scripts/update-tries.ts",
"update:dependencies": "updtr"
},instead of:
"scripts": {
"test:lint": "eslint *.js src --ext ts",
"test": "jest",
"posttest": "run-p test:lint",
"update:dependencies": "updtr"
"build:cleanup": "rimraf build-cjs build-esm",
"build": "tsc -p ./tsconfig.build-cjs.json",
"update:psl-fixture": "ts-node --transpile-only ./src/scripts/update-psl-fixture.ts",
"update:tries": "ts-node --transpile-only ./src/scripts/update-tries.ts",
},- All scripts with the same prefix should be grouped together
- If there is a "parent" script (like
buildfor allbuild:*scripts), it should be above all child scripts
Challenges
pretest/posttestand maybe some other npm scripts don't fit into that scheme. Nevertheless it would be nice to have them grouped with the test scripts.pretestshould also be abovetest,posttestshould be belowtest
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request