-
Notifications
You must be signed in to change notification settings - Fork 10.8k
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
Standardize linting: plugins #32795
Standardize linting: plugins #32795
Conversation
58d9e2c
to
b06b34d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So the only criticism I have is since this is to lint plugins in the monorepo, how come we need to be in plugins/woocommerce
to execute this command? Can we move it up a level?
Good question. The goal of standardizing these linting scripts is so that the same command can be executed for all projects from root level, ie |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Works well. Good job.
Hi @roykho, thanks for merging this pull request. Please take a look at these follow-up tasks you may need to perform:
|
All Submissions:
Changes proposed in this Pull Request:
Introduce
lint:fix
scripts toplugins/woocommerce
andplugins/woocommerce-admin
. This PR also modifieslint
such that the entire project (php and js) get linted.See here to view changes without whitespace.
In practice this isn't a reasonable thing a person would do. Not only are there massive amounts of violations, but the time required to perform this task renders it rather useless. I'm open to input on this as the motivation is simply to conform to the same linting constructs across the monorepo. In reality, linting files on commits via
lint-staged
is the more practical approach, which we are doing currently.Also, this PR changes lint rules from WordPress to WooCommerce via
@woocommerce/eslint-plugin
.Partial fixer upper for #32653
How to test the changes in this Pull Request:
pnpm install
cd plugins/woocommerce
pnpm run lint
Other information:
pnpm nx affected --target=changelog
?FOR PR REVIEWER ONLY: