-
Notifications
You must be signed in to change notification settings - Fork 0
Enable @wordpress/stylelint-config
#44
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
base: main
Are you sure you want to change the base?
Enable @wordpress/stylelint-config
#44
Conversation
Agree. Let's wait for upstream improvement. |
see also WordPress/gutenberg#65681 |
Thank you for linking that @Mouvedia |
WordPress/gutenberg#66272 has been merged. |
Tests for the WordPress Stylelint config are now working. |
stylelint-version-override: | ||
type: string | ||
description: The Stylelint version override | ||
working-directory-is-workspace: |
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.
npm workspaces often assume that npm install
and other commands are run from the project root.
…common-loon-ff72516719
uses: ./.github/workflows/test-package.yml | ||
name: latest | ||
with: | ||
package: '@wordpress/stylelint-config' | ||
stylelint-version: stylelint@latest | ||
working-directory-is-workspace: true | ||
build-command: exit 0 | ||
test-command: npm run test:unit -- --testPathPattern packages/stylelint-config |
Check warning
Code scanning / CodeQL
Workflow does not contain permissions Medium test
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI about 2 months ago
To fix the problem, add a permissions
block to the workflow file. This block should be placed at the root level (recommended), so it applies to all jobs unless overridden. The minimal safe default is contents: read
, which allows the workflow to read repository contents but not write to them. If the workflow or any called workflow requires additional permissions, those can be added as needed. In this case, since the workflow appears to only run tests and does not seem to require write access, contents: read
is appropriate. The change should be made at the top level of .github/workflows/test-package-wordpress-stylelint-config-54e.latest.yml
, after the name:
and before on:
.
-
Copy modified lines R2-R3
@@ -1,2 +1,4 @@ | ||
name: '@wordpress/stylelint-config' | ||
permissions: | ||
contents: read | ||
on: |
uses: ./.github/workflows/test-package.yml | ||
name: next | ||
with: | ||
package: '@wordpress/stylelint-config' | ||
stylelint-version: stylelint/stylelint | ||
working-directory-is-workspace: true | ||
build-command: exit 0 | ||
test-command: npm run test:unit -- --testPathPattern packages/stylelint-config |
Check warning
Code scanning / CodeQL
Workflow does not contain permissions Medium test
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI about 2 months ago
To fix the problem, you should add a permissions
block to the workflow file .github/workflows/test-package-wordpress-stylelint-config-54e.next.yml
. The block should be placed at the root level (above jobs:
) to apply to all jobs in the workflow, unless a job overrides it. The minimal starting point is usually contents: read
, which is sufficient for most workflows that do not need to write to the repository. If the workflow or any called workflow requires additional permissions (e.g., to create pull requests or issues), you can add those as needed. In this case, since the workflow appears to be running tests and not performing write operations, contents: read
is likely sufficient.
-
Copy modified lines R2-R3
@@ -1,2 +1,4 @@ | ||
name: '@wordpress/stylelint-config' | ||
permissions: | ||
contents: read | ||
on: |
See #39
Blocked on WordPress/gutenberg#59933
Gutenberg uses a bespoke setup to emulate workspaces.
I would like to avoid adding support for their custom setup and instead wait until they align with standard npm workspaces.