Open brian-smith-tcril opened 1 year ago
Good idea to have! Also, perhaps as a separate task, we may want to have improved documentation (in the README?) around what NPM scripts exist for this repo (that's a lot now 😄).
@brian-smith-tcril Secondary thought, are you aware of any tooling in place to ensure common NPM scripts exist on repos? Similar to how PRs automatically open to add missing standard GitHub action workflows, etc.
Maybe thats a level of standardization too far, but I could see some script automatically running to open a PR to add a lint:fix
script to JS repos that don't have it. Beyond this, or now that we're introducing a Paragon CLI to more easily work with custom @edx/brand
packages during local development, it'd be great to more automatically add/maintain the following NPM scripts to save needing to manually go through each repo ourselves:
{
"scripts": {
"start:with-theme": "paragon install-theme && npm start",
"build:with-theme": "paragon install-theme && npm run build",
}
}
Food for thought. Not sure if the juice is worth the squeeze to build out such automated tooling for modifying repo's common configured NPM scripts.
are you aware of any tooling in place to ensure common NPM scripts exist on repos?
not off the top of my head, it does seem like something we could include in a github action similar to the one we discussed adding for dependency checks
we may want to have improved documentation (in the README?) around what NPM scripts exist for this repo (that's a lot now ).
This is a great idea, thanks Brian! I admit, I manually add parameters for fixing before I need to run the linter :)
As an additional point, should we add a separate command to lint the www
directory? I periodically remove www
from .eslintignore in order to check the code and fix problems.
We have this in
frontend-template-application
https://github.com/openedx/frontend-template-application/blob/984c19a3a617c2686fbdb412c6eec637d3725ccf/package.json#L16.It'd be nice to be able to tell people who have lint errors on their PR to try running
npm run lint:fix
to quickly resolve lint issues.