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,145 @@
|
|
|
1
|
+
import actionNameCasing from "../rules/action-name-casing.js";
|
|
2
|
+
import jobIdCasing from "../rules/job-id-casing.js";
|
|
3
|
+
import maxJobsPerAction from "../rules/max-jobs-per-action.js";
|
|
4
|
+
import noCaseInsensitiveInputIdCollision from "../rules/no-case-insensitive-input-id-collision.js";
|
|
5
|
+
import noCompositeInputEnvAccess from "../rules/no-composite-input-env-access.js";
|
|
6
|
+
import noDeprecatedNodeRuntime from "../rules/no-deprecated-node-runtime.js";
|
|
7
|
+
import noDuplicateCompositeStepId from "../rules/no-duplicate-composite-step-id.js";
|
|
8
|
+
import noEmptyTemplateFilePattern from "../rules/no-empty-template-file-pattern.js";
|
|
9
|
+
import noExternalJob from "../rules/no-external-job.js";
|
|
10
|
+
import noHardcodedDefaultBranchInTemplate from "../rules/no-hardcoded-default-branch-in-template.js";
|
|
11
|
+
import noIconFileExtensionInTemplateIconName from "../rules/no-icon-file-extension-in-template-icon-name.js";
|
|
12
|
+
import noInheritSecrets from "../rules/no-inherit-secrets.js";
|
|
13
|
+
import noInvalidConcurrencyContext from "../rules/no-invalid-concurrency-context.js";
|
|
14
|
+
import noInvalidKey from "../rules/no-invalid-key.js";
|
|
15
|
+
import noInvalidReusableWorkflowJobKey from "../rules/no-invalid-reusable-workflow-job-key.js";
|
|
16
|
+
import noInvalidTemplateFilePatternRegex from "../rules/no-invalid-template-file-pattern-regex.js";
|
|
17
|
+
import noInvalidWorkflowCallOutputValue from "../rules/no-invalid-workflow-call-output-value.js";
|
|
18
|
+
import noPathSeparatorsInTemplateIconName from "../rules/no-path-separators-in-template-icon-name.js";
|
|
19
|
+
import noPostIfWithoutPost from "../rules/no-post-if-without-post.js";
|
|
20
|
+
import noPrHeadCheckoutInPullRequestTarget from "../rules/no-pr-head-checkout-in-pull-request-target.js";
|
|
21
|
+
import noPreIfWithoutPre from "../rules/no-pre-if-without-pre.js";
|
|
22
|
+
import noRequiredInputWithDefault from "../rules/no-required-input-with-default.js";
|
|
23
|
+
import noSecretsInIf from "../rules/no-secrets-in-if.js";
|
|
24
|
+
import noSelfHostedRunnerOnForkPrEvents from "../rules/no-self-hosted-runner-on-fork-pr-events.js";
|
|
25
|
+
import noSubdirectoryTemplateFilePattern from "../rules/no-subdirectory-template-file-pattern.js";
|
|
26
|
+
import noTemplatePlaceholderInNonTemplateWorkflow from "../rules/no-template-placeholder-in-non-template-workflow.js";
|
|
27
|
+
import noTopLevelEnv from "../rules/no-top-level-env.js";
|
|
28
|
+
import noTopLevelPermissions from "../rules/no-top-level-permissions.js";
|
|
29
|
+
import noUniversalTemplateFilePattern from "../rules/no-universal-template-file-pattern.js";
|
|
30
|
+
import noUnknownInputReferenceInComposite from "../rules/no-unknown-input-reference-in-composite.js";
|
|
31
|
+
import noUnknownJobOutputReference from "../rules/no-unknown-job-output-reference.js";
|
|
32
|
+
import noUnknownStepReference from "../rules/no-unknown-step-reference.js";
|
|
33
|
+
import noUntrustedInputInRun from "../rules/no-untrusted-input-in-run.js";
|
|
34
|
+
import noUnusedInputInComposite from "../rules/no-unused-input-in-composite.js";
|
|
35
|
+
import noWriteAllPermissions from "../rules/no-write-all-permissions.js";
|
|
36
|
+
import pinActionShas from "../rules/pin-action-shas.js";
|
|
37
|
+
import preferActionYml from "../rules/prefer-action-yml.js";
|
|
38
|
+
import preferFailFast from "../rules/prefer-fail-fast.js";
|
|
39
|
+
import preferFileExtension from "../rules/prefer-file-extension.js";
|
|
40
|
+
import preferInputsContext from "../rules/prefer-inputs-context.js";
|
|
41
|
+
import preferStepUsesStyle from "../rules/prefer-step-uses-style.js";
|
|
42
|
+
import preferTemplateYmlExtension from "../rules/prefer-template-yml-extension.js";
|
|
43
|
+
import requireActionName from "../rules/require-action-name.js";
|
|
44
|
+
import requireActionRunName from "../rules/require-action-run-name.js";
|
|
45
|
+
import requireCheckoutBeforeLocalAction from "../rules/require-checkout-before-local-action.js";
|
|
46
|
+
import requireCompositeStepName from "../rules/require-composite-step-name.js";
|
|
47
|
+
import requireJobName from "../rules/require-job-name.js";
|
|
48
|
+
import requireJobStepName from "../rules/require-job-step-name.js";
|
|
49
|
+
import requireJobTimeoutMinutes from "../rules/require-job-timeout-minutes.js";
|
|
50
|
+
import requireMergeGroupTrigger from "../rules/require-merge-group-trigger.js";
|
|
51
|
+
import requirePullRequestTargetBranches from "../rules/require-pull-request-target-branches.js";
|
|
52
|
+
import requireRunStepShell from "../rules/require-run-step-shell.js";
|
|
53
|
+
import requireTemplateCategories from "../rules/require-template-categories.js";
|
|
54
|
+
import requireTemplateFilePatterns from "../rules/require-template-file-patterns.js";
|
|
55
|
+
import requireTemplateIconFileExists from "../rules/require-template-icon-file-exists.js";
|
|
56
|
+
import requireTemplateIconName from "../rules/require-template-icon-name.js";
|
|
57
|
+
import requireTemplateWorkflowName from "../rules/require-template-workflow-name.js";
|
|
58
|
+
import requireTriggerTypes from "../rules/require-trigger-types.js";
|
|
59
|
+
import requireWorkflowCallInputType from "../rules/require-workflow-call-input-type.js";
|
|
60
|
+
import requireWorkflowCallOutputValue from "../rules/require-workflow-call-output-value.js";
|
|
61
|
+
import requireWorkflowConcurrency from "../rules/require-workflow-concurrency.js";
|
|
62
|
+
import requireWorkflowDispatchInputType from "../rules/require-workflow-dispatch-input-type.js";
|
|
63
|
+
import requireWorkflowInterfaceDescription from "../rules/require-workflow-interface-description.js";
|
|
64
|
+
import requireWorkflowPermissions from "../rules/require-workflow-permissions.js";
|
|
65
|
+
import requireWorkflowRunBranches from "../rules/require-workflow-run-branches.js";
|
|
66
|
+
import requireWorkflowTemplatePair from "../rules/require-workflow-template-pair.js";
|
|
67
|
+
import requireWorkflowTemplatePropertiesPair from "../rules/require-workflow-template-properties-pair.js";
|
|
68
|
+
import validTimeoutMinutes from "../rules/valid-timeout-minutes.js";
|
|
69
|
+
import validTriggerEvents from "../rules/valid-trigger-events.js";
|
|
70
|
+
/** Strongly typed plugin rule registry keyed by unqualified rule name. */
|
|
71
|
+
declare const githubActionsRulesDefinition: {
|
|
72
|
+
readonly "action-name-casing": typeof actionNameCasing;
|
|
73
|
+
readonly "job-id-casing": typeof jobIdCasing;
|
|
74
|
+
readonly "max-jobs-per-action": typeof maxJobsPerAction;
|
|
75
|
+
readonly "no-case-insensitive-input-id-collision": typeof noCaseInsensitiveInputIdCollision;
|
|
76
|
+
readonly "no-composite-input-env-access": typeof noCompositeInputEnvAccess;
|
|
77
|
+
readonly "no-deprecated-node-runtime": typeof noDeprecatedNodeRuntime;
|
|
78
|
+
readonly "no-duplicate-composite-step-id": typeof noDuplicateCompositeStepId;
|
|
79
|
+
readonly "no-empty-template-file-pattern": typeof noEmptyTemplateFilePattern;
|
|
80
|
+
readonly "no-external-job": typeof noExternalJob;
|
|
81
|
+
readonly "no-hardcoded-default-branch-in-template": typeof noHardcodedDefaultBranchInTemplate;
|
|
82
|
+
readonly "no-icon-file-extension-in-template-icon-name": typeof noIconFileExtensionInTemplateIconName;
|
|
83
|
+
readonly "no-inherit-secrets": typeof noInheritSecrets;
|
|
84
|
+
readonly "no-invalid-concurrency-context": typeof noInvalidConcurrencyContext;
|
|
85
|
+
readonly "no-invalid-key": typeof noInvalidKey;
|
|
86
|
+
readonly "no-invalid-reusable-workflow-job-key": typeof noInvalidReusableWorkflowJobKey;
|
|
87
|
+
readonly "no-invalid-template-file-pattern-regex": typeof noInvalidTemplateFilePatternRegex;
|
|
88
|
+
readonly "no-invalid-workflow-call-output-value": typeof noInvalidWorkflowCallOutputValue;
|
|
89
|
+
readonly "no-path-separators-in-template-icon-name": typeof noPathSeparatorsInTemplateIconName;
|
|
90
|
+
readonly "no-post-if-without-post": typeof noPostIfWithoutPost;
|
|
91
|
+
readonly "no-pr-head-checkout-in-pull-request-target": typeof noPrHeadCheckoutInPullRequestTarget;
|
|
92
|
+
readonly "no-pre-if-without-pre": typeof noPreIfWithoutPre;
|
|
93
|
+
readonly "no-required-input-with-default": typeof noRequiredInputWithDefault;
|
|
94
|
+
readonly "no-secrets-in-if": typeof noSecretsInIf;
|
|
95
|
+
readonly "no-self-hosted-runner-on-fork-pr-events": typeof noSelfHostedRunnerOnForkPrEvents;
|
|
96
|
+
readonly "no-subdirectory-template-file-pattern": typeof noSubdirectoryTemplateFilePattern;
|
|
97
|
+
readonly "no-template-placeholder-in-non-template-workflow": typeof noTemplatePlaceholderInNonTemplateWorkflow;
|
|
98
|
+
readonly "no-top-level-env": typeof noTopLevelEnv;
|
|
99
|
+
readonly "no-top-level-permissions": typeof noTopLevelPermissions;
|
|
100
|
+
readonly "no-universal-template-file-pattern": typeof noUniversalTemplateFilePattern;
|
|
101
|
+
readonly "no-unknown-input-reference-in-composite": typeof noUnknownInputReferenceInComposite;
|
|
102
|
+
readonly "no-unknown-job-output-reference": typeof noUnknownJobOutputReference;
|
|
103
|
+
readonly "no-unknown-step-reference": typeof noUnknownStepReference;
|
|
104
|
+
readonly "no-untrusted-input-in-run": typeof noUntrustedInputInRun;
|
|
105
|
+
readonly "no-unused-input-in-composite": typeof noUnusedInputInComposite;
|
|
106
|
+
readonly "no-write-all-permissions": typeof noWriteAllPermissions;
|
|
107
|
+
readonly "pin-action-shas": typeof pinActionShas;
|
|
108
|
+
readonly "prefer-action-yml": typeof preferActionYml;
|
|
109
|
+
readonly "prefer-fail-fast": typeof preferFailFast;
|
|
110
|
+
readonly "prefer-file-extension": typeof preferFileExtension;
|
|
111
|
+
readonly "prefer-inputs-context": typeof preferInputsContext;
|
|
112
|
+
readonly "prefer-step-uses-style": typeof preferStepUsesStyle;
|
|
113
|
+
readonly "prefer-template-yml-extension": typeof preferTemplateYmlExtension;
|
|
114
|
+
readonly "require-action-name": typeof requireActionName;
|
|
115
|
+
readonly "require-action-run-name": typeof requireActionRunName;
|
|
116
|
+
readonly "require-checkout-before-local-action": typeof requireCheckoutBeforeLocalAction;
|
|
117
|
+
readonly "require-composite-step-name": typeof requireCompositeStepName;
|
|
118
|
+
readonly "require-job-name": typeof requireJobName;
|
|
119
|
+
readonly "require-job-step-name": typeof requireJobStepName;
|
|
120
|
+
readonly "require-job-timeout-minutes": typeof requireJobTimeoutMinutes;
|
|
121
|
+
readonly "require-merge-group-trigger": typeof requireMergeGroupTrigger;
|
|
122
|
+
readonly "require-pull-request-target-branches": typeof requirePullRequestTargetBranches;
|
|
123
|
+
readonly "require-run-step-shell": typeof requireRunStepShell;
|
|
124
|
+
readonly "require-template-categories": typeof requireTemplateCategories;
|
|
125
|
+
readonly "require-template-file-patterns": typeof requireTemplateFilePatterns;
|
|
126
|
+
readonly "require-template-icon-file-exists": typeof requireTemplateIconFileExists;
|
|
127
|
+
readonly "require-template-icon-name": typeof requireTemplateIconName;
|
|
128
|
+
readonly "require-template-workflow-name": typeof requireTemplateWorkflowName;
|
|
129
|
+
readonly "require-trigger-types": typeof requireTriggerTypes;
|
|
130
|
+
readonly "require-workflow-call-input-type": typeof requireWorkflowCallInputType;
|
|
131
|
+
readonly "require-workflow-call-output-value": typeof requireWorkflowCallOutputValue;
|
|
132
|
+
readonly "require-workflow-concurrency": typeof requireWorkflowConcurrency;
|
|
133
|
+
readonly "require-workflow-dispatch-input-type": typeof requireWorkflowDispatchInputType;
|
|
134
|
+
readonly "require-workflow-interface-description": typeof requireWorkflowInterfaceDescription;
|
|
135
|
+
readonly "require-workflow-permissions": typeof requireWorkflowPermissions;
|
|
136
|
+
readonly "require-workflow-run-branches": typeof requireWorkflowRunBranches;
|
|
137
|
+
readonly "require-workflow-template-pair": typeof requireWorkflowTemplatePair;
|
|
138
|
+
readonly "require-workflow-template-properties-pair": typeof requireWorkflowTemplatePropertiesPair;
|
|
139
|
+
readonly "valid-timeout-minutes": typeof validTimeoutMinutes;
|
|
140
|
+
readonly "valid-trigger-events": typeof validTriggerEvents;
|
|
141
|
+
};
|
|
142
|
+
/** Strongly typed plugin rule registry keyed by unqualified rule name. */
|
|
143
|
+
export declare const githubActionsRules: typeof githubActionsRulesDefinition;
|
|
144
|
+
export {};
|
|
145
|
+
//# sourceMappingURL=rules-registry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rules-registry.d.ts","sourceRoot":"","sources":["../../src/_internal/rules-registry.ts"],"names":[],"mappings":"AAMA,OAAO,gBAAgB,MAAM,gCAAgC,CAAC;AAC9D,OAAO,WAAW,MAAM,2BAA2B,CAAC;AACpD,OAAO,gBAAgB,MAAM,iCAAiC,CAAC;AAC/D,OAAO,iCAAiC,MAAM,oDAAoD,CAAC;AACnG,OAAO,yBAAyB,MAAM,2CAA2C,CAAC;AAClF,OAAO,uBAAuB,MAAM,wCAAwC,CAAC;AAC7E,OAAO,0BAA0B,MAAM,4CAA4C,CAAC;AACpF,OAAO,0BAA0B,MAAM,4CAA4C,CAAC;AACpF,OAAO,aAAa,MAAM,6BAA6B,CAAC;AACxD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C,uBAAuB,EAAE,OAAO,mBAAmB,CAAC;IAC7D,QAAQ,CAAC,sBAAsB,EAAE,OAAO,kBAAkB,CAAC;CA+EpB,CAAC;AAE5C,0EAA0E;AAC1E,eAAO,MAAM,kBAAkB,EAAE,OAAO,4BACR,CAAC"}
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
import actionNameCasing from "../rules/action-name-casing.js";
|
|
2
|
+
import jobIdCasing from "../rules/job-id-casing.js";
|
|
3
|
+
import maxJobsPerAction from "../rules/max-jobs-per-action.js";
|
|
4
|
+
import noCaseInsensitiveInputIdCollision from "../rules/no-case-insensitive-input-id-collision.js";
|
|
5
|
+
import noCompositeInputEnvAccess from "../rules/no-composite-input-env-access.js";
|
|
6
|
+
import noDeprecatedNodeRuntime from "../rules/no-deprecated-node-runtime.js";
|
|
7
|
+
import noDuplicateCompositeStepId from "../rules/no-duplicate-composite-step-id.js";
|
|
8
|
+
import noEmptyTemplateFilePattern from "../rules/no-empty-template-file-pattern.js";
|
|
9
|
+
import noExternalJob from "../rules/no-external-job.js";
|
|
10
|
+
import noHardcodedDefaultBranchInTemplate from "../rules/no-hardcoded-default-branch-in-template.js";
|
|
11
|
+
import noIconFileExtensionInTemplateIconName from "../rules/no-icon-file-extension-in-template-icon-name.js";
|
|
12
|
+
import noInheritSecrets from "../rules/no-inherit-secrets.js";
|
|
13
|
+
import noInvalidConcurrencyContext from "../rules/no-invalid-concurrency-context.js";
|
|
14
|
+
import noInvalidKey from "../rules/no-invalid-key.js";
|
|
15
|
+
import noInvalidReusableWorkflowJobKey from "../rules/no-invalid-reusable-workflow-job-key.js";
|
|
16
|
+
import noInvalidTemplateFilePatternRegex from "../rules/no-invalid-template-file-pattern-regex.js";
|
|
17
|
+
import noInvalidWorkflowCallOutputValue from "../rules/no-invalid-workflow-call-output-value.js";
|
|
18
|
+
import noPathSeparatorsInTemplateIconName from "../rules/no-path-separators-in-template-icon-name.js";
|
|
19
|
+
import noPostIfWithoutPost from "../rules/no-post-if-without-post.js";
|
|
20
|
+
import noPrHeadCheckoutInPullRequestTarget from "../rules/no-pr-head-checkout-in-pull-request-target.js";
|
|
21
|
+
import noPreIfWithoutPre from "../rules/no-pre-if-without-pre.js";
|
|
22
|
+
import noRequiredInputWithDefault from "../rules/no-required-input-with-default.js";
|
|
23
|
+
import noSecretsInIf from "../rules/no-secrets-in-if.js";
|
|
24
|
+
import noSelfHostedRunnerOnForkPrEvents from "../rules/no-self-hosted-runner-on-fork-pr-events.js";
|
|
25
|
+
import noSubdirectoryTemplateFilePattern from "../rules/no-subdirectory-template-file-pattern.js";
|
|
26
|
+
import noTemplatePlaceholderInNonTemplateWorkflow from "../rules/no-template-placeholder-in-non-template-workflow.js";
|
|
27
|
+
import noTopLevelEnv from "../rules/no-top-level-env.js";
|
|
28
|
+
import noTopLevelPermissions from "../rules/no-top-level-permissions.js";
|
|
29
|
+
import noUniversalTemplateFilePattern from "../rules/no-universal-template-file-pattern.js";
|
|
30
|
+
import noUnknownInputReferenceInComposite from "../rules/no-unknown-input-reference-in-composite.js";
|
|
31
|
+
import noUnknownJobOutputReference from "../rules/no-unknown-job-output-reference.js";
|
|
32
|
+
import noUnknownStepReference from "../rules/no-unknown-step-reference.js";
|
|
33
|
+
import noUntrustedInputInRun from "../rules/no-untrusted-input-in-run.js";
|
|
34
|
+
import noUnusedInputInComposite from "../rules/no-unused-input-in-composite.js";
|
|
35
|
+
import noWriteAllPermissions from "../rules/no-write-all-permissions.js";
|
|
36
|
+
import pinActionShas from "../rules/pin-action-shas.js";
|
|
37
|
+
import preferActionYml from "../rules/prefer-action-yml.js";
|
|
38
|
+
import preferFailFast from "../rules/prefer-fail-fast.js";
|
|
39
|
+
import preferFileExtension from "../rules/prefer-file-extension.js";
|
|
40
|
+
import preferInputsContext from "../rules/prefer-inputs-context.js";
|
|
41
|
+
import preferStepUsesStyle from "../rules/prefer-step-uses-style.js";
|
|
42
|
+
import preferTemplateYmlExtension from "../rules/prefer-template-yml-extension.js";
|
|
43
|
+
import requireActionName from "../rules/require-action-name.js";
|
|
44
|
+
import requireActionRunName from "../rules/require-action-run-name.js";
|
|
45
|
+
import requireCheckoutBeforeLocalAction from "../rules/require-checkout-before-local-action.js";
|
|
46
|
+
import requireCompositeStepName from "../rules/require-composite-step-name.js";
|
|
47
|
+
import requireJobName from "../rules/require-job-name.js";
|
|
48
|
+
import requireJobStepName from "../rules/require-job-step-name.js";
|
|
49
|
+
import requireJobTimeoutMinutes from "../rules/require-job-timeout-minutes.js";
|
|
50
|
+
import requireMergeGroupTrigger from "../rules/require-merge-group-trigger.js";
|
|
51
|
+
import requirePullRequestTargetBranches from "../rules/require-pull-request-target-branches.js";
|
|
52
|
+
import requireRunStepShell from "../rules/require-run-step-shell.js";
|
|
53
|
+
import requireTemplateCategories from "../rules/require-template-categories.js";
|
|
54
|
+
import requireTemplateFilePatterns from "../rules/require-template-file-patterns.js";
|
|
55
|
+
import requireTemplateIconFileExists from "../rules/require-template-icon-file-exists.js";
|
|
56
|
+
import requireTemplateIconName from "../rules/require-template-icon-name.js";
|
|
57
|
+
import requireTemplateWorkflowName from "../rules/require-template-workflow-name.js";
|
|
58
|
+
import requireTriggerTypes from "../rules/require-trigger-types.js";
|
|
59
|
+
import requireWorkflowCallInputType from "../rules/require-workflow-call-input-type.js";
|
|
60
|
+
import requireWorkflowCallOutputValue from "../rules/require-workflow-call-output-value.js";
|
|
61
|
+
import requireWorkflowConcurrency from "../rules/require-workflow-concurrency.js";
|
|
62
|
+
import requireWorkflowDispatchInputType from "../rules/require-workflow-dispatch-input-type.js";
|
|
63
|
+
import requireWorkflowInterfaceDescription from "../rules/require-workflow-interface-description.js";
|
|
64
|
+
import requireWorkflowPermissions from "../rules/require-workflow-permissions.js";
|
|
65
|
+
import requireWorkflowRunBranches from "../rules/require-workflow-run-branches.js";
|
|
66
|
+
import requireWorkflowTemplatePair from "../rules/require-workflow-template-pair.js";
|
|
67
|
+
import requireWorkflowTemplatePropertiesPair from "../rules/require-workflow-template-properties-pair.js";
|
|
68
|
+
import validTimeoutMinutes from "../rules/valid-timeout-minutes.js";
|
|
69
|
+
import validTriggerEvents from "../rules/valid-trigger-events.js";
|
|
70
|
+
/** Strongly typed plugin rule registry keyed by unqualified rule name. */
|
|
71
|
+
const githubActionsRulesDefinition = {
|
|
72
|
+
"action-name-casing": actionNameCasing,
|
|
73
|
+
"job-id-casing": jobIdCasing,
|
|
74
|
+
"max-jobs-per-action": maxJobsPerAction,
|
|
75
|
+
"no-case-insensitive-input-id-collision": noCaseInsensitiveInputIdCollision,
|
|
76
|
+
"no-composite-input-env-access": noCompositeInputEnvAccess,
|
|
77
|
+
"no-deprecated-node-runtime": noDeprecatedNodeRuntime,
|
|
78
|
+
"no-duplicate-composite-step-id": noDuplicateCompositeStepId,
|
|
79
|
+
"no-empty-template-file-pattern": noEmptyTemplateFilePattern,
|
|
80
|
+
"no-external-job": noExternalJob,
|
|
81
|
+
"no-hardcoded-default-branch-in-template": noHardcodedDefaultBranchInTemplate,
|
|
82
|
+
"no-icon-file-extension-in-template-icon-name": noIconFileExtensionInTemplateIconName,
|
|
83
|
+
"no-inherit-secrets": noInheritSecrets,
|
|
84
|
+
"no-invalid-concurrency-context": noInvalidConcurrencyContext,
|
|
85
|
+
"no-invalid-key": noInvalidKey,
|
|
86
|
+
"no-invalid-reusable-workflow-job-key": noInvalidReusableWorkflowJobKey,
|
|
87
|
+
"no-invalid-template-file-pattern-regex": noInvalidTemplateFilePatternRegex,
|
|
88
|
+
"no-invalid-workflow-call-output-value": noInvalidWorkflowCallOutputValue,
|
|
89
|
+
"no-path-separators-in-template-icon-name": noPathSeparatorsInTemplateIconName,
|
|
90
|
+
"no-post-if-without-post": noPostIfWithoutPost,
|
|
91
|
+
"no-pr-head-checkout-in-pull-request-target": noPrHeadCheckoutInPullRequestTarget,
|
|
92
|
+
"no-pre-if-without-pre": noPreIfWithoutPre,
|
|
93
|
+
"no-required-input-with-default": noRequiredInputWithDefault,
|
|
94
|
+
"no-secrets-in-if": noSecretsInIf,
|
|
95
|
+
"no-self-hosted-runner-on-fork-pr-events": noSelfHostedRunnerOnForkPrEvents,
|
|
96
|
+
"no-subdirectory-template-file-pattern": noSubdirectoryTemplateFilePattern,
|
|
97
|
+
"no-template-placeholder-in-non-template-workflow": noTemplatePlaceholderInNonTemplateWorkflow,
|
|
98
|
+
"no-top-level-env": noTopLevelEnv,
|
|
99
|
+
"no-top-level-permissions": noTopLevelPermissions,
|
|
100
|
+
"no-universal-template-file-pattern": noUniversalTemplateFilePattern,
|
|
101
|
+
"no-unknown-input-reference-in-composite": noUnknownInputReferenceInComposite,
|
|
102
|
+
"no-unknown-job-output-reference": noUnknownJobOutputReference,
|
|
103
|
+
"no-unknown-step-reference": noUnknownStepReference,
|
|
104
|
+
"no-untrusted-input-in-run": noUntrustedInputInRun,
|
|
105
|
+
"no-unused-input-in-composite": noUnusedInputInComposite,
|
|
106
|
+
"no-write-all-permissions": noWriteAllPermissions,
|
|
107
|
+
"pin-action-shas": pinActionShas,
|
|
108
|
+
"prefer-action-yml": preferActionYml,
|
|
109
|
+
"prefer-fail-fast": preferFailFast,
|
|
110
|
+
"prefer-file-extension": preferFileExtension,
|
|
111
|
+
"prefer-inputs-context": preferInputsContext,
|
|
112
|
+
"prefer-step-uses-style": preferStepUsesStyle,
|
|
113
|
+
"prefer-template-yml-extension": preferTemplateYmlExtension,
|
|
114
|
+
"require-action-name": requireActionName,
|
|
115
|
+
"require-action-run-name": requireActionRunName,
|
|
116
|
+
"require-checkout-before-local-action": requireCheckoutBeforeLocalAction,
|
|
117
|
+
"require-composite-step-name": requireCompositeStepName,
|
|
118
|
+
"require-job-name": requireJobName,
|
|
119
|
+
"require-job-step-name": requireJobStepName,
|
|
120
|
+
"require-job-timeout-minutes": requireJobTimeoutMinutes,
|
|
121
|
+
"require-merge-group-trigger": requireMergeGroupTrigger,
|
|
122
|
+
"require-pull-request-target-branches": requirePullRequestTargetBranches,
|
|
123
|
+
"require-run-step-shell": requireRunStepShell,
|
|
124
|
+
"require-template-categories": requireTemplateCategories,
|
|
125
|
+
"require-template-file-patterns": requireTemplateFilePatterns,
|
|
126
|
+
"require-template-icon-file-exists": requireTemplateIconFileExists,
|
|
127
|
+
"require-template-icon-name": requireTemplateIconName,
|
|
128
|
+
"require-template-workflow-name": requireTemplateWorkflowName,
|
|
129
|
+
"require-trigger-types": requireTriggerTypes,
|
|
130
|
+
"require-workflow-call-input-type": requireWorkflowCallInputType,
|
|
131
|
+
"require-workflow-call-output-value": requireWorkflowCallOutputValue,
|
|
132
|
+
"require-workflow-concurrency": requireWorkflowConcurrency,
|
|
133
|
+
"require-workflow-dispatch-input-type": requireWorkflowDispatchInputType,
|
|
134
|
+
"require-workflow-interface-description": requireWorkflowInterfaceDescription,
|
|
135
|
+
"require-workflow-permissions": requireWorkflowPermissions,
|
|
136
|
+
"require-workflow-run-branches": requireWorkflowRunBranches,
|
|
137
|
+
"require-workflow-template-pair": requireWorkflowTemplatePair,
|
|
138
|
+
"require-workflow-template-properties-pair": requireWorkflowTemplatePropertiesPair,
|
|
139
|
+
"valid-timeout-minutes": validTimeoutMinutes,
|
|
140
|
+
"valid-trigger-events": validTriggerEvents,
|
|
141
|
+
};
|
|
142
|
+
/** Strongly typed plugin rule registry keyed by unqualified rule name. */
|
|
143
|
+
export const githubActionsRules = githubActionsRulesDefinition;
|
|
144
|
+
//# sourceMappingURL=rules-registry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rules-registry.js","sourceRoot":"","sources":["../../src/_internal/rules-registry.ts"],"names":[],"mappings":"AAMA,OAAO,gBAAgB,MAAM,gCAAgC,CAAC;AAC9D,OAAO,WAAW,MAAM,2BAA2B,CAAC;AACpD,OAAO,gBAAgB,MAAM,iCAAiC,CAAC;AAC/D,OAAO,iCAAiC,MAAM,oDAAoD,CAAC;AACnG,OAAO,yBAAyB,MAAM,2CAA2C,CAAC;AAClF,OAAO,uBAAuB,MAAM,wCAAwC,CAAC;AAC7E,OAAO,0B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cAAc;IAClC,uBAAuB,EAAE,mBAAmB;IAC5C,uBAAuB,EAAE,mBAAmB;IAC5C,wBAAwB,EAAE,mBAAmB;IAC7C,+BAA+B,EAAE,0BAA0B;IAC3D,qBAAqB,EAAE,iBAAiB;IACxC,yBAAyB,EAAE,oBAAoB;IAC/C,sCAAsC,EAAE,gCAAgC;IACxE,6BAA6B,EAAE,wBAAwB;IACvD,kBAAkB,EAAE,cAAc;IAClC,uBAAuB,EAAE,kBAAkB;IAC3C,6BAA6B,EAAE,wBAAwB;IACvD,6BAA6B,EAAE,wBAAwB;IACvD,sCAAsC,EAAE,gCAAgC;IACxE,wBAAwB,EAAE,mBAAmB;IAC7C,6BAA6B,EAAE,yBAAyB;IACxD,gCAAgC,EAAE,2BAA2B;IAC7D,mCAAmC,EAAE,6BAA6B;IAClE,4BAA4B,EAAE,uBAAuB;IACrD,gCAAgC,EAAE,2BAA2B;IAC7D,uBAAuB,EAAE,mBAAmB;IAC5C,kCAAkC,EAAE,4BAA4B;IAChE,oCAAoC,EAAE,8BAA8B;IACpE,8BAA8B,EAAE,0BAA0B;IAC1D,sCAAsC,EAAE,gCAAgC;IACxE,wCAAwC,EACpC,mCAAmC;IACvC,8BAA8B,EAAE,0BAA0B;IAC1D,+BAA+B,EAAE,0BAA0B;IAC3D,gCAAgC,EAAE,2BAA2B;IAC7D,2CAA2C,EACvC,qCAAqC;IACzC,uBAAuB,EAAE,mBAAmB;IAC5C,sBAAsB,EAAE,kBAAkB;CACH,CAAC;AAE5C,0EAA0E;AAC1E,MAAM,CAAC,MAAM,kBAAkB,GAC3B,4BAA4B,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @packageDocumentation
|
|
3
|
+
* Helpers for reading workflow-template metadata from `.properties.json` files.
|
|
4
|
+
*/
|
|
5
|
+
import type { Rule } from "eslint";
|
|
6
|
+
import type { AST } from "yaml-eslint-parser";
|
|
7
|
+
/** Read and return the template metadata root mapping if present. */
|
|
8
|
+
export declare const getWorkflowTemplatePropertiesRoot: (context: Rule.RuleContext) => AST.YAMLMapping | null;
|
|
9
|
+
/** Read a scalar string property from workflow-template metadata. */
|
|
10
|
+
export declare const getWorkflowTemplateStringProperty: (root: AST.YAMLMapping, key: string) => null | string;
|
|
11
|
+
/** Resolve `filePatterns` entries with both node and scalar string value. */
|
|
12
|
+
export declare const getWorkflowTemplateFilePatternEntries: (root: AST.YAMLMapping) => readonly Readonly<{
|
|
13
|
+
node: AST.YAMLNode;
|
|
14
|
+
value: string;
|
|
15
|
+
}>[];
|
|
16
|
+
/** Build the matching `.properties.json` path for a template YAML path. */
|
|
17
|
+
export declare const getPairedTemplatePropertiesPath: (filePath: string) => string;
|
|
18
|
+
/** Build both valid template YAML paths for a `.properties.json` path. */
|
|
19
|
+
export declare const getPairedTemplateYamlPaths: (filePath: string) => readonly [string, string];
|
|
20
|
+
//# sourceMappingURL=workflow-template-properties.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workflow-template-properties.d.ts","sourceRoot":"","sources":["../../src/_internal/workflow-template-properties.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AACnC,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,oBAAoB,CAAC;AAW9C,qEAAqE;AACrE,eAAO,MAAM,iCAAiC,GAC1C,SAAS,IAAI,CAAC,WAAW,KAC1B,GAAG,CAAC,WAAW,GAAG,IAAgC,CAAC;AAEtD,qEAAqE;AACrE,eAAO,MAAM,iCAAiC,GAC1C,MAAM,GAAG,CAAC,WAAW,EACrB,KAAK,MAAM,KACZ,IAAI,GAAG,MAAgE,CAAC;AAE3E,6EAA6E;AAC7E,eAAO,MAAM,qCAAqC,GAC9C,MAAM,GAAG,CAAC,WAAW,KACtB,SAAS,QAAQ,CAAC;IAAE,IAAI,EAAE,GAAG,CAAC,QAAQ,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC,EA0B1D,CAAC;AAGF,2EAA2E;AAC3E,eAAO,MAAM,+BAA+B,GAAI,UAAU,MAAM,KAAG,MAMlE,CAAC;AAEF,0EAA0E;AAC1E,eAAO,MAAM,0BAA0B,GACnC,UAAU,MAAM,KACjB,SAAS,CAAC,MAAM,EAAE,MAAM,CAS1B,CAAC"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { dirname, join } from "node:path";
|
|
2
|
+
import { getMappingPair, getMappingValueAsSequence, getScalarStringValue, getWorkflowRoot, } from "./workflow-yaml.js";
|
|
3
|
+
/** Read and return the template metadata root mapping if present. */
|
|
4
|
+
export const getWorkflowTemplatePropertiesRoot = (context) => getWorkflowRoot(context);
|
|
5
|
+
/** Read a scalar string property from workflow-template metadata. */
|
|
6
|
+
export const getWorkflowTemplateStringProperty = (root, key) => getScalarStringValue(getMappingPair(root, key)?.value);
|
|
7
|
+
/** Resolve `filePatterns` entries with both node and scalar string value. */
|
|
8
|
+
export const getWorkflowTemplateFilePatternEntries = (root) => {
|
|
9
|
+
const filePatternsSequence = getMappingValueAsSequence(root, "filePatterns");
|
|
10
|
+
if (filePatternsSequence === null) {
|
|
11
|
+
return [];
|
|
12
|
+
}
|
|
13
|
+
const entries = [];
|
|
14
|
+
for (const entry of filePatternsSequence.entries) {
|
|
15
|
+
const entryValue = getScalarStringValue(entry);
|
|
16
|
+
if (entryValue === null || entry === null || entry === undefined) {
|
|
17
|
+
continue;
|
|
18
|
+
}
|
|
19
|
+
entries.push({
|
|
20
|
+
node: entry,
|
|
21
|
+
value: entryValue,
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
return entries;
|
|
25
|
+
};
|
|
26
|
+
/* eslint-enable @typescript-eslint/prefer-readonly-parameter-types -- Re-enable readonly-parameter checks outside parser AST helper signatures. */
|
|
27
|
+
/** Build the matching `.properties.json` path for a template YAML path. */
|
|
28
|
+
export const getPairedTemplatePropertiesPath = (filePath) => {
|
|
29
|
+
const stem = filePath.endsWith(".yaml")
|
|
30
|
+
? filePath.slice(0, -".yaml".length)
|
|
31
|
+
: filePath.slice(0, -".yml".length);
|
|
32
|
+
return `${stem}.properties.json`;
|
|
33
|
+
};
|
|
34
|
+
/** Build both valid template YAML paths for a `.properties.json` path. */
|
|
35
|
+
export const getPairedTemplateYamlPaths = (filePath) => {
|
|
36
|
+
const fileDirectory = dirname(filePath);
|
|
37
|
+
const fileName = filePath.slice(fileDirectory.length + 1);
|
|
38
|
+
const stem = fileName.slice(0, -".properties.json".length);
|
|
39
|
+
return [
|
|
40
|
+
join(fileDirectory, `${stem}.yml`),
|
|
41
|
+
join(fileDirectory, `${stem}.yaml`),
|
|
42
|
+
];
|
|
43
|
+
};
|
|
44
|
+
//# sourceMappingURL=workflow-template-properties.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workflow-template-properties.js","sourceRoot":"","sources":["../../src/_internal/workflow-template-properties.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAE1C,OAAO,EACH,cAAc,EACd,yBAAyB,EACzB,oBAAoB,EACpB,eAAe,GAClB,MAAM,oBAAoB,CAAC;AAE5B,qEAAqE;AACrE,MAAM,CAAC,MAAM,iCAAiC,GAAG,CAC7C,OAAyB,EACH,EAAE,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC;AAEtD,qEAAqE;AACrE,MAAM,CAAC,MAAM,iCAAiC,GAAG,CAC7C,IAAqB,EACrB,GAAW,EACE,EAAE,CAAC,oBAAoB,CAAC,cAAc,CAAC,IAAI,EAAE,GAAG,CAAC,EAAE,KAAK,CAAC,CAAC;AAE3E,6EAA6E;AAC7E,MAAM,CAAC,MAAM,qCAAqC,GAAG,CACjD,IAAqB,EACqC,EAAE;IAC5D,MAAM,oBAAoB,GAAG,yBAAyB,CAClD,IAAI,EACJ,cAAc,CACjB,CAAC;IAEF,IAAI,oBAAoB,KAAK,IA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AAG,IAAI,MAAM,CAAC;QAClC,IAAI,CAAC,aAAa,EAAE,GAAG,IAAI,OAAO,CAAC;KACtC,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @packageDocumentation
|
|
3
|
+
* Shared YAML AST helpers for GitHub Actions workflow rules.
|
|
4
|
+
*/
|
|
5
|
+
import type { Rule } from "eslint";
|
|
6
|
+
import type { AST } from "yaml-eslint-parser";
|
|
7
|
+
/** Default workflow globs used by the exported flat configs. */
|
|
8
|
+
export declare const WORKFLOW_FILE_GLOBS: readonly string[];
|
|
9
|
+
/** Workflow job mapping paired with its stable identifier key. */
|
|
10
|
+
export type WorkflowJobEntry = {
|
|
11
|
+
readonly id: string;
|
|
12
|
+
readonly idNode: WorkflowYamlValueNode;
|
|
13
|
+
readonly mapping: AST.YAMLMapping;
|
|
14
|
+
readonly pair: AST.YAMLPair;
|
|
15
|
+
};
|
|
16
|
+
/** YAML value node type used by workflow helper APIs. */
|
|
17
|
+
type WorkflowYamlValueNode = AST.YAMLContent | AST.YAMLWithMeta;
|
|
18
|
+
/** Narrow a YAML node to `YAMLWithMeta`. */
|
|
19
|
+
export declare const isYamlWithMeta: (node: AST.YAMLContent | AST.YAMLNode | AST.YAMLWithMeta | null | undefined) => node is AST.YAMLWithMeta;
|
|
20
|
+
/** Unwrap `YAMLWithMeta` wrappers until the underlying YAML value is reached. */
|
|
21
|
+
export declare const unwrapYamlValue: (node: null | undefined | WorkflowYamlValueNode) => AST.YAMLContent | null;
|
|
22
|
+
/** Narrow a YAML node to a mapping. */
|
|
23
|
+
export declare const isYamlMapping: (node: null | undefined | WorkflowYamlValueNode) => node is AST.YAMLMapping;
|
|
24
|
+
/** Narrow a YAML node to a sequence. */
|
|
25
|
+
export declare const isYamlSequence: (node: null | undefined | WorkflowYamlValueNode) => node is AST.YAMLSequence;
|
|
26
|
+
/** Narrow a YAML node to a scalar. */
|
|
27
|
+
export declare const isYamlScalar: (node: null | undefined | WorkflowYamlValueNode) => node is AST.YAMLScalar;
|
|
28
|
+
/** Resolve the first document's root mapping when linting a workflow file. */
|
|
29
|
+
export declare const getWorkflowRoot: (context: Rule.RuleContext) => AST.YAMLMapping | null;
|
|
30
|
+
/** Read a scalar node as a string when possible. */
|
|
31
|
+
export declare const getScalarStringValue: (node: null | undefined | WorkflowYamlValueNode) => null | string;
|
|
32
|
+
/** Read a scalar node as a number when possible. */
|
|
33
|
+
export declare const getScalarNumberValue: (node: null | undefined | WorkflowYamlValueNode) => null | number;
|
|
34
|
+
/** Determine whether a scalar is a GitHub expression string like `${{ ... }}`. */
|
|
35
|
+
export declare const isGithubExpressionScalar: (node: null | undefined | WorkflowYamlValueNode) => boolean;
|
|
36
|
+
/** Find a mapping pair by its exact scalar key. */
|
|
37
|
+
export declare const getMappingPair: (mapping: AST.YAMLMapping, key: string) => AST.YAMLPair | null;
|
|
38
|
+
/** Resolve a mapping child by key, ensuring the value is a mapping. */
|
|
39
|
+
export declare const getMappingValueAsMapping: (mapping: AST.YAMLMapping, key: string) => AST.YAMLMapping | null;
|
|
40
|
+
/** Resolve a mapping child by key, ensuring the value is a sequence. */
|
|
41
|
+
export declare const getMappingValueAsSequence: (mapping: AST.YAMLMapping, key: string) => AST.YAMLSequence | null;
|
|
42
|
+
/** Enumerate workflow jobs under `jobs`. */
|
|
43
|
+
export declare const getWorkflowJobs: (root: AST.YAMLMapping) => readonly WorkflowJobEntry[];
|
|
44
|
+
/** Collect the workflow event names declared under `on`. */
|
|
45
|
+
export declare const getWorkflowEventNames: (root: AST.YAMLMapping) => ReadonlySet<string>;
|
|
46
|
+
export {};
|
|
47
|
+
//# sourceMappingURL=workflow-yaml.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workflow-yaml.d.ts","sourceRoot":"","sources":["../../src/_internal/workflow-yaml.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,IAAI,EAAE,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MAAM,eAAe,GACxB,SAAS,IAAI,CAAC,WAAW,KAC1B,GAAG,CAAC,WAAW,GAAG,IAMpB,CAAC;AAEF,oDAAoD;AACpD,eAAO,MAAM,oBAAoB,GAC7B,MAAM,IAAI,GAAG,SAAS,GAAG,qBAAqB,KAC/C,IAAI,GAAG,MAeT,CAAC;AAEF,oDAAoD;AACpD,eAAO,MAAM,oBAAoB,GAC7B,MAAM,IAAI,GAAG,SAAS,GAAG,qBAAqB,KAC/C,IAAI,GAAG,MAQT,CAAC;AAEF,kFAAkF;AAClF,eAAO,MAAM,wBAAwB,GACjC,MAAM,IAAI,GAAG,SAAS,GAAG,qBAAqB,KAC/C,OAQF,CAAC;AAEF,mDAAmD;AACnD,eAAO,MAAM,cAAc,GACvB,SAAS,GAAG,CAAC,WAAW,EACxB,KAAK,MAAM,KACZ,GAAG,CAAC,QAAQ,GAAG,IAQjB,CAAC;AAEF,uEAAuE;AACvE,eAAO,MAAM,wBAAwB,GACjC,SAAS,GAAG,CAAC,WAAW,EACxB,KAAK,MAAM,KACZ,GAAG,CAAC,WAAW,GAAG,IAKpB,CAAC;AAEF,wEAAwE;AACxE,eAAO,MAAM,yBAAyB,GAClC,SAAS,GAAG,CAAC,WAAW,EACxB,KAAK,MAAM,KACZ,GAAG,CAAC,YAAY,GAAG,IAKrB,CAAC;AAEF,4CAA4C;AAC5C,eAAO,MAAM,eAAe,GACxB,MAAM,GAAG,CAAC,WAAW,KACtB,SAAS,gBAAgB,EA8B3B,CAAC;AAEF,4DAA4D;AAC5D,eAAO,MAAM,qBAAqB,GAC9B,MAAM,GAAG,CAAC,WAAW,KACtB,WAAW,CAAC,MAAM,CA0CpB,CAAC"}
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
/** Default workflow globs used by the exported flat configs. */
|
|
2
|
+
export const WORKFLOW_FILE_GLOBS = [
|
|
3
|
+
".github/workflows/*.{yml,yaml}",
|
|
4
|
+
];
|
|
5
|
+
/** Narrow a YAML node to `YAMLWithMeta`. */
|
|
6
|
+
export const isYamlWithMeta = (node) => node?.type === "YAMLWithMeta";
|
|
7
|
+
/** Unwrap `YAMLWithMeta` wrappers until the underlying YAML value is reached. */
|
|
8
|
+
export const unwrapYamlValue = (node) => {
|
|
9
|
+
if (node === null || node === undefined) {
|
|
10
|
+
return null;
|
|
11
|
+
}
|
|
12
|
+
if (isYamlWithMeta(node)) {
|
|
13
|
+
return unwrapYamlValue(node.value);
|
|
14
|
+
}
|
|
15
|
+
return node;
|
|
16
|
+
};
|
|
17
|
+
/** Narrow a YAML node to a mapping. */
|
|
18
|
+
export const isYamlMapping = (node) => unwrapYamlValue(node)?.type === "YAMLMapping";
|
|
19
|
+
/** Narrow a YAML node to a sequence. */
|
|
20
|
+
export const isYamlSequence = (node) => unwrapYamlValue(node)?.type === "YAMLSequence";
|
|
21
|
+
/** Narrow a YAML node to a scalar. */
|
|
22
|
+
export const isYamlScalar = (node) => unwrapYamlValue(node)?.type === "YAMLScalar";
|
|
23
|
+
/** Resolve the first document's root mapping when linting a workflow file. */
|
|
24
|
+
export const getWorkflowRoot = (context) => {
|
|
25
|
+
const program = context.sourceCode.ast;
|
|
26
|
+
const [document] = program.body;
|
|
27
|
+
const rootNode = unwrapYamlValue(document?.content ?? null);
|
|
28
|
+
return rootNode?.type === "YAMLMapping" ? rootNode : null;
|
|
29
|
+
};
|
|
30
|
+
/** Read a scalar node as a string when possible. */
|
|
31
|
+
export const getScalarStringValue = (node) => {
|
|
32
|
+
const unwrappedNode = unwrapYamlValue(node);
|
|
33
|
+
if (unwrappedNode?.type !== "YAMLScalar") {
|
|
34
|
+
return null;
|
|
35
|
+
}
|
|
36
|
+
if (typeof unwrappedNode.value === "string") {
|
|
37
|
+
return unwrappedNode.value;
|
|
38
|
+
}
|
|
39
|
+
return "strValue" in unwrappedNode &&
|
|
40
|
+
typeof unwrappedNode.strValue === "string"
|
|
41
|
+
? unwrappedNode.strValue
|
|
42
|
+
: null;
|
|
43
|
+
};
|
|
44
|
+
/** Read a scalar node as a number when possible. */
|
|
45
|
+
export const getScalarNumberValue = (node) => {
|
|
46
|
+
const unwrappedNode = unwrapYamlValue(node);
|
|
47
|
+
if (unwrappedNode?.type !== "YAMLScalar") {
|
|
48
|
+
return null;
|
|
49
|
+
}
|
|
50
|
+
return typeof unwrappedNode.value === "number" ? unwrappedNode.value : null;
|
|
51
|
+
};
|
|
52
|
+
/** Determine whether a scalar is a GitHub expression string like `${{ ... }}`. */
|
|
53
|
+
export const isGithubExpressionScalar = (node) => {
|
|
54
|
+
const scalarValue = getScalarStringValue(node);
|
|
55
|
+
return (scalarValue !== null &&
|
|
56
|
+
scalarValue.trimStart().startsWith("${{") &&
|
|
57
|
+
scalarValue.trimEnd().endsWith("}}"));
|
|
58
|
+
};
|
|
59
|
+
/** Find a mapping pair by its exact scalar key. */
|
|
60
|
+
export const getMappingPair = (mapping, key) => {
|
|
61
|
+
for (const pair of mapping.pairs) {
|
|
62
|
+
if (getScalarStringValue(pair.key) === key) {
|
|
63
|
+
return pair;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
return null;
|
|
67
|
+
};
|
|
68
|
+
/** Resolve a mapping child by key, ensuring the value is a mapping. */
|
|
69
|
+
export const getMappingValueAsMapping = (mapping, key) => {
|
|
70
|
+
const pair = getMappingPair(mapping, key);
|
|
71
|
+
const valueNode = unwrapYamlValue(pair?.value ?? null);
|
|
72
|
+
return valueNode?.type === "YAMLMapping" ? valueNode : null;
|
|
73
|
+
};
|
|
74
|
+
/** Resolve a mapping child by key, ensuring the value is a sequence. */
|
|
75
|
+
export const getMappingValueAsSequence = (mapping, key) => {
|
|
76
|
+
const pair = getMappingPair(mapping, key);
|
|
77
|
+
const valueNode = unwrapYamlValue(pair?.value ?? null);
|
|
78
|
+
return valueNode?.type === "YAMLSequence" ? valueNode : null;
|
|
79
|
+
};
|
|
80
|
+
/** Enumerate workflow jobs under `jobs`. */
|
|
81
|
+
export const getWorkflowJobs = (root) => {
|
|
82
|
+
const jobsMapping = getMappingValueAsMapping(root, "jobs");
|
|
83
|
+
if (jobsMapping === null) {
|
|
84
|
+
return [];
|
|
85
|
+
}
|
|
86
|
+
const jobs = [];
|
|
87
|
+
for (const pair of jobsMapping.pairs) {
|
|
88
|
+
const jobId = getScalarStringValue(pair.key);
|
|
89
|
+
const jobMapping = unwrapYamlValue(pair.value);
|
|
90
|
+
if (jobId === null || jobMapping?.type !== "YAMLMapping") {
|
|
91
|
+
continue;
|
|
92
|
+
}
|
|
93
|
+
if (pair.key === null || pair.key === undefined) {
|
|
94
|
+
continue;
|
|
95
|
+
}
|
|
96
|
+
jobs.push({
|
|
97
|
+
id: jobId,
|
|
98
|
+
idNode: pair.key,
|
|
99
|
+
mapping: jobMapping,
|
|
100
|
+
pair,
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
return jobs;
|
|
104
|
+
};
|
|
105
|
+
/** Collect the workflow event names declared under `on`. */
|
|
106
|
+
export const getWorkflowEventNames = (root) => {
|
|
107
|
+
const onPair = getMappingPair(root, "on");
|
|
108
|
+
const onValue = unwrapYamlValue(onPair?.value ?? null);
|
|
109
|
+
const eventNames = new Set();
|
|
110
|
+
if (onValue === null) {
|
|
111
|
+
return eventNames;
|
|
112
|
+
}
|
|
113
|
+
if (onValue.type === "YAMLScalar") {
|
|
114
|
+
const eventName = getScalarStringValue(onValue);
|
|
115
|
+
if (eventName !== null) {
|
|
116
|
+
eventNames.add(eventName);
|
|
117
|
+
}
|
|
118
|
+
return eventNames;
|
|
119
|
+
}
|
|
120
|
+
if (onValue.type === "YAMLSequence") {
|
|
121
|
+
for (const entry of onValue.entries) {
|
|
122
|
+
const eventName = getScalarStringValue(entry);
|
|
123
|
+
if (eventName !== null) {
|
|
124
|
+
eventNames.add(eventName);
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
return eventNames;
|
|
128
|
+
}
|
|
129
|
+
if (onValue.type === "YAMLMapping") {
|
|
130
|
+
for (const pair of onValue.pairs) {
|
|
131
|
+
const eventName = getScalarStringValue(pair.key);
|
|
132
|
+
if (eventName !== null) {
|
|
133
|
+
eventNames.add(eventName);
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
return eventNames;
|
|
138
|
+
};
|
|
139
|
+
/* eslint-enable @typescript-eslint/prefer-readonly-parameter-types -- Re-enable readonly-parameter checks after YAML AST helper declarations. */
|
|
140
|
+
//# sourceMappingURL=workflow-yaml.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workflow-yaml.js","sourceRoot":"","sources":["../../src/_internal/workflow-yaml.ts"],"names":[],"mappings":"AAQA,gEAAgE;AAChE,MAAM,CAAC,MAAM,mBAAmB,GAAsB;IAClD,gCAAgC;CACnC,CAAC;AAaF,4CAA4C;AAC5C,MAAM,CAAC,MAAM,cAAc,GAAG,CAC1B,IAA0E,EAClD,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,cAAc,CAAC;AAE7D,iFAAiF;AACjF,MAAM,CAAC,MAAM,eAAe,GAAG,CAC3B,IAA8C,EACxB,EAAE;IACxB,IAAI,IAAI,KAAK,IAAI,IAAI,IAAI,KAAK,SAAS,EAAE,CAAC;QACtC,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,IAAI,cAAc,CAAC,IAAI,CAAC,EAAE,CAAC;QACvB,OAAO,eAAe,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACvC,CAAC;IAED,OAAO,IAAI,CAAC;AAChB,CAAC,CAAC;AAEF,uCAAuC;AACvC,MAAM,CAAC,MAAM,aAAa,GAAG,CACzB,IAA8C,EACvB,EAAE,CAAC,eAAe,CAAC,IAAI,CAAC,EAAE,IAAI,KAAK,aAAa,CAAC;AAE5E,wCAAwC;AACxC,MAAM,CAAC,MAAM,cAAc,GAAG,CAC1B,IAA8C,EACtB,EAAE,CAAC,eAAe,CAAC,IAAI,CAAC,EAAE,IAAI,KAAK,cAAc,CAAC;AAE9E,sCAAsC;AACtC,MAAM,CAAC,M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traversal utilities shared by lint rules.
|
|
4
|
+
*/
|
|
5
|
+
import type { AST } from "yaml-eslint-parser";
|
|
6
|
+
/** Visit every string scalar contained in a YAML subtree. */
|
|
7
|
+
export declare const visitYamlStringScalars: (node: AST.YAMLContent | AST.YAMLWithMeta | null | undefined, visitor: (node: Readonly<AST.YAMLScalar>, value: string) => void) => void;
|
|
8
|
+
/** Collect every string scalar value from a YAML subtree. */
|
|
9
|
+
export declare const collectYamlStringScalars: (node: AST.YAMLContent | AST.YAMLWithMeta | null | undefined) => readonly string[];
|
|
10
|
+
//# sourceMappingURL=yaml-traversal.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"yaml-traversal.d.ts","sourceRoot":"","sources":["../../src/_internal/yaml-traversal.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,oBAAoB,CAAC;AAK9C,6DAA6D;AAC7D,eAAO,MAAM,sBAAsB,GAC/B,MAAM,GAAG,CAAC,WAAW,GAAG,GAAG,CAAC,YAAY,GAAG,IAAI,GAAG,SAAS,EAC3D,SAAS,CAAC,IAAI,EAAE,QAAQ,CAAC,GAAG,CAAC,UAAU,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,KACjE,IAgCF,CAAC;AAEF,6DAA6D;AAC7D,eAAO,MAAM,wBAAwB,GACjC,MAAM,GAAG,CAAC,WAAW,GAAG,GAAG,CAAC,YAAY,GAAG,IAAI,GAAG,SAAS,KAC5D,SAAS,MAAM,EAQjB,CAAC"}
|