Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add lint:fix to package.json #2514

Open
brian-smith-tcril opened this issue Aug 9, 2023 · 5 comments
Open

add lint:fix to package.json #2514

brian-smith-tcril opened this issue Aug 9, 2023 · 5 comments

Comments

@brian-smith-tcril
Copy link
Contributor

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.

@adamstankiewicz
Copy link
Member

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 😄).

@adamstankiewicz
Copy link
Member

adamstankiewicz commented Aug 9, 2023

@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.

@brian-smith-tcril
Copy link
Contributor Author

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

@brian-smith-tcril
Copy link
Contributor Author

we may want to have improved documentation (in the README?) around what NPM scripts exist for this repo (that's a lot now ).

good call #2515

@PKulkoRaccoonGang
Copy link
Contributor

PKulkoRaccoonGang commented Aug 7, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants