Skip to content

[Feature Request]: Evaluate possible default flag values for @wordpress/scripts #110

@tyrann0us

Description

@tyrann0us

Is your feature request related to a problem?

The wp-scripts-lint.yml workflow does not hardcode default flag values, so whenever a *LINT_ARGS input is used, calling workflows must pass the default value, too. This is verbose, resulting in a lot of copying & pasting. Also, it's very error-prone because users just don't know they must add default values after their custom flags.

Describe the desired solution

It would be better if the reusable workflow would hardcode sensible default flag values. These would be appended after the *LINT_ARGS input.

Judging from this search: https://github.com/search?q=org%3Ainpsyde+OR+org%3AInpsyde-Global-Service-Provider+wp-scripts-lint+ARGS+language%3AYAML&type=code, the most often repeated flags are the following:

  • MARKDOWNLINT_ARGS: --ignore node_modules
  • STYLELINT_ARGS: --formatter github

Describe the alternatives that you have considered

Alternatively, we would update the documentation to warn users to always add defaults.

Additional context

It is unclear what value is used when a flag is both set with an input and with the following hardcoded flag.

Code of Conduct

  • I agree to follow this project's Code of Conduct

Edit:
MARKDOWNLINT_ARGS

Metadata

Metadata

Labels

enhancementNew feature or request

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions