eslint-plugin-github-actions-2 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/LICENSE +21 -0
- package/README.md +164 -0
- package/dist/_internal/case-police-dictionary.d.ts +10 -0
- package/dist/_internal/case-police-dictionary.d.ts.map +1 -0
- package/dist/_internal/case-police-dictionary.js +486 -0
- package/dist/_internal/case-police-dictionary.js.map +1 -0
- package/dist/_internal/casing.d.ts +17 -0
- package/dist/_internal/casing.d.ts.map +1 -0
- package/dist/_internal/casing.js +197 -0
- package/dist/_internal/casing.js.map +1 -0
- package/dist/_internal/github-actions-config-references.d.ts +16 -0
- package/dist/_internal/github-actions-config-references.d.ts.map +1 -0
- package/dist/_internal/github-actions-config-references.js +76 -0
- package/dist/_internal/github-actions-config-references.js.map +1 -0
- package/dist/_internal/github-actions-trigger-events.d.ts +13 -0
- package/dist/_internal/github-actions-trigger-events.d.ts.map +1 -0
- package/dist/_internal/github-actions-trigger-events.js +47 -0
- package/dist/_internal/github-actions-trigger-events.js.map +1 -0
- package/dist/_internal/github-expressions.d.ts +9 -0
- package/dist/_internal/github-expressions.d.ts.map +1 -0
- package/dist/_internal/github-expressions.js +87 -0
- package/dist/_internal/github-expressions.js.map +1 -0
- package/dist/_internal/lint-targets.d.ts +21 -0
- package/dist/_internal/lint-targets.d.ts.map +1 -0
- package/dist/_internal/lint-targets.js +60 -0
- package/dist/_internal/lint-targets.js.map +1 -0
- package/dist/_internal/rule-docs.d.ts +16 -0
- package/dist/_internal/rule-docs.d.ts.map +1 -0
- package/dist/_internal/rule-docs.js +2 -0
- package/dist/_internal/rule-docs.js.map +1 -0
- package/dist/_internal/rules-registry.d.ts +145 -0
- package/dist/_internal/rules-registry.d.ts.map +1 -0
- package/dist/_internal/rules-registry.js +144 -0
- package/dist/_internal/rules-registry.js.map +1 -0
- package/dist/_internal/workflow-template-properties.d.ts +20 -0
- package/dist/_internal/workflow-template-properties.d.ts.map +1 -0
- package/dist/_internal/workflow-template-properties.js +44 -0
- package/dist/_internal/workflow-template-properties.js.map +1 -0
- package/dist/_internal/workflow-yaml.d.ts +47 -0
- package/dist/_internal/workflow-yaml.d.ts.map +1 -0
- package/dist/_internal/workflow-yaml.js +140 -0
- package/dist/_internal/workflow-yaml.js.map +1 -0
- package/dist/_internal/yaml-traversal.d.ts +10 -0
- package/dist/_internal/yaml-traversal.d.ts.map +1 -0
- package/dist/_internal/yaml-traversal.js +38 -0
- package/dist/_internal/yaml-traversal.js.map +1 -0
- package/dist/plugin.cjs +7107 -0
- package/dist/plugin.cjs.map +7 -0
- package/dist/plugin.d.cts +34 -0
- package/dist/plugin.d.ts +34 -0
- package/dist/plugin.d.ts.map +1 -0
- package/dist/plugin.js +122 -0
- package/dist/plugin.js.map +1 -0
- package/dist/rules/action-name-casing.d.ts +9 -0
- package/dist/rules/action-name-casing.d.ts.map +1 -0
- package/dist/rules/action-name-casing.js +141 -0
- package/dist/rules/action-name-casing.js.map +1 -0
- package/dist/rules/job-id-casing.d.ts +9 -0
- package/dist/rules/job-id-casing.d.ts.map +1 -0
- package/dist/rules/job-id-casing.js +123 -0
- package/dist/rules/job-id-casing.js.map +1 -0
- package/dist/rules/max-jobs-per-action.d.ts +9 -0
- package/dist/rules/max-jobs-per-action.d.ts.map +1 -0
- package/dist/rules/max-jobs-per-action.js +61 -0
- package/dist/rules/max-jobs-per-action.js.map +1 -0
- package/dist/rules/no-case-insensitive-input-id-collision.d.ts +9 -0
- package/dist/rules/no-case-insensitive-input-id-collision.d.ts.map +1 -0
- package/dist/rules/no-case-insensitive-input-id-collision.js +66 -0
- package/dist/rules/no-case-insensitive-input-id-collision.js.map +1 -0
- package/dist/rules/no-composite-input-env-access.d.ts +9 -0
- package/dist/rules/no-composite-input-env-access.d.ts.map +1 -0
- package/dist/rules/no-composite-input-env-access.js +62 -0
- package/dist/rules/no-composite-input-env-access.js.map +1 -0
- package/dist/rules/no-deprecated-node-runtime.d.ts +9 -0
- package/dist/rules/no-deprecated-node-runtime.d.ts.map +1 -0
- package/dist/rules/no-deprecated-node-runtime.js +59 -0
- package/dist/rules/no-deprecated-node-runtime.js.map +1 -0
- package/dist/rules/no-duplicate-composite-step-id.d.ts +9 -0
- package/dist/rules/no-duplicate-composite-step-id.d.ts.map +1 -0
- package/dist/rules/no-duplicate-composite-step-id.js +74 -0
- package/dist/rules/no-duplicate-composite-step-id.js.map +1 -0
- package/dist/rules/no-empty-template-file-pattern.d.ts +9 -0
- package/dist/rules/no-empty-template-file-pattern.d.ts.map +1 -0
- package/dist/rules/no-empty-template-file-pattern.js +49 -0
- package/dist/rules/no-empty-template-file-pattern.js.map +1 -0
- package/dist/rules/no-external-job.d.ts +9 -0
- package/dist/rules/no-external-job.d.ts.map +1 -0
- package/dist/rules/no-external-job.js +49 -0
- package/dist/rules/no-external-job.js.map +1 -0
- package/dist/rules/no-hardcoded-default-branch-in-template.d.ts +9 -0
- package/dist/rules/no-hardcoded-default-branch-in-template.d.ts.map +1 -0
- package/dist/rules/no-hardcoded-default-branch-in-template.js +54 -0
- package/dist/rules/no-hardcoded-default-branch-in-template.js.map +1 -0
- package/dist/rules/no-icon-file-extension-in-template-icon-name.d.ts +9 -0
- package/dist/rules/no-icon-file-extension-in-template-icon-name.d.ts.map +1 -0
- package/dist/rules/no-icon-file-extension-in-template-icon-name.js +54 -0
- package/dist/rules/no-icon-file-extension-in-template-icon-name.js.map +1 -0
- package/dist/rules/no-inherit-secrets.d.ts +9 -0
- package/dist/rules/no-inherit-secrets.d.ts.map +1 -0
- package/dist/rules/no-inherit-secrets.js +57 -0
- package/dist/rules/no-inherit-secrets.js.map +1 -0
- package/dist/rules/no-invalid-concurrency-context.d.ts +9 -0
- package/dist/rules/no-invalid-concurrency-context.d.ts.map +1 -0
- package/dist/rules/no-invalid-concurrency-context.js +141 -0
- package/dist/rules/no-invalid-concurrency-context.js.map +1 -0
- package/dist/rules/no-invalid-key.d.ts +9 -0
- package/dist/rules/no-invalid-key.d.ts.map +1 -0
- package/dist/rules/no-invalid-key.js +152 -0
- package/dist/rules/no-invalid-key.js.map +1 -0
- package/dist/rules/no-invalid-reusable-workflow-job-key.d.ts +9 -0
- package/dist/rules/no-invalid-reusable-workflow-job-key.d.ts.map +1 -0
- package/dist/rules/no-invalid-reusable-workflow-job-key.js +73 -0
- package/dist/rules/no-invalid-reusable-workflow-job-key.js.map +1 -0
- package/dist/rules/no-invalid-template-file-pattern-regex.d.ts +9 -0
- package/dist/rules/no-invalid-template-file-pattern-regex.d.ts.map +1 -0
- package/dist/rules/no-invalid-template-file-pattern-regex.js +58 -0
- package/dist/rules/no-invalid-template-file-pattern-regex.js.map +1 -0
- package/dist/rules/no-invalid-workflow-call-output-value.d.ts +9 -0
- package/dist/rules/no-invalid-workflow-call-output-value.d.ts.map +1 -0
- package/dist/rules/no-invalid-workflow-call-output-value.js +99 -0
- package/dist/rules/no-invalid-workflow-call-output-value.js.map +1 -0
- package/dist/rules/no-path-separators-in-template-icon-name.d.ts +9 -0
- package/dist/rules/no-path-separators-in-template-icon-name.d.ts.map +1 -0
- package/dist/rules/no-path-separators-in-template-icon-name.js +52 -0
- package/dist/rules/no-path-separators-in-template-icon-name.js.map +1 -0
- package/dist/rules/no-post-if-without-post.d.ts +9 -0
- package/dist/rules/no-post-if-without-post.d.ts.map +1 -0
- package/dist/rules/no-post-if-without-post.js +52 -0
- package/dist/rules/no-post-if-without-post.js.map +1 -0
- package/dist/rules/no-pr-head-checkout-in-pull-request-target.d.ts +12 -0
- package/dist/rules/no-pr-head-checkout-in-pull-request-target.d.ts.map +1 -0
- package/dist/rules/no-pr-head-checkout-in-pull-request-target.js +89 -0
- package/dist/rules/no-pr-head-checkout-in-pull-request-target.js.map +1 -0
- package/dist/rules/no-pre-if-without-pre.d.ts +9 -0
- package/dist/rules/no-pre-if-without-pre.d.ts.map +1 -0
- package/dist/rules/no-pre-if-without-pre.js +51 -0
- package/dist/rules/no-pre-if-without-pre.js.map +1 -0
- package/dist/rules/no-required-input-with-default.d.ts +9 -0
- package/dist/rules/no-required-input-with-default.d.ts.map +1 -0
- package/dist/rules/no-required-input-with-default.js +68 -0
- package/dist/rules/no-required-input-with-default.js.map +1 -0
- package/dist/rules/no-secrets-in-if.d.ts +9 -0
- package/dist/rules/no-secrets-in-if.d.ts.map +1 -0
- package/dist/rules/no-secrets-in-if.js +84 -0
- package/dist/rules/no-secrets-in-if.js.map +1 -0
- package/dist/rules/no-self-hosted-runner-on-fork-pr-events.d.ts +9 -0
- package/dist/rules/no-self-hosted-runner-on-fork-pr-events.d.ts.map +1 -0
- package/dist/rules/no-self-hosted-runner-on-fork-pr-events.js +93 -0
- package/dist/rules/no-self-hosted-runner-on-fork-pr-events.js.map +1 -0
- package/dist/rules/no-subdirectory-template-file-pattern.d.ts +9 -0
- package/dist/rules/no-subdirectory-template-file-pattern.d.ts.map +1 -0
- package/dist/rules/no-subdirectory-template-file-pattern.js +52 -0
- package/dist/rules/no-subdirectory-template-file-pattern.js.map +1 -0
- package/dist/rules/no-template-placeholder-in-non-template-workflow.d.ts +9 -0
- package/dist/rules/no-template-placeholder-in-non-template-workflow.d.ts.map +1 -0
- package/dist/rules/no-template-placeholder-in-non-template-workflow.js +55 -0
- package/dist/rules/no-template-placeholder-in-non-template-workflow.js.map +1 -0
- package/dist/rules/no-top-level-env.d.ts +9 -0
- package/dist/rules/no-top-level-env.d.ts.map +1 -0
- package/dist/rules/no-top-level-env.js +42 -0
- package/dist/rules/no-top-level-env.js.map +1 -0
- package/dist/rules/no-top-level-permissions.d.ts +9 -0
- package/dist/rules/no-top-level-permissions.d.ts.map +1 -0
- package/dist/rules/no-top-level-permissions.js +39 -0
- package/dist/rules/no-top-level-permissions.js.map +1 -0
- package/dist/rules/no-universal-template-file-pattern.d.ts +9 -0
- package/dist/rules/no-universal-template-file-pattern.d.ts.map +1 -0
- package/dist/rules/no-universal-template-file-pattern.js +60 -0
- package/dist/rules/no-universal-template-file-pattern.js.map +1 -0
- package/dist/rules/no-unknown-input-reference-in-composite.d.ts +9 -0
- package/dist/rules/no-unknown-input-reference-in-composite.d.ts.map +1 -0
- package/dist/rules/no-unknown-input-reference-in-composite.js +80 -0
- package/dist/rules/no-unknown-input-reference-in-composite.js.map +1 -0
- package/dist/rules/no-unknown-job-output-reference.d.ts +9 -0
- package/dist/rules/no-unknown-job-output-reference.d.ts.map +1 -0
- package/dist/rules/no-unknown-job-output-reference.js +229 -0
- package/dist/rules/no-unknown-job-output-reference.js.map +1 -0
- package/dist/rules/no-unknown-step-reference.d.ts +9 -0
- package/dist/rules/no-unknown-step-reference.d.ts.map +1 -0
- package/dist/rules/no-unknown-step-reference.js +133 -0
- package/dist/rules/no-unknown-step-reference.js.map +1 -0
- package/dist/rules/no-untrusted-input-in-run.d.ts +9 -0
- package/dist/rules/no-untrusted-input-in-run.d.ts.map +1 -0
- package/dist/rules/no-untrusted-input-in-run.js +115 -0
- package/dist/rules/no-untrusted-input-in-run.js.map +1 -0
- package/dist/rules/no-unused-input-in-composite.d.ts +9 -0
- package/dist/rules/no-unused-input-in-composite.d.ts.map +1 -0
- package/dist/rules/no-unused-input-in-composite.js +78 -0
- package/dist/rules/no-unused-input-in-composite.js.map +1 -0
- package/dist/rules/no-write-all-permissions.d.ts +9 -0
- package/dist/rules/no-write-all-permissions.d.ts.map +1 -0
- package/dist/rules/no-write-all-permissions.js +61 -0
- package/dist/rules/no-write-all-permissions.js.map +1 -0
- package/dist/rules/pin-action-shas.d.ts +12 -0
- package/dist/rules/pin-action-shas.d.ts.map +1 -0
- package/dist/rules/pin-action-shas.js +100 -0
- package/dist/rules/pin-action-shas.js.map +1 -0
- package/dist/rules/prefer-action-yml.d.ts +9 -0
- package/dist/rules/prefer-action-yml.d.ts.map +1 -0
- package/dist/rules/prefer-action-yml.js +37 -0
- package/dist/rules/prefer-action-yml.js.map +1 -0
- package/dist/rules/prefer-fail-fast.d.ts +9 -0
- package/dist/rules/prefer-fail-fast.d.ts.map +1 -0
- package/dist/rules/prefer-fail-fast.js +61 -0
- package/dist/rules/prefer-fail-fast.js.map +1 -0
- package/dist/rules/prefer-file-extension.d.ts +9 -0
- package/dist/rules/prefer-file-extension.d.ts.map +1 -0
- package/dist/rules/prefer-file-extension.js +104 -0
- package/dist/rules/prefer-file-extension.js.map +1 -0
- package/dist/rules/prefer-inputs-context.d.ts +9 -0
- package/dist/rules/prefer-inputs-context.d.ts.map +1 -0
- package/dist/rules/prefer-inputs-context.js +91 -0
- package/dist/rules/prefer-inputs-context.js.map +1 -0
- package/dist/rules/prefer-step-uses-style.d.ts +9 -0
- package/dist/rules/prefer-step-uses-style.d.ts.map +1 -0
- package/dist/rules/prefer-step-uses-style.js +209 -0
- package/dist/rules/prefer-step-uses-style.js.map +1 -0
- package/dist/rules/prefer-template-yml-extension.d.ts +9 -0
- package/dist/rules/prefer-template-yml-extension.d.ts.map +1 -0
- package/dist/rules/prefer-template-yml-extension.js +41 -0
- package/dist/rules/prefer-template-yml-extension.js.map +1 -0
- package/dist/rules/require-action-name.d.ts +9 -0
- package/dist/rules/require-action-name.d.ts.map +1 -0
- package/dist/rules/require-action-name.js +57 -0
- package/dist/rules/require-action-name.js.map +1 -0
- package/dist/rules/require-action-run-name.d.ts +9 -0
- package/dist/rules/require-action-run-name.d.ts.map +1 -0
- package/dist/rules/require-action-run-name.js +56 -0
- package/dist/rules/require-action-run-name.js.map +1 -0
- package/dist/rules/require-checkout-before-local-action.d.ts +9 -0
- package/dist/rules/require-checkout-before-local-action.d.ts.map +1 -0
- package/dist/rules/require-checkout-before-local-action.js +74 -0
- package/dist/rules/require-checkout-before-local-action.js.map +1 -0
- package/dist/rules/require-composite-step-name.d.ts +9 -0
- package/dist/rules/require-composite-step-name.d.ts.map +1 -0
- package/dist/rules/require-composite-step-name.js +67 -0
- package/dist/rules/require-composite-step-name.js.map +1 -0
- package/dist/rules/require-job-name.d.ts +9 -0
- package/dist/rules/require-job-name.d.ts.map +1 -0
- package/dist/rules/require-job-name.js +70 -0
- package/dist/rules/require-job-name.js.map +1 -0
- package/dist/rules/require-job-step-name.d.ts +9 -0
- package/dist/rules/require-job-step-name.d.ts.map +1 -0
- package/dist/rules/require-job-step-name.js +71 -0
- package/dist/rules/require-job-step-name.js.map +1 -0
- package/dist/rules/require-job-timeout-minutes.d.ts +9 -0
- package/dist/rules/require-job-timeout-minutes.d.ts.map +1 -0
- package/dist/rules/require-job-timeout-minutes.js +99 -0
- package/dist/rules/require-job-timeout-minutes.js.map +1 -0
- package/dist/rules/require-merge-group-trigger.d.ts +9 -0
- package/dist/rules/require-merge-group-trigger.d.ts.map +1 -0
- package/dist/rules/require-merge-group-trigger.js +65 -0
- package/dist/rules/require-merge-group-trigger.js.map +1 -0
- package/dist/rules/require-pull-request-target-branches.d.ts +9 -0
- package/dist/rules/require-pull-request-target-branches.d.ts.map +1 -0
- package/dist/rules/require-pull-request-target-branches.js +102 -0
- package/dist/rules/require-pull-request-target-branches.js.map +1 -0
- package/dist/rules/require-run-step-shell.d.ts +9 -0
- package/dist/rules/require-run-step-shell.d.ts.map +1 -0
- package/dist/rules/require-run-step-shell.js +114 -0
- package/dist/rules/require-run-step-shell.js.map +1 -0
- package/dist/rules/require-template-categories.d.ts +9 -0
- package/dist/rules/require-template-categories.d.ts.map +1 -0
- package/dist/rules/require-template-categories.js +55 -0
- package/dist/rules/require-template-categories.js.map +1 -0
- package/dist/rules/require-template-file-patterns.d.ts +9 -0
- package/dist/rules/require-template-file-patterns.d.ts.map +1 -0
- package/dist/rules/require-template-file-patterns.js +55 -0
- package/dist/rules/require-template-file-patterns.js.map +1 -0
- package/dist/rules/require-template-icon-file-exists.d.ts +9 -0
- package/dist/rules/require-template-icon-file-exists.d.ts.map +1 -0
- package/dist/rules/require-template-icon-file-exists.js +61 -0
- package/dist/rules/require-template-icon-file-exists.js.map +1 -0
- package/dist/rules/require-template-icon-name.d.ts +9 -0
- package/dist/rules/require-template-icon-name.d.ts.map +1 -0
- package/dist/rules/require-template-icon-name.js +48 -0
- package/dist/rules/require-template-icon-name.js.map +1 -0
- package/dist/rules/require-template-workflow-name.d.ts +9 -0
- package/dist/rules/require-template-workflow-name.d.ts.map +1 -0
- package/dist/rules/require-template-workflow-name.js +48 -0
- package/dist/rules/require-template-workflow-name.js.map +1 -0
- package/dist/rules/require-trigger-types.d.ts +9 -0
- package/dist/rules/require-trigger-types.d.ts.map +1 -0
- package/dist/rules/require-trigger-types.js +126 -0
- package/dist/rules/require-trigger-types.js.map +1 -0
- package/dist/rules/require-workflow-call-input-type.d.ts +9 -0
- package/dist/rules/require-workflow-call-input-type.d.ts.map +1 -0
- package/dist/rules/require-workflow-call-input-type.js +89 -0
- package/dist/rules/require-workflow-call-input-type.js.map +1 -0
- package/dist/rules/require-workflow-call-output-value.d.ts +9 -0
- package/dist/rules/require-workflow-call-output-value.d.ts.map +1 -0
- package/dist/rules/require-workflow-call-output-value.js +79 -0
- package/dist/rules/require-workflow-call-output-value.js.map +1 -0
- package/dist/rules/require-workflow-concurrency.d.ts +9 -0
- package/dist/rules/require-workflow-concurrency.d.ts.map +1 -0
- package/dist/rules/require-workflow-concurrency.js +157 -0
- package/dist/rules/require-workflow-concurrency.js.map +1 -0
- package/dist/rules/require-workflow-dispatch-input-type.d.ts +9 -0
- package/dist/rules/require-workflow-dispatch-input-type.d.ts.map +1 -0
- package/dist/rules/require-workflow-dispatch-input-type.js +80 -0
- package/dist/rules/require-workflow-dispatch-input-type.js.map +1 -0
- package/dist/rules/require-workflow-interface-description.d.ts +9 -0
- package/dist/rules/require-workflow-interface-description.d.ts.map +1 -0
- package/dist/rules/require-workflow-interface-description.js +98 -0
- package/dist/rules/require-workflow-interface-description.js.map +1 -0
- package/dist/rules/require-workflow-permissions.d.ts +9 -0
- package/dist/rules/require-workflow-permissions.d.ts.map +1 -0
- package/dist/rules/require-workflow-permissions.js +83 -0
- package/dist/rules/require-workflow-permissions.js.map +1 -0
- package/dist/rules/require-workflow-run-branches.d.ts +9 -0
- package/dist/rules/require-workflow-run-branches.d.ts.map +1 -0
- package/dist/rules/require-workflow-run-branches.js +84 -0
- package/dist/rules/require-workflow-run-branches.js.map +1 -0
- package/dist/rules/require-workflow-template-pair.d.ts +9 -0
- package/dist/rules/require-workflow-template-pair.d.ts.map +1 -0
- package/dist/rules/require-workflow-template-pair.js +47 -0
- package/dist/rules/require-workflow-template-pair.js.map +1 -0
- package/dist/rules/require-workflow-template-properties-pair.d.ts +9 -0
- package/dist/rules/require-workflow-template-properties-pair.d.ts.map +1 -0
- package/dist/rules/require-workflow-template-properties-pair.js +49 -0
- package/dist/rules/require-workflow-template-properties-pair.js.map +1 -0
- package/dist/rules/valid-timeout-minutes.d.ts +9 -0
- package/dist/rules/valid-timeout-minutes.d.ts.map +1 -0
- package/dist/rules/valid-timeout-minutes.js +255 -0
- package/dist/rules/valid-timeout-minutes.js.map +1 -0
- package/dist/rules/valid-trigger-events.d.ts +9 -0
- package/dist/rules/valid-trigger-events.d.ts.map +1 -0
- package/dist/rules/valid-trigger-events.js +100 -0
- package/dist/rules/valid-trigger-events.js.map +1 -0
- package/docs/rules/action-name-casing.md +64 -0
- package/docs/rules/getting-started.md +46 -0
- package/docs/rules/job-id-casing.md +73 -0
- package/docs/rules/max-jobs-per-action.md +79 -0
- package/docs/rules/no-case-insensitive-input-id-collision.md +63 -0
- package/docs/rules/no-composite-input-env-access.md +66 -0
- package/docs/rules/no-deprecated-node-runtime.md +61 -0
- package/docs/rules/no-duplicate-composite-step-id.md +73 -0
- package/docs/rules/no-empty-template-file-pattern.md +57 -0
- package/docs/rules/no-external-job.md +66 -0
- package/docs/rules/no-hardcoded-default-branch-in-template.md +63 -0
- package/docs/rules/no-icon-file-extension-in-template-icon-name.md +57 -0
- package/docs/rules/no-inherit-secrets.md +65 -0
- package/docs/rules/no-invalid-concurrency-context.md +101 -0
- package/docs/rules/no-invalid-key.md +86 -0
- package/docs/rules/no-invalid-reusable-workflow-job-key.md +74 -0
- package/docs/rules/no-invalid-template-file-pattern-regex.md +57 -0
- package/docs/rules/no-invalid-workflow-call-output-value.md +80 -0
- package/docs/rules/no-path-separators-in-template-icon-name.md +57 -0
- package/docs/rules/no-post-if-without-post.md +64 -0
- package/docs/rules/no-pr-head-checkout-in-pull-request-target.md +83 -0
- package/docs/rules/no-pre-if-without-pre.md +64 -0
- package/docs/rules/no-required-input-with-default.md +64 -0
- package/docs/rules/no-secrets-in-if.md +70 -0
- package/docs/rules/no-self-hosted-runner-on-fork-pr-events.md +75 -0
- package/docs/rules/no-subdirectory-template-file-pattern.md +57 -0
- package/docs/rules/no-template-placeholder-in-non-template-workflow.md +63 -0
- package/docs/rules/no-top-level-env.md +64 -0
- package/docs/rules/no-top-level-permissions.md +64 -0
- package/docs/rules/no-universal-template-file-pattern.md +57 -0
- package/docs/rules/no-unknown-input-reference-in-composite.md +71 -0
- package/docs/rules/no-unknown-job-output-reference.md +88 -0
- package/docs/rules/no-unknown-step-reference.md +73 -0
- package/docs/rules/no-untrusted-input-in-run.md +74 -0
- package/docs/rules/no-unused-input-in-composite.md +71 -0
- package/docs/rules/no-write-all-permissions.md +60 -0
- package/docs/rules/overview.md +91 -0
- package/docs/rules/pin-action-shas.md +65 -0
- package/docs/rules/prefer-action-yml.md +57 -0
- package/docs/rules/prefer-fail-fast.md +72 -0
- package/docs/rules/prefer-file-extension.md +77 -0
- package/docs/rules/prefer-inputs-context.md +84 -0
- package/docs/rules/prefer-step-uses-style.md +70 -0
- package/docs/rules/prefer-template-yml-extension.md +57 -0
- package/docs/rules/presets/action-metadata.md +18 -0
- package/docs/rules/presets/all.md +76 -0
- package/docs/rules/presets/index.md +100 -0
- package/docs/rules/presets/recommended.md +26 -0
- package/docs/rules/presets/security.md +16 -0
- package/docs/rules/presets/strict.md +48 -0
- package/docs/rules/presets/workflow-template-properties.md +18 -0
- package/docs/rules/presets/workflow-templates.md +22 -0
- package/docs/rules/require-action-name.md +61 -0
- package/docs/rules/require-action-run-name.md +63 -0
- package/docs/rules/require-checkout-before-local-action.md +66 -0
- package/docs/rules/require-composite-step-name.md +66 -0
- package/docs/rules/require-job-name.md +63 -0
- package/docs/rules/require-job-step-name.md +69 -0
- package/docs/rules/require-job-timeout-minutes.md +76 -0
- package/docs/rules/require-merge-group-trigger.md +67 -0
- package/docs/rules/require-pull-request-target-branches.md +79 -0
- package/docs/rules/require-run-step-shell.md +85 -0
- package/docs/rules/require-template-categories.md +62 -0
- package/docs/rules/require-template-file-patterns.md +63 -0
- package/docs/rules/require-template-icon-file-exists.md +61 -0
- package/docs/rules/require-template-icon-name.md +57 -0
- package/docs/rules/require-template-workflow-name.md +60 -0
- package/docs/rules/require-trigger-types.md +76 -0
- package/docs/rules/require-workflow-call-input-type.md +70 -0
- package/docs/rules/require-workflow-call-output-value.md +67 -0
- package/docs/rules/require-workflow-concurrency.md +73 -0
- package/docs/rules/require-workflow-dispatch-input-type.md +70 -0
- package/docs/rules/require-workflow-interface-description.md +96 -0
- package/docs/rules/require-workflow-permissions.md +75 -0
- package/docs/rules/require-workflow-run-branches.md +66 -0
- package/docs/rules/require-workflow-template-pair.md +58 -0
- package/docs/rules/require-workflow-template-properties-pair.md +58 -0
- package/docs/rules/valid-timeout-minutes.md +74 -0
- package/docs/rules/valid-trigger-events.md +62 -0
- package/package.json +497 -0
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# `githubActions.configs.strict`
|
|
2
|
+
|
|
3
|
+
Opinionated operational guardrails for mature workflow estates.
|
|
4
|
+
|
|
5
|
+
## Included rules
|
|
6
|
+
|
|
7
|
+
- [`require-workflow-permissions`](../require-workflow-permissions.md)
|
|
8
|
+
- [`require-job-timeout-minutes`](../require-job-timeout-minutes.md)
|
|
9
|
+
- [`pin-action-shas`](../pin-action-shas.md)
|
|
10
|
+
- [`require-workflow-concurrency`](../require-workflow-concurrency.md)
|
|
11
|
+
- [`action-name-casing`](../action-name-casing.md)
|
|
12
|
+
- [`job-id-casing`](../job-id-casing.md)
|
|
13
|
+
- [`max-jobs-per-action`](../max-jobs-per-action.md)
|
|
14
|
+
- [`no-external-job`](../no-external-job.md)
|
|
15
|
+
- [`no-inherit-secrets`](../no-inherit-secrets.md)
|
|
16
|
+
- [`no-invalid-concurrency-context`](../no-invalid-concurrency-context.md)
|
|
17
|
+
- [`no-invalid-key`](../no-invalid-key.md)
|
|
18
|
+
- [`no-invalid-reusable-workflow-job-key`](../no-invalid-reusable-workflow-job-key.md)
|
|
19
|
+
- [`no-invalid-workflow-call-output-value`](../no-invalid-workflow-call-output-value.md)
|
|
20
|
+
- [`no-pr-head-checkout-in-pull-request-target`](../no-pr-head-checkout-in-pull-request-target.md)
|
|
21
|
+
- [`no-secrets-in-if`](../no-secrets-in-if.md)
|
|
22
|
+
- [`no-self-hosted-runner-on-fork-pr-events`](../no-self-hosted-runner-on-fork-pr-events.md)
|
|
23
|
+
- [`no-template-placeholder-in-non-template-workflow`](../no-template-placeholder-in-non-template-workflow.md)
|
|
24
|
+
- [`no-top-level-env`](../no-top-level-env.md)
|
|
25
|
+
- [`no-unknown-job-output-reference`](../no-unknown-job-output-reference.md)
|
|
26
|
+
- [`no-unknown-step-reference`](../no-unknown-step-reference.md)
|
|
27
|
+
- [`no-untrusted-input-in-run`](../no-untrusted-input-in-run.md)
|
|
28
|
+
- [`no-write-all-permissions`](../no-write-all-permissions.md)
|
|
29
|
+
- [`prefer-fail-fast`](../prefer-fail-fast.md)
|
|
30
|
+
- [`prefer-file-extension`](../prefer-file-extension.md)
|
|
31
|
+
- [`prefer-inputs-context`](../prefer-inputs-context.md)
|
|
32
|
+
- [`require-action-name`](../require-action-name.md)
|
|
33
|
+
- [`require-action-run-name`](../require-action-run-name.md)
|
|
34
|
+
- [`require-checkout-before-local-action`](../require-checkout-before-local-action.md)
|
|
35
|
+
- [`require-job-name`](../require-job-name.md)
|
|
36
|
+
- [`require-job-step-name`](../require-job-step-name.md)
|
|
37
|
+
- [`require-merge-group-trigger`](../require-merge-group-trigger.md)
|
|
38
|
+
- [`require-pull-request-target-branches`](../require-pull-request-target-branches.md)
|
|
39
|
+
- [`require-run-step-shell`](../require-run-step-shell.md)
|
|
40
|
+
- [`require-trigger-types`](../require-trigger-types.md)
|
|
41
|
+
- [`require-workflow-call-input-type`](../require-workflow-call-input-type.md)
|
|
42
|
+
- [`require-workflow-call-output-value`](../require-workflow-call-output-value.md)
|
|
43
|
+
- [`require-workflow-dispatch-input-type`](../require-workflow-dispatch-input-type.md)
|
|
44
|
+
- [`require-workflow-interface-description`](../require-workflow-interface-description.md)
|
|
45
|
+
- [`require-workflow-run-branches`](../require-workflow-run-branches.md)
|
|
46
|
+
- [`valid-timeout-minutes`](../valid-timeout-minutes.md)
|
|
47
|
+
- [`valid-trigger-events`](../valid-trigger-events.md)
|
|
48
|
+
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# `githubActions.configs.workflowTemplateProperties`
|
|
2
|
+
|
|
3
|
+
Linting defaults for workflow-template metadata files (`*.properties.json`).
|
|
4
|
+
|
|
5
|
+
## Included rules
|
|
6
|
+
|
|
7
|
+
- [`no-empty-template-file-pattern`](../no-empty-template-file-pattern.md)
|
|
8
|
+
- [`no-icon-file-extension-in-template-icon-name`](../no-icon-file-extension-in-template-icon-name.md)
|
|
9
|
+
- [`no-invalid-template-file-pattern-regex`](../no-invalid-template-file-pattern-regex.md)
|
|
10
|
+
- [`no-path-separators-in-template-icon-name`](../no-path-separators-in-template-icon-name.md)
|
|
11
|
+
- [`no-subdirectory-template-file-pattern`](../no-subdirectory-template-file-pattern.md)
|
|
12
|
+
- [`no-universal-template-file-pattern`](../no-universal-template-file-pattern.md)
|
|
13
|
+
- [`require-template-categories`](../require-template-categories.md)
|
|
14
|
+
- [`require-template-file-patterns`](../require-template-file-patterns.md)
|
|
15
|
+
- [`require-template-icon-file-exists`](../require-template-icon-file-exists.md)
|
|
16
|
+
- [`require-template-icon-name`](../require-template-icon-name.md)
|
|
17
|
+
- [`require-workflow-template-properties-pair`](../require-workflow-template-properties-pair.md)
|
|
18
|
+
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# `githubActions.configs.workflowTemplates`
|
|
2
|
+
|
|
3
|
+
Workflow template package linting for both template YAML and metadata files.
|
|
4
|
+
|
|
5
|
+
## Included rules
|
|
6
|
+
|
|
7
|
+
- [`no-empty-template-file-pattern`](../no-empty-template-file-pattern.md)
|
|
8
|
+
- [`no-hardcoded-default-branch-in-template`](../no-hardcoded-default-branch-in-template.md)
|
|
9
|
+
- [`no-icon-file-extension-in-template-icon-name`](../no-icon-file-extension-in-template-icon-name.md)
|
|
10
|
+
- [`no-invalid-template-file-pattern-regex`](../no-invalid-template-file-pattern-regex.md)
|
|
11
|
+
- [`no-path-separators-in-template-icon-name`](../no-path-separators-in-template-icon-name.md)
|
|
12
|
+
- [`no-subdirectory-template-file-pattern`](../no-subdirectory-template-file-pattern.md)
|
|
13
|
+
- [`no-universal-template-file-pattern`](../no-universal-template-file-pattern.md)
|
|
14
|
+
- [`prefer-template-yml-extension`](../prefer-template-yml-extension.md)
|
|
15
|
+
- [`require-template-categories`](../require-template-categories.md)
|
|
16
|
+
- [`require-template-file-patterns`](../require-template-file-patterns.md)
|
|
17
|
+
- [`require-template-icon-file-exists`](../require-template-icon-file-exists.md)
|
|
18
|
+
- [`require-template-icon-name`](../require-template-icon-name.md)
|
|
19
|
+
- [`require-template-workflow-name`](../require-template-workflow-name.md)
|
|
20
|
+
- [`require-workflow-template-pair`](../require-workflow-template-pair.md)
|
|
21
|
+
- [`require-workflow-template-properties-pair`](../require-workflow-template-properties-pair.md)
|
|
22
|
+
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# require-action-name
|
|
2
|
+
|
|
3
|
+
> **Rule catalog ID:** R005
|
|
4
|
+
|
|
5
|
+
## Targeted pattern scope
|
|
6
|
+
|
|
7
|
+
GitHub Actions workflow YAML files.
|
|
8
|
+
|
|
9
|
+
## What this rule reports
|
|
10
|
+
|
|
11
|
+
This rule reports workflows that omit the top-level `name` field or set it to a non-string or empty value.
|
|
12
|
+
|
|
13
|
+
## Why this rule exists
|
|
14
|
+
|
|
15
|
+
A workflow name is what most people see first in the Actions UI, run history, and status checks. Requiring it improves discoverability and reviewability.
|
|
16
|
+
|
|
17
|
+
## ❌ Incorrect
|
|
18
|
+
|
|
19
|
+
```yaml
|
|
20
|
+
on:
|
|
21
|
+
push:
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## ✅ Correct
|
|
25
|
+
|
|
26
|
+
```yaml
|
|
27
|
+
name: CI
|
|
28
|
+
on:
|
|
29
|
+
push:
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
## Additional examples
|
|
34
|
+
|
|
35
|
+
For larger repositories, this rule is often enabled together with one of the published presets so violations are caught in pull requests before workflow changes are merged.
|
|
36
|
+
|
|
37
|
+
## ESLint flat config example
|
|
38
|
+
|
|
39
|
+
```ts
|
|
40
|
+
import githubActions from "eslint-plugin-github-actions-2";
|
|
41
|
+
|
|
42
|
+
export default [
|
|
43
|
+
{
|
|
44
|
+
files: ["**/*.{yml,yaml}"],
|
|
45
|
+
plugins: {
|
|
46
|
+
"github-actions": githubActions,
|
|
47
|
+
},
|
|
48
|
+
rules: {
|
|
49
|
+
"github-actions/require-action-name": "error",
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
];
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
## When not to use it
|
|
56
|
+
|
|
57
|
+
You can disable this rule when its policy does not match your repository standards, or when equivalent enforcement is already handled by another policy tool.
|
|
58
|
+
## Further reading
|
|
59
|
+
|
|
60
|
+
- [https://docs.github.com/actions/reference/workflows-and-actions/workflow-syntax#name](https://docs.github.com/actions/reference/workflows-and-actions/workflow-syntax#name)
|
|
61
|
+
- [https://docs.github.com/actions/monitoring-and-troubleshooting-workflows/using-workflow-run-logs](https://docs.github.com/actions/monitoring-and-troubleshooting-workflows/using-workflow-run-logs)
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# require-action-run-name
|
|
2
|
+
|
|
3
|
+
> **Rule catalog ID:** R006
|
|
4
|
+
|
|
5
|
+
## Targeted pattern scope
|
|
6
|
+
|
|
7
|
+
GitHub Actions workflow YAML files.
|
|
8
|
+
|
|
9
|
+
## What this rule reports
|
|
10
|
+
|
|
11
|
+
This rule reports workflows that omit the top-level `run-name` field or set it to a non-string or empty value.
|
|
12
|
+
|
|
13
|
+
## Why this rule exists
|
|
14
|
+
|
|
15
|
+
A descriptive `run-name` helps distinguish workflow runs triggered from different branches, releases, or manual dispatches.
|
|
16
|
+
|
|
17
|
+
## ❌ Incorrect
|
|
18
|
+
|
|
19
|
+
```yaml
|
|
20
|
+
name: Release
|
|
21
|
+
on:
|
|
22
|
+
workflow_dispatch:
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## ✅ Correct
|
|
26
|
+
|
|
27
|
+
```yaml
|
|
28
|
+
name: Release
|
|
29
|
+
run-name: Release ${{ github.ref_name }}
|
|
30
|
+
on:
|
|
31
|
+
workflow_dispatch:
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
## Additional examples
|
|
36
|
+
|
|
37
|
+
For larger repositories, this rule is often enabled together with one of the published presets so violations are caught in pull requests before workflow changes are merged.
|
|
38
|
+
|
|
39
|
+
## ESLint flat config example
|
|
40
|
+
|
|
41
|
+
```ts
|
|
42
|
+
import githubActions from "eslint-plugin-github-actions-2";
|
|
43
|
+
|
|
44
|
+
export default [
|
|
45
|
+
{
|
|
46
|
+
files: ["**/*.{yml,yaml}"],
|
|
47
|
+
plugins: {
|
|
48
|
+
"github-actions": githubActions,
|
|
49
|
+
},
|
|
50
|
+
rules: {
|
|
51
|
+
"github-actions/require-action-run-name": "error",
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
];
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## When not to use it
|
|
58
|
+
|
|
59
|
+
You can disable this rule when its policy does not match your repository standards, or when equivalent enforcement is already handled by another policy tool.
|
|
60
|
+
## Further reading
|
|
61
|
+
|
|
62
|
+
- [https://docs.github.com/actions/reference/workflows-and-actions/workflow-syntax#run-name](https://docs.github.com/actions/reference/workflows-and-actions/workflow-syntax#run-name)
|
|
63
|
+
- [https://docs.github.com/actions/using-workflows/manually-running-a-workflow](https://docs.github.com/actions/using-workflows/manually-running-a-workflow)
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# require-checkout-before-local-action
|
|
2
|
+
|
|
3
|
+
> **Rule catalog ID:** R025
|
|
4
|
+
|
|
5
|
+
## Targeted pattern scope
|
|
6
|
+
|
|
7
|
+
GitHub Actions workflow YAML files that use repository-local step actions with `uses: ./...`.
|
|
8
|
+
|
|
9
|
+
## What this rule reports
|
|
10
|
+
|
|
11
|
+
This rule reports step-level local action references that appear before any `actions/checkout` step in the same job.
|
|
12
|
+
|
|
13
|
+
## Why this rule exists
|
|
14
|
+
|
|
15
|
+
GitHub's workflow syntax requires checking out the repository before using a local action path. Without that checkout step, the action directory does not exist in the workspace and the workflow will fail at runtime.
|
|
16
|
+
|
|
17
|
+
## ❌ Incorrect
|
|
18
|
+
|
|
19
|
+
```yaml
|
|
20
|
+
jobs:
|
|
21
|
+
build:
|
|
22
|
+
runs-on: ubuntu-latest
|
|
23
|
+
steps:
|
|
24
|
+
- uses: ./.github/actions/setup-project
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## ✅ Correct
|
|
28
|
+
|
|
29
|
+
```yaml
|
|
30
|
+
jobs:
|
|
31
|
+
build:
|
|
32
|
+
runs-on: ubuntu-latest
|
|
33
|
+
steps:
|
|
34
|
+
- uses: actions/checkout@v5
|
|
35
|
+
- uses: ./.github/actions/setup-project
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
## Additional examples
|
|
40
|
+
|
|
41
|
+
For larger repositories, this rule is often enabled together with one of the published presets so violations are caught in pull requests before workflow changes are merged.
|
|
42
|
+
|
|
43
|
+
## ESLint flat config example
|
|
44
|
+
|
|
45
|
+
```ts
|
|
46
|
+
import githubActions from "eslint-plugin-github-actions-2";
|
|
47
|
+
|
|
48
|
+
export default [
|
|
49
|
+
{
|
|
50
|
+
files: ["**/*.{yml,yaml}"],
|
|
51
|
+
plugins: {
|
|
52
|
+
"github-actions": githubActions,
|
|
53
|
+
},
|
|
54
|
+
rules: {
|
|
55
|
+
"github-actions/require-checkout-before-local-action": "error",
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
];
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
## When not to use it
|
|
62
|
+
|
|
63
|
+
You can disable this rule when its policy does not match your repository standards, or when equivalent enforcement is already handled by another policy tool.
|
|
64
|
+
## Further reading
|
|
65
|
+
|
|
66
|
+
- [https://docs.github.com/actions/reference/workflows-and-actions/workflow-syntax#jobsjob_idstepsuses](https://docs.github.com/actions/reference/workflows-and-actions/workflow-syntax#jobsjob_idstepsuses)
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# require-composite-step-name
|
|
2
|
+
|
|
3
|
+
> **Rule catalog ID:** R052
|
|
4
|
+
|
|
5
|
+
## Targeted pattern scope
|
|
6
|
+
|
|
7
|
+
Composite action `runs.steps` entries.
|
|
8
|
+
|
|
9
|
+
## What this rule reports
|
|
10
|
+
|
|
11
|
+
Reports composite steps missing a non-empty `name`.
|
|
12
|
+
|
|
13
|
+
## Why this rule exists
|
|
14
|
+
|
|
15
|
+
Named steps make action logs readable and troubleshooting faster.
|
|
16
|
+
|
|
17
|
+
## ❌ Incorrect
|
|
18
|
+
|
|
19
|
+
```yaml
|
|
20
|
+
runs:
|
|
21
|
+
using: composite
|
|
22
|
+
steps:
|
|
23
|
+
- run: echo hello
|
|
24
|
+
shell: bash
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## ✅ Correct
|
|
28
|
+
|
|
29
|
+
```yaml
|
|
30
|
+
runs:
|
|
31
|
+
using: composite
|
|
32
|
+
steps:
|
|
33
|
+
- name: Print greeting
|
|
34
|
+
run: echo hello
|
|
35
|
+
shell: bash
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
## Additional examples
|
|
40
|
+
|
|
41
|
+
For larger repositories, this rule is often enabled together with one of the published presets so violations are caught in pull requests before workflow changes are merged.
|
|
42
|
+
|
|
43
|
+
## ESLint flat config example
|
|
44
|
+
|
|
45
|
+
```ts
|
|
46
|
+
import githubActions from "eslint-plugin-github-actions-2";
|
|
47
|
+
|
|
48
|
+
export default [
|
|
49
|
+
{
|
|
50
|
+
files: ["**/*.{yml,yaml}"],
|
|
51
|
+
plugins: {
|
|
52
|
+
"github-actions": githubActions,
|
|
53
|
+
},
|
|
54
|
+
rules: {
|
|
55
|
+
"github-actions/require-composite-step-name": "error",
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
];
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
## When not to use it
|
|
62
|
+
|
|
63
|
+
You can disable this rule when its policy does not match your repository standards, or when equivalent enforcement is already handled by another policy tool.
|
|
64
|
+
## Further reading
|
|
65
|
+
|
|
66
|
+
- [https://docs.github.com/actions/reference/workflows-and-actions/metadata-syntax#runs-for-composite-actions](https://docs.github.com/actions/reference/workflows-and-actions/metadata-syntax#runs-for-composite-actions)
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# require-job-name
|
|
2
|
+
|
|
3
|
+
> **Rule catalog ID:** R007
|
|
4
|
+
|
|
5
|
+
## Targeted pattern scope
|
|
6
|
+
|
|
7
|
+
GitHub Actions workflow YAML files that declare jobs.
|
|
8
|
+
|
|
9
|
+
## What this rule reports
|
|
10
|
+
|
|
11
|
+
This rule reports jobs that omit `name` or set `name` to a non-string or empty value.
|
|
12
|
+
|
|
13
|
+
## Why this rule exists
|
|
14
|
+
|
|
15
|
+
Job names appear in workflow graphs and logs. Requiring them makes complex workflows easier to navigate, especially when job IDs are terse.
|
|
16
|
+
|
|
17
|
+
## ❌ Incorrect
|
|
18
|
+
|
|
19
|
+
```yaml
|
|
20
|
+
jobs:
|
|
21
|
+
build:
|
|
22
|
+
runs-on: ubuntu-latest
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## ✅ Correct
|
|
26
|
+
|
|
27
|
+
```yaml
|
|
28
|
+
jobs:
|
|
29
|
+
build:
|
|
30
|
+
name: Build
|
|
31
|
+
runs-on: ubuntu-latest
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
## Additional examples
|
|
36
|
+
|
|
37
|
+
For larger repositories, this rule is often enabled together with one of the published presets so violations are caught in pull requests before workflow changes are merged.
|
|
38
|
+
|
|
39
|
+
## ESLint flat config example
|
|
40
|
+
|
|
41
|
+
```ts
|
|
42
|
+
import githubActions from "eslint-plugin-github-actions-2";
|
|
43
|
+
|
|
44
|
+
export default [
|
|
45
|
+
{
|
|
46
|
+
files: ["**/*.{yml,yaml}"],
|
|
47
|
+
plugins: {
|
|
48
|
+
"github-actions": githubActions,
|
|
49
|
+
},
|
|
50
|
+
rules: {
|
|
51
|
+
"github-actions/require-job-name": "error",
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
];
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## When not to use it
|
|
58
|
+
|
|
59
|
+
You can disable this rule when its policy does not match your repository standards, or when equivalent enforcement is already handled by another policy tool.
|
|
60
|
+
## Further reading
|
|
61
|
+
|
|
62
|
+
- [https://docs.github.com/actions/reference/workflows-and-actions/workflow-syntax#jobsjob_idname](https://docs.github.com/actions/reference/workflows-and-actions/workflow-syntax#jobsjob_idname)
|
|
63
|
+
- [https://docs.github.com/actions/using-jobs/using-jobs-in-a-workflow](https://docs.github.com/actions/using-jobs/using-jobs-in-a-workflow)
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
# require-job-step-name
|
|
2
|
+
|
|
3
|
+
> **Rule catalog ID:** R008
|
|
4
|
+
|
|
5
|
+
## Targeted pattern scope
|
|
6
|
+
|
|
7
|
+
GitHub Actions workflow YAML files that declare explicit job steps.
|
|
8
|
+
|
|
9
|
+
## What this rule reports
|
|
10
|
+
|
|
11
|
+
This rule reports steps that omit `name` or set `name` to a non-string or empty value.
|
|
12
|
+
|
|
13
|
+
## Why this rule exists
|
|
14
|
+
|
|
15
|
+
Step names make job logs readable and help reviewers understand the intent of a step without reading the shell command or action source.
|
|
16
|
+
|
|
17
|
+
## ❌ Incorrect
|
|
18
|
+
|
|
19
|
+
```yaml
|
|
20
|
+
jobs:
|
|
21
|
+
build:
|
|
22
|
+
name: Build
|
|
23
|
+
runs-on: ubuntu-latest
|
|
24
|
+
steps:
|
|
25
|
+
- run: npm test
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## ✅ Correct
|
|
29
|
+
|
|
30
|
+
```yaml
|
|
31
|
+
jobs:
|
|
32
|
+
build:
|
|
33
|
+
name: Build
|
|
34
|
+
runs-on: ubuntu-latest
|
|
35
|
+
steps:
|
|
36
|
+
- name: Run tests
|
|
37
|
+
run: npm test
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
## Additional examples
|
|
42
|
+
|
|
43
|
+
For larger repositories, this rule is often enabled together with one of the published presets so violations are caught in pull requests before workflow changes are merged.
|
|
44
|
+
|
|
45
|
+
## ESLint flat config example
|
|
46
|
+
|
|
47
|
+
```ts
|
|
48
|
+
import githubActions from "eslint-plugin-github-actions-2";
|
|
49
|
+
|
|
50
|
+
export default [
|
|
51
|
+
{
|
|
52
|
+
files: ["**/*.{yml,yaml}"],
|
|
53
|
+
plugins: {
|
|
54
|
+
"github-actions": githubActions,
|
|
55
|
+
},
|
|
56
|
+
rules: {
|
|
57
|
+
"github-actions/require-job-step-name": "error",
|
|
58
|
+
},
|
|
59
|
+
},
|
|
60
|
+
];
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
## When not to use it
|
|
64
|
+
|
|
65
|
+
You can disable this rule when its policy does not match your repository standards, or when equivalent enforcement is already handled by another policy tool.
|
|
66
|
+
## Further reading
|
|
67
|
+
|
|
68
|
+
- [https://docs.github.com/actions/reference/workflows-and-actions/workflow-syntax#jobsjob_idsteps](https://docs.github.com/actions/reference/workflows-and-actions/workflow-syntax#jobsjob_idsteps)
|
|
69
|
+
- [https://docs.github.com/actions/monitoring-and-troubleshooting-workflows/using-workflow-run-logs](https://docs.github.com/actions/monitoring-and-troubleshooting-workflows/using-workflow-run-logs)
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
# require-job-timeout-minutes
|
|
2
|
+
|
|
3
|
+
> **Rule catalog ID:** R002
|
|
4
|
+
|
|
5
|
+
## Targeted pattern scope
|
|
6
|
+
|
|
7
|
+
Non-reusable workflow jobs under `jobs.<job_id>`.
|
|
8
|
+
|
|
9
|
+
## What this rule reports
|
|
10
|
+
|
|
11
|
+
This rule reports jobs that do not define `timeout-minutes`, jobs that use a non-integer timeout, and jobs that exceed the configured `maxMinutes` threshold.
|
|
12
|
+
|
|
13
|
+
## Why this rule exists
|
|
14
|
+
|
|
15
|
+
Explicit job timeouts make runner usage more predictable and reduce the blast radius of stuck processes or hanging external services.
|
|
16
|
+
|
|
17
|
+
## ❌ Incorrect
|
|
18
|
+
|
|
19
|
+
```yaml
|
|
20
|
+
jobs:
|
|
21
|
+
test:
|
|
22
|
+
runs-on: ubuntu-latest
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
```yaml
|
|
26
|
+
jobs:
|
|
27
|
+
test:
|
|
28
|
+
runs-on: ubuntu-latest
|
|
29
|
+
timeout-minutes: 180
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## ✅ Correct
|
|
33
|
+
|
|
34
|
+
```yaml
|
|
35
|
+
jobs:
|
|
36
|
+
test:
|
|
37
|
+
runs-on: ubuntu-latest
|
|
38
|
+
timeout-minutes: 30
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
```yaml
|
|
42
|
+
jobs:
|
|
43
|
+
test:
|
|
44
|
+
runs-on: ubuntu-latest
|
|
45
|
+
timeout-minutes: ${{ fromJson(vars.CI_TIMEOUT_MINUTES) }}
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
## Additional examples
|
|
50
|
+
|
|
51
|
+
For larger repositories, this rule is often enabled together with one of the published presets so violations are caught in pull requests before workflow changes are merged.
|
|
52
|
+
|
|
53
|
+
## ESLint flat config example
|
|
54
|
+
|
|
55
|
+
```ts
|
|
56
|
+
import githubActions from "eslint-plugin-github-actions-2";
|
|
57
|
+
|
|
58
|
+
export default [
|
|
59
|
+
{
|
|
60
|
+
files: ["**/*.{yml,yaml}"],
|
|
61
|
+
plugins: {
|
|
62
|
+
"github-actions": githubActions,
|
|
63
|
+
},
|
|
64
|
+
rules: {
|
|
65
|
+
"github-actions/require-job-timeout-minutes": "error",
|
|
66
|
+
},
|
|
67
|
+
},
|
|
68
|
+
];
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
## When not to use it
|
|
72
|
+
|
|
73
|
+
You can disable this rule when its policy does not match your repository standards, or when equivalent enforcement is already handled by another policy tool.
|
|
74
|
+
## Further reading
|
|
75
|
+
|
|
76
|
+
- [https://docs.github.com/actions/reference/workflows-and-actions/workflow-syntax#jobsjob_idtimeout-minutes](https://docs.github.com/actions/reference/workflows-and-actions/workflow-syntax#jobsjob_idtimeout-minutes)
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
# require-merge-group-trigger
|
|
2
|
+
|
|
3
|
+
> **Rule catalog ID:** R035
|
|
4
|
+
|
|
5
|
+
## Targeted pattern scope
|
|
6
|
+
|
|
7
|
+
GitHub Actions workflow YAML files that validate pull requests with the `pull_request` trigger.
|
|
8
|
+
|
|
9
|
+
## What this rule reports
|
|
10
|
+
|
|
11
|
+
This rule reports workflows that subscribe to `pull_request` but do not also declare a `merge_group` trigger.
|
|
12
|
+
|
|
13
|
+
## Why this rule exists
|
|
14
|
+
|
|
15
|
+
GitHub documents that repositories using required GitHub Actions checks with merge queues must add the separate `merge_group` trigger. Otherwise, those required checks do not run when a pull request enters the queue, and the merge cannot complete.
|
|
16
|
+
|
|
17
|
+
## ❌ Incorrect
|
|
18
|
+
|
|
19
|
+
```yaml
|
|
20
|
+
on:
|
|
21
|
+
pull_request:
|
|
22
|
+
branches:
|
|
23
|
+
- main
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## ✅ Correct
|
|
27
|
+
|
|
28
|
+
```yaml
|
|
29
|
+
on:
|
|
30
|
+
pull_request:
|
|
31
|
+
branches:
|
|
32
|
+
- main
|
|
33
|
+
merge_group:
|
|
34
|
+
types:
|
|
35
|
+
- checks_requested
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
## Additional examples
|
|
40
|
+
|
|
41
|
+
For larger repositories, this rule is often enabled together with one of the published presets so violations are caught in pull requests before workflow changes are merged.
|
|
42
|
+
|
|
43
|
+
## ESLint flat config example
|
|
44
|
+
|
|
45
|
+
```ts
|
|
46
|
+
import githubActions from "eslint-plugin-github-actions-2";
|
|
47
|
+
|
|
48
|
+
export default [
|
|
49
|
+
{
|
|
50
|
+
files: ["**/*.{yml,yaml}"],
|
|
51
|
+
plugins: {
|
|
52
|
+
"github-actions": githubActions,
|
|
53
|
+
},
|
|
54
|
+
rules: {
|
|
55
|
+
"github-actions/require-merge-group-trigger": "error",
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
];
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
## When not to use it
|
|
62
|
+
|
|
63
|
+
You can disable this rule when its policy does not match your repository standards, or when equivalent enforcement is already handled by another policy tool.
|
|
64
|
+
## Further reading
|
|
65
|
+
|
|
66
|
+
- [https://docs.github.com/actions/reference/workflows-and-actions/events-that-trigger-workflows#merge_group](https://docs.github.com/actions/reference/workflows-and-actions/events-that-trigger-workflows#merge_group)
|
|
67
|
+
- [https://docs.github.com/actions/reference/workflows-and-actions/workflow-syntax#onmerge_grouptypes](https://docs.github.com/actions/reference/workflows-and-actions/workflow-syntax#onmerge_grouptypes)
|