-
Notifications
You must be signed in to change notification settings - Fork 6
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
Change default @wordpress/scripts
flag values
#111
Conversation
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 💪🏻
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.
Thanks!
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.
When removing --formatter
as default and setting it hard, could lead to errors due setting the formatter twice. We should parse the string if --formatter
is present, and if not, set the default.
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.
As discussed today (27.02.2024), we are not going to check for --formatter
and hardcode it for stylelint to github
. In case, in future, someone wants to choose between formatters, we are going to update that action and check via contains()
the input and only append when a formatter is not set.
Please check if the PR fulfills these requirements
What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
Feature
What is the current behavior? (You can also link to an open issue here)
There are two separate issues with flags passed to
@wordpress/scripts
commands:The
STYLELINT_ARGS
input defaults to--formatter github
, so whenever a calling workflow uses this input, it must also provide this flag.The
MARKDOWNLINT_ARGS
input defaults to--ignore LICENSE.md --ignore node_modules
. The latter was only introduced (c563285) because@wordpress/scripts
' default behavior of ignoring thenode_modules/
folder is overridden when an--ignore
flag is used. However, adding the first flag was actually an error because (current) packages don't useLICENSE.md
files but an extension-free plain textLICENSE
file.What is the new behavior (if this is a feature change)?
This PR introduces two changes: Both the
STYLELINT_ARGS
and theMARKDOWNLINT_ARGS
inputs default to an empty string.For Stylelint, the
--formatter github
flag is hardcoded appended to the command. This means calling workflows usingSTYLELINT_ARGS
no longer have to pass this flag.For Markdownlint,
@wordpress/scripts
will now ignorenode_modules/
by default if no--ignore
flag is passed via theMARKDOWNLINT_ARGS
.Does this PR introduce a breaking change? (What changes might users need to make in their application due to this PR?)
No.
Other information:
Fixes #110