Skip to content

Conversation

@romainmenke
Copy link
Member

@romainmenke romainmenke commented Sep 14, 2024

Which issue, if any, is this issue related to?

See #39

Is there anything in the PR that needs further explanation?

stylelint-config-standard-vue supports 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.

@romainmenke romainmenke marked this pull request as draft September 14, 2024 15:56
@Mouvedia
Copy link
Member

@ota-meshi should we keep stylelint-config-standard-vue?

Comment on lines +22 to +26
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

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {}

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.


Suggested changeset 1
.github/workflows/test-package-stylelint-config-standard-vue-ac5.latest.yml

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/.github/workflows/test-package-stylelint-config-standard-vue-ac5.latest.yml b/.github/workflows/test-package-stylelint-config-standard-vue-ac5.latest.yml
--- a/.github/workflows/test-package-stylelint-config-standard-vue-ac5.latest.yml
+++ b/.github/workflows/test-package-stylelint-config-standard-vue-ac5.latest.yml
@@ -1,2 +1,4 @@
 name: stylelint-config-standard-vue
+permissions:
+  contents: read
 on:
EOF
@@ -1,2 +1,4 @@
name: stylelint-config-standard-vue
permissions:
contents: read
on:
Copilot is powered by AI and may make mistakes. Always verify output.
Comment on lines +22 to +26
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

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {}

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.

Suggested changeset 1
.github/workflows/test-package-stylelint-config-standard-vue-ac5.next.yml

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/.github/workflows/test-package-stylelint-config-standard-vue-ac5.next.yml b/.github/workflows/test-package-stylelint-config-standard-vue-ac5.next.yml
--- a/.github/workflows/test-package-stylelint-config-standard-vue-ac5.next.yml
+++ b/.github/workflows/test-package-stylelint-config-standard-vue-ac5.next.yml
@@ -1,2 +1,4 @@
 name: stylelint-config-standard-vue
+permissions:
+  contents: read
 on:
EOF
@@ -1,2 +1,4 @@
name: stylelint-config-standard-vue
permissions:
contents: read
on:
Copilot is powered by AI and may make mistakes. Always verify output.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants