Standardize our npm scripts
See original GitHub issueWe have a number of different projects that are using different conventions for various npm scripts. I’d like us to standardize our script names and what they for the following actions:
- Building - in packages where building is necessary, I’d like to standardize on
build
. I think we are doing this everywhere, but wanted to include here for the record. - Linting - I’d like to standardize on
lint
to lint every type of file, and thenlint:*
, where*
is the file extension, for linting just specific types of files (examples:lint:js
,lint:md
). - Fixing lint errors - throughout our packages we have
fix
,fixlint
,lint:fix
, and some have no lint fix script at all. I’d like to standardize onlint:fix
, which should run on all file types, or elselint:fix:*
to run just on a subtype. - Testing - we are all over the place with this. In some packages
test
runs both linting and testing. In some packages we haveunit:*
scripts and in some we havetest:*
scripts. Some packages have coverage and others do not (test:cover
,coverage
,test-cov
, etc.). I think we should standardize:- That
test
does not includelint
- That we do test coverage
- That all testing that can have coverage does have coverage
- That
test
always runs with coverage - That any subset of testing be named
test:*
. Everytest:*
is run withtest
- That
Thoughts?
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:15 (14 by maintainers)
Top Results From Across the Web
standardize - npm
Scaffolds standard style for a new module. runs npm install --save-dev standard; adds standard to your "scripts" test. PRs/suggestions ...
Read more >Standardize npm script naming in the Gutenberg project
The Gutenberg project has a number of npm scripts defined in the main package.json used for development purposes or with Continues Integration.
Read more >Standardizing Node.js Version in an npm Package
A simple tip which guarantees that every developer on your team is using the same version of Node.js, regardless his global Node.js version ......
Read more >Standardizing TypeScript with NPM, ESLint, and Prettier
Since NPM isn't configured in my sample repository, I'm going to run npm init from the command line to create a new package.json...
Read more >npm Scripts - LearnHowToProgram.com
In the last lesson we tried to run the $ webpack command, but received a ... So by mapping whatever our bundling command...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Here’s a list of the current script names and where they’re used, generated with this script.
We should use the built-in functionality for reporting unused disable directives:
--report-unused-disable-directives
and/orreportUnusedDisableDirectives: true
.--report-unused-disable-directives
is preferable because it produces error severity (reportUnusedDisableDirectives: true
produces warnings). However, it makes sense to use both at the same time, sincereportUnusedDisableDirectives: true
allows reporting unused directives in editors without any additional configuration. We have recently setreportUnusedDisableDirectives: true
ineslint-config-eslint
(https://github.com/eslint/eslint/pull/14699).