-
Notifications
You must be signed in to change notification settings - Fork 0
Enable stylelint-config-standard-vue
#48
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 stylelint-config-standard-vue
#48
Conversation
|
@ota-meshi should we keep |
…eous-greenland-dog-3ebf2f673f
| uses: ./.github/workflows/test-package.yml | ||
| name: latest | ||
| with: | ||
| package: stylelint-config-standard-vue | ||
| stylelint-version: stylelint@latest |
Check warning
Code scanning / CodeQL
Workflow does not contain permissions Medium test
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 3 months ago
To fix the problem, add a permissions block to the workflow file to explicitly set the minimum required permissions for the GITHUB_TOKEN. Since the job appears to only run tests and does not need to write to the repository, the most restrictive and appropriate setting is contents: read. This block should be added at the top level of the workflow (after name: and before on:) so it applies to all jobs, unless a job needs more permissions. No changes to the job or steps are required.
-
Copy modified lines R2-R3
| @@ -1,2 +1,4 @@ | ||
| name: stylelint-config-standard-vue | ||
| permissions: | ||
| contents: read | ||
| on: |
| uses: ./.github/workflows/test-package.yml | ||
| name: next | ||
| with: | ||
| package: stylelint-config-standard-vue | ||
| stylelint-version: stylelint/stylelint |
Check warning
Code scanning / CodeQL
Workflow does not contain permissions Medium test
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 3 months ago
To fix the problem, we should add a permissions block to the workflow. The best practice is to set this block at the root level, so it applies to all jobs unless overridden. Since the workflow appears to only run tests and does not seem to require write access to repository contents, a minimal permissions block should be used. The recommended minimal permissions are contents: read, which allows the workflow to read repository contents but not modify them. If the workflow or the reusable workflow requires additional permissions (e.g., to create issues or pull requests), those can be added, but for now, we will use the minimal starting point.
The change should be made at the top level of .github/workflows/test-package-stylelint-config-standard-vue-ac5.next.yml, immediately after the name: and before the on: block.
-
Copy modified lines R2-R3
| @@ -1,2 +1,4 @@ | ||
| name: stylelint-config-standard-vue | ||
| permissions: | ||
| contents: read | ||
| on: |
See #39
stylelint-config-standard-vuesupports Stylelint from version 14 and later.However the test suite is setup for Stylelint 14 specifically: https://github.com/ota-meshi/stylelint-config-standard-vue/blob/f60920e8476c81b250ca4896e81c57bedb5d6d9e/tests/fixtures/integrations/stylelint-config-standard-scss/package.json#L7-L10
Given that they want to support older Stylelint versions I am unsure if this will ever reliably pass.