eslint-plugin-copilot 1.0.5
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 +5316 -0
- package/LICENSE +21 -0
- package/README.md +192 -0
- package/dist/_internal/copilot-config-references.d.ts +34 -0
- package/dist/_internal/copilot-config-references.d.ts.map +1 -0
- package/dist/_internal/copilot-config-references.js +55 -0
- package/dist/_internal/copilot-config-references.js.map +1 -0
- package/dist/_internal/copilot-customization-names.d.ts +21 -0
- package/dist/_internal/copilot-customization-names.d.ts.map +1 -0
- package/dist/_internal/copilot-customization-names.js +56 -0
- package/dist/_internal/copilot-customization-names.js.map +1 -0
- package/dist/_internal/copilot-file-kind.d.ts +19 -0
- package/dist/_internal/copilot-file-kind.d.ts.map +1 -0
- package/dist/_internal/copilot-file-kind.js +111 -0
- package/dist/_internal/copilot-file-kind.js.map +1 -0
- package/dist/_internal/create-copilot-rule.d.ts +39 -0
- package/dist/_internal/create-copilot-rule.d.ts.map +1 -0
- package/dist/_internal/create-copilot-rule.js +56 -0
- package/dist/_internal/create-copilot-rule.js.map +1 -0
- package/dist/_internal/customization-body.d.ts +6 -0
- package/dist/_internal/customization-body.d.ts.map +1 -0
- package/dist/_internal/customization-body.js +15 -0
- package/dist/_internal/customization-body.js.map +1 -0
- package/dist/_internal/duplicate-names.d.ts +12 -0
- package/dist/_internal/duplicate-names.d.ts.map +1 -0
- package/dist/_internal/duplicate-names.js +24 -0
- package/dist/_internal/duplicate-names.js.map +1 -0
- package/dist/_internal/file-system.d.ts +21 -0
- package/dist/_internal/file-system.d.ts.map +1 -0
- package/dist/_internal/file-system.js +86 -0
- package/dist/_internal/file-system.js.map +1 -0
- package/dist/_internal/frontmatter.d.ts +37 -0
- package/dist/_internal/frontmatter.d.ts.map +1 -0
- package/dist/_internal/frontmatter.js +398 -0
- package/dist/_internal/frontmatter.js.map +1 -0
- package/dist/_internal/markdown-links.d.ts +21 -0
- package/dist/_internal/markdown-links.d.ts.map +1 -0
- package/dist/_internal/markdown-links.js +81 -0
- package/dist/_internal/markdown-links.js.map +1 -0
- package/dist/_internal/markdown-rule.d.ts +13 -0
- package/dist/_internal/markdown-rule.d.ts.map +1 -0
- package/dist/_internal/markdown-rule.js +19 -0
- package/dist/_internal/markdown-rule.js.map +1 -0
- package/dist/_internal/repository-hooks-json.d.ts +55 -0
- package/dist/_internal/repository-hooks-json.d.ts.map +1 -0
- package/dist/_internal/repository-hooks-json.js +80 -0
- package/dist/_internal/repository-hooks-json.js.map +1 -0
- package/dist/_internal/rule-catalog.d.ts +20 -0
- package/dist/_internal/rule-catalog.d.ts.map +1 -0
- package/dist/_internal/rule-catalog.js +97 -0
- package/dist/_internal/rule-catalog.js.map +1 -0
- package/dist/_internal/rule-docs-url.d.ts +9 -0
- package/dist/_internal/rule-docs-url.d.ts.map +1 -0
- package/dist/_internal/rule-docs-url.js +9 -0
- package/dist/_internal/rule-docs-url.js.map +1 -0
- package/dist/_internal/rules-registry.d.ts +83 -0
- package/dist/_internal/rules-registry.d.ts.map +1 -0
- package/dist/_internal/rules-registry.js +145 -0
- package/dist/_internal/rules-registry.js.map +1 -0
- package/dist/_internal/skill-files.d.ts +8 -0
- package/dist/_internal/skill-files.d.ts.map +1 -0
- package/dist/_internal/skill-files.js +18 -0
- package/dist/_internal/skill-files.js.map +1 -0
- package/dist/plugin.cjs +5312 -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 +142 -0
- package/dist/plugin.js.map +1 -0
- package/dist/rules/no-blank-customization-body.d.ts +4 -0
- package/dist/rules/no-blank-customization-body.d.ts.map +1 -0
- package/dist/rules/no-blank-customization-body.js +49 -0
- package/dist/rules/no-blank-customization-body.js.map +1 -0
- package/dist/rules/no-blank-repository-instructions.d.ts +4 -0
- package/dist/rules/no-blank-repository-instructions.d.ts.map +1 -0
- package/dist/rules/no-blank-repository-instructions.js +49 -0
- package/dist/rules/no-blank-repository-instructions.js.map +1 -0
- package/dist/rules/no-blank-skill-body.d.ts +4 -0
- package/dist/rules/no-blank-skill-body.d.ts.map +1 -0
- package/dist/rules/no-blank-skill-body.js +48 -0
- package/dist/rules/no-blank-skill-body.js.map +1 -0
- package/dist/rules/no-deprecated-agent-infer.d.ts +4 -0
- package/dist/rules/no-deprecated-agent-infer.d.ts.map +1 -0
- package/dist/rules/no-deprecated-agent-infer.js +48 -0
- package/dist/rules/no-deprecated-agent-infer.js.map +1 -0
- package/dist/rules/no-duplicate-agent-names.d.ts +4 -0
- package/dist/rules/no-duplicate-agent-names.d.ts.map +1 -0
- package/dist/rules/no-duplicate-agent-names.js +72 -0
- package/dist/rules/no-duplicate-agent-names.js.map +1 -0
- package/dist/rules/no-duplicate-prompt-names.d.ts +4 -0
- package/dist/rules/no-duplicate-prompt-names.d.ts.map +1 -0
- package/dist/rules/no-duplicate-prompt-names.js +72 -0
- package/dist/rules/no-duplicate-prompt-names.js.map +1 -0
- package/dist/rules/no-duplicate-skill-names.d.ts +4 -0
- package/dist/rules/no-duplicate-skill-names.d.ts.map +1 -0
- package/dist/rules/no-duplicate-skill-names.js +74 -0
- package/dist/rules/no-duplicate-skill-names.js.map +1 -0
- package/dist/rules/no-duplicate-slash-command-names.d.ts +4 -0
- package/dist/rules/no-duplicate-slash-command-names.d.ts.map +1 -0
- package/dist/rules/no-duplicate-slash-command-names.js +82 -0
- package/dist/rules/no-duplicate-slash-command-names.js.map +1 -0
- package/dist/rules/no-empty-repository-hook-arrays.d.ts +4 -0
- package/dist/rules/no-empty-repository-hook-arrays.d.ts.map +1 -0
- package/dist/rules/no-empty-repository-hook-arrays.js +49 -0
- package/dist/rules/no-empty-repository-hook-arrays.js.map +1 -0
- package/dist/rules/no-legacy-chatmode-files.d.ts +4 -0
- package/dist/rules/no-legacy-chatmode-files.d.ts.map +1 -0
- package/dist/rules/no-legacy-chatmode-files.js +42 -0
- package/dist/rules/no-legacy-chatmode-files.js.map +1 -0
- package/dist/rules/prefer-custom-instructions-under-code-review-limit.d.ts +4 -0
- package/dist/rules/prefer-custom-instructions-under-code-review-limit.d.ts.map +1 -0
- package/dist/rules/prefer-custom-instructions-under-code-review-limit.js +52 -0
- package/dist/rules/prefer-custom-instructions-under-code-review-limit.js.map +1 -0
- package/dist/rules/prefer-fast-repository-hooks.d.ts +4 -0
- package/dist/rules/prefer-fast-repository-hooks.d.ts.map +1 -0
- package/dist/rules/prefer-fast-repository-hooks.js +58 -0
- package/dist/rules/prefer-fast-repository-hooks.js.map +1 -0
- package/dist/rules/prefer-qualified-tools.d.ts +4 -0
- package/dist/rules/prefer-qualified-tools.d.ts.map +1 -0
- package/dist/rules/prefer-qualified-tools.js +56 -0
- package/dist/rules/prefer-qualified-tools.js.map +1 -0
- package/dist/rules/require-agent-tool-for-subagents.d.ts +4 -0
- package/dist/rules/require-agent-tool-for-subagents.d.ts.map +1 -0
- package/dist/rules/require-agent-tool-for-subagents.js +64 -0
- package/dist/rules/require-agent-tool-for-subagents.js.map +1 -0
- package/dist/rules/require-agents-md-for-cross-surface-agent-instructions.d.ts +4 -0
- package/dist/rules/require-agents-md-for-cross-surface-agent-instructions.d.ts.map +1 -0
- package/dist/rules/require-agents-md-for-cross-surface-agent-instructions.js +50 -0
- package/dist/rules/require-agents-md-for-cross-surface-agent-instructions.js.map +1 -0
- package/dist/rules/require-chatmode-file-metadata.d.ts +4 -0
- package/dist/rules/require-chatmode-file-metadata.d.ts.map +1 -0
- package/dist/rules/require-chatmode-file-metadata.js +59 -0
- package/dist/rules/require-chatmode-file-metadata.js.map +1 -0
- package/dist/rules/require-existing-agent-hook-cwd.d.ts +4 -0
- package/dist/rules/require-existing-agent-hook-cwd.d.ts.map +1 -0
- package/dist/rules/require-existing-agent-hook-cwd.js +64 -0
- package/dist/rules/require-existing-agent-hook-cwd.js.map +1 -0
- package/dist/rules/require-existing-agent-mcp-servers.d.ts +4 -0
- package/dist/rules/require-existing-agent-mcp-servers.d.ts.map +1 -0
- package/dist/rules/require-existing-agent-mcp-servers.js +58 -0
- package/dist/rules/require-existing-agent-mcp-servers.js.map +1 -0
- package/dist/rules/require-existing-relative-agent-links.d.ts +4 -0
- package/dist/rules/require-existing-relative-agent-links.d.ts.map +1 -0
- package/dist/rules/require-existing-relative-agent-links.js +61 -0
- package/dist/rules/require-existing-relative-agent-links.js.map +1 -0
- package/dist/rules/require-existing-relative-instructions-links.d.ts +4 -0
- package/dist/rules/require-existing-relative-instructions-links.d.ts.map +1 -0
- package/dist/rules/require-existing-relative-instructions-links.js +61 -0
- package/dist/rules/require-existing-relative-instructions-links.js.map +1 -0
- package/dist/rules/require-existing-relative-prompt-links.d.ts +4 -0
- package/dist/rules/require-existing-relative-prompt-links.d.ts.map +1 -0
- package/dist/rules/require-existing-relative-prompt-links.js +61 -0
- package/dist/rules/require-existing-relative-prompt-links.js.map +1 -0
- package/dist/rules/require-existing-relative-skill-links.d.ts +4 -0
- package/dist/rules/require-existing-relative-skill-links.d.ts.map +1 -0
- package/dist/rules/require-existing-relative-skill-links.js +61 -0
- package/dist/rules/require-existing-relative-skill-links.js.map +1 -0
- package/dist/rules/require-existing-repository-hook-cwd.d.ts +4 -0
- package/dist/rules/require-existing-repository-hook-cwd.d.ts.map +1 -0
- package/dist/rules/require-existing-repository-hook-cwd.js +65 -0
- package/dist/rules/require-existing-repository-hook-cwd.js.map +1 -0
- package/dist/rules/require-github-copilot-target-for-mcp-servers.d.ts +4 -0
- package/dist/rules/require-github-copilot-target-for-mcp-servers.d.ts.map +1 -0
- package/dist/rules/require-github-copilot-target-for-mcp-servers.js +63 -0
- package/dist/rules/require-github-copilot-target-for-mcp-servers.js.map +1 -0
- package/dist/rules/require-instructions-apply-to.d.ts +4 -0
- package/dist/rules/require-instructions-apply-to.d.ts.map +1 -0
- package/dist/rules/require-instructions-apply-to.js +60 -0
- package/dist/rules/require-instructions-apply-to.js.map +1 -0
- package/dist/rules/require-json-agent-mcp-servers.d.ts +4 -0
- package/dist/rules/require-json-agent-mcp-servers.d.ts.map +1 -0
- package/dist/rules/require-json-agent-mcp-servers.js +58 -0
- package/dist/rules/require-json-agent-mcp-servers.js.map +1 -0
- package/dist/rules/require-prompt-file-metadata.d.ts +4 -0
- package/dist/rules/require-prompt-file-metadata.d.ts.map +1 -0
- package/dist/rules/require-prompt-file-metadata.js +104 -0
- package/dist/rules/require-prompt-file-metadata.js.map +1 -0
- package/dist/rules/require-qualified-agent-handoff-models.d.ts +4 -0
- package/dist/rules/require-qualified-agent-handoff-models.d.ts.map +1 -0
- package/dist/rules/require-qualified-agent-handoff-models.js +78 -0
- package/dist/rules/require-qualified-agent-handoff-models.js.map +1 -0
- package/dist/rules/require-relative-agent-hook-cwd.d.ts +4 -0
- package/dist/rules/require-relative-agent-hook-cwd.d.ts.map +1 -0
- package/dist/rules/require-relative-agent-hook-cwd.js +70 -0
- package/dist/rules/require-relative-agent-hook-cwd.js.map +1 -0
- package/dist/rules/require-relative-agent-links.d.ts +4 -0
- package/dist/rules/require-relative-agent-links.d.ts.map +1 -0
- package/dist/rules/require-relative-agent-links.js +58 -0
- package/dist/rules/require-relative-agent-links.js.map +1 -0
- package/dist/rules/require-relative-instructions-links.d.ts +4 -0
- package/dist/rules/require-relative-instructions-links.d.ts.map +1 -0
- package/dist/rules/require-relative-instructions-links.js +58 -0
- package/dist/rules/require-relative-instructions-links.js.map +1 -0
- package/dist/rules/require-relative-prompt-links.d.ts +4 -0
- package/dist/rules/require-relative-prompt-links.d.ts.map +1 -0
- package/dist/rules/require-relative-prompt-links.js +82 -0
- package/dist/rules/require-relative-prompt-links.js.map +1 -0
- package/dist/rules/require-relative-repository-hook-cwd.d.ts +4 -0
- package/dist/rules/require-relative-repository-hook-cwd.d.ts.map +1 -0
- package/dist/rules/require-relative-repository-hook-cwd.js +63 -0
- package/dist/rules/require-relative-repository-hook-cwd.js.map +1 -0
- package/dist/rules/require-relative-skill-links.d.ts +4 -0
- package/dist/rules/require-relative-skill-links.d.ts.map +1 -0
- package/dist/rules/require-relative-skill-links.js +58 -0
- package/dist/rules/require-relative-skill-links.js.map +1 -0
- package/dist/rules/require-repository-hook-arrays.d.ts +4 -0
- package/dist/rules/require-repository-hook-arrays.d.ts.map +1 -0
- package/dist/rules/require-repository-hook-arrays.js +54 -0
- package/dist/rules/require-repository-hook-arrays.js.map +1 -0
- package/dist/rules/require-repository-hook-command-shell.d.ts +4 -0
- package/dist/rules/require-repository-hook-command-shell.d.ts.map +1 -0
- package/dist/rules/require-repository-hook-command-shell.js +57 -0
- package/dist/rules/require-repository-hook-command-shell.js.map +1 -0
- package/dist/rules/require-repository-hooks-object.d.ts +4 -0
- package/dist/rules/require-repository-hooks-object.d.ts.map +1 -0
- package/dist/rules/require-repository-hooks-object.js +50 -0
- package/dist/rules/require-repository-hooks-object.js.map +1 -0
- package/dist/rules/require-repository-instructions-file.d.ts +4 -0
- package/dist/rules/require-repository-instructions-file.d.ts.map +1 -0
- package/dist/rules/require-repository-instructions-file.js +50 -0
- package/dist/rules/require-repository-instructions-file.js.map +1 -0
- package/dist/rules/require-skill-file-location.d.ts +4 -0
- package/dist/rules/require-skill-file-location.d.ts.map +1 -0
- package/dist/rules/require-skill-file-location.js +46 -0
- package/dist/rules/require-skill-file-location.js.map +1 -0
- package/dist/rules/require-skill-file-metadata.d.ts +4 -0
- package/dist/rules/require-skill-file-metadata.d.ts.map +1 -0
- package/dist/rules/require-skill-file-metadata.js +60 -0
- package/dist/rules/require-skill-file-metadata.js.map +1 -0
- package/dist/rules/require-skill-md-filename.d.ts +4 -0
- package/dist/rules/require-skill-md-filename.d.ts.map +1 -0
- package/dist/rules/require-skill-md-filename.js +55 -0
- package/dist/rules/require-skill-md-filename.js.map +1 -0
- package/dist/rules/require-skill-name-match-directory.d.ts +4 -0
- package/dist/rules/require-skill-name-match-directory.d.ts.map +1 -0
- package/dist/rules/require-skill-name-match-directory.js +59 -0
- package/dist/rules/require-skill-name-match-directory.js.map +1 -0
- package/dist/rules/require-string-repository-hook-env-values.d.ts +4 -0
- package/dist/rules/require-string-repository-hook-env-values.d.ts.map +1 -0
- package/dist/rules/require-string-repository-hook-env-values.js +59 -0
- package/dist/rules/require-string-repository-hook-env-values.js.map +1 -0
- package/dist/rules/require-valid-agent-argument-hint.d.ts +4 -0
- package/dist/rules/require-valid-agent-argument-hint.d.ts.map +1 -0
- package/dist/rules/require-valid-agent-argument-hint.js +51 -0
- package/dist/rules/require-valid-agent-argument-hint.js.map +1 -0
- package/dist/rules/require-valid-agent-handoff-send.d.ts +4 -0
- package/dist/rules/require-valid-agent-handoff-send.d.ts.map +1 -0
- package/dist/rules/require-valid-agent-handoff-send.js +67 -0
- package/dist/rules/require-valid-agent-handoff-send.js.map +1 -0
- package/dist/rules/require-valid-agent-handoffs.d.ts +4 -0
- package/dist/rules/require-valid-agent-handoffs.d.ts.map +1 -0
- package/dist/rules/require-valid-agent-handoffs.js +78 -0
- package/dist/rules/require-valid-agent-handoffs.js.map +1 -0
- package/dist/rules/require-valid-agent-hook-events.d.ts +4 -0
- package/dist/rules/require-valid-agent-hook-events.d.ts.map +1 -0
- package/dist/rules/require-valid-agent-hook-events.js +68 -0
- package/dist/rules/require-valid-agent-hook-events.js.map +1 -0
- package/dist/rules/require-valid-agent-hook-timeouts.d.ts +4 -0
- package/dist/rules/require-valid-agent-hook-timeouts.d.ts.map +1 -0
- package/dist/rules/require-valid-agent-hook-timeouts.js +83 -0
- package/dist/rules/require-valid-agent-hook-timeouts.js.map +1 -0
- package/dist/rules/require-valid-agent-hooks.d.ts +4 -0
- package/dist/rules/require-valid-agent-hooks.d.ts.map +1 -0
- package/dist/rules/require-valid-agent-hooks.js +86 -0
- package/dist/rules/require-valid-agent-hooks.js.map +1 -0
- package/dist/rules/require-valid-agent-invocation-controls.d.ts +4 -0
- package/dist/rules/require-valid-agent-invocation-controls.d.ts.map +1 -0
- package/dist/rules/require-valid-agent-invocation-controls.js +71 -0
- package/dist/rules/require-valid-agent-invocation-controls.js.map +1 -0
- package/dist/rules/require-valid-agent-mcp-servers.d.ts +4 -0
- package/dist/rules/require-valid-agent-mcp-servers.d.ts.map +1 -0
- package/dist/rules/require-valid-agent-mcp-servers.js +64 -0
- package/dist/rules/require-valid-agent-mcp-servers.js.map +1 -0
- package/dist/rules/require-valid-agent-model.d.ts +4 -0
- package/dist/rules/require-valid-agent-model.d.ts.map +1 -0
- package/dist/rules/require-valid-agent-model.js +64 -0
- package/dist/rules/require-valid-agent-model.js.map +1 -0
- package/dist/rules/require-valid-agent-name.d.ts +4 -0
- package/dist/rules/require-valid-agent-name.d.ts.map +1 -0
- package/dist/rules/require-valid-agent-name.js +51 -0
- package/dist/rules/require-valid-agent-name.js.map +1 -0
- package/dist/rules/require-valid-agent-subagents.d.ts +4 -0
- package/dist/rules/require-valid-agent-subagents.d.ts.map +1 -0
- package/dist/rules/require-valid-agent-subagents.js +79 -0
- package/dist/rules/require-valid-agent-subagents.js.map +1 -0
- package/dist/rules/require-valid-agent-target.d.ts +4 -0
- package/dist/rules/require-valid-agent-target.d.ts.map +1 -0
- package/dist/rules/require-valid-agent-target.js +62 -0
- package/dist/rules/require-valid-agent-target.js.map +1 -0
- package/dist/rules/require-valid-agent-tools.d.ts +4 -0
- package/dist/rules/require-valid-agent-tools.d.ts.map +1 -0
- package/dist/rules/require-valid-agent-tools.js +64 -0
- package/dist/rules/require-valid-agent-tools.js.map +1 -0
- package/dist/rules/require-valid-instructions-apply-to-globs.d.ts +4 -0
- package/dist/rules/require-valid-instructions-apply-to-globs.d.ts.map +1 -0
- package/dist/rules/require-valid-instructions-apply-to-globs.js +79 -0
- package/dist/rules/require-valid-instructions-apply-to-globs.js.map +1 -0
- package/dist/rules/require-valid-prompt-argument-hint.d.ts +4 -0
- package/dist/rules/require-valid-prompt-argument-hint.d.ts.map +1 -0
- package/dist/rules/require-valid-prompt-argument-hint.js +52 -0
- package/dist/rules/require-valid-prompt-argument-hint.js.map +1 -0
- package/dist/rules/require-valid-prompt-model.d.ts +4 -0
- package/dist/rules/require-valid-prompt-model.d.ts.map +1 -0
- package/dist/rules/require-valid-prompt-model.js +77 -0
- package/dist/rules/require-valid-prompt-model.js.map +1 -0
- package/dist/rules/require-valid-prompt-name.d.ts +4 -0
- package/dist/rules/require-valid-prompt-name.d.ts.map +1 -0
- package/dist/rules/require-valid-prompt-name.js +51 -0
- package/dist/rules/require-valid-prompt-name.js.map +1 -0
- package/dist/rules/require-valid-prompt-tools.d.ts +4 -0
- package/dist/rules/require-valid-prompt-tools.d.ts.map +1 -0
- package/dist/rules/require-valid-prompt-tools.js +64 -0
- package/dist/rules/require-valid-prompt-tools.js.map +1 -0
- package/dist/rules/require-valid-repository-hook-command-type.d.ts +4 -0
- package/dist/rules/require-valid-repository-hook-command-type.d.ts.map +1 -0
- package/dist/rules/require-valid-repository-hook-command-type.js +58 -0
- package/dist/rules/require-valid-repository-hook-command-type.js.map +1 -0
- package/dist/rules/require-valid-repository-hook-env.d.ts +4 -0
- package/dist/rules/require-valid-repository-hook-env.d.ts.map +1 -0
- package/dist/rules/require-valid-repository-hook-env.js +57 -0
- package/dist/rules/require-valid-repository-hook-env.js.map +1 -0
- package/dist/rules/require-valid-repository-hook-events.d.ts +4 -0
- package/dist/rules/require-valid-repository-hook-events.d.ts.map +1 -0
- package/dist/rules/require-valid-repository-hook-events.js +55 -0
- package/dist/rules/require-valid-repository-hook-events.js.map +1 -0
- package/dist/rules/require-valid-repository-hook-timeouts.d.ts +4 -0
- package/dist/rules/require-valid-repository-hook-timeouts.d.ts.map +1 -0
- package/dist/rules/require-valid-repository-hook-timeouts.js +59 -0
- package/dist/rules/require-valid-repository-hook-timeouts.js.map +1 -0
- package/dist/rules/require-valid-repository-hook-version.d.ts +4 -0
- package/dist/rules/require-valid-repository-hook-version.d.ts.map +1 -0
- package/dist/rules/require-valid-repository-hook-version.js +53 -0
- package/dist/rules/require-valid-repository-hook-version.js.map +1 -0
- package/dist/rules/require-valid-skill-directory-name.d.ts +4 -0
- package/dist/rules/require-valid-skill-directory-name.d.ts.map +1 -0
- package/dist/rules/require-valid-skill-directory-name.js +50 -0
- package/dist/rules/require-valid-skill-directory-name.js.map +1 -0
- package/dist/rules/require-valid-skill-license.d.ts +4 -0
- package/dist/rules/require-valid-skill-license.d.ts.map +1 -0
- package/dist/rules/require-valid-skill-license.js +47 -0
- package/dist/rules/require-valid-skill-license.js.map +1 -0
- package/dist/rules/require-valid-skill-name.d.ts +4 -0
- package/dist/rules/require-valid-skill-name.d.ts.map +1 -0
- package/dist/rules/require-valid-skill-name.js +57 -0
- package/dist/rules/require-valid-skill-name.js.map +1 -0
- package/docs/rules/getting-started.md +24 -0
- package/docs/rules/guides/copilot-customization-files.md +17 -0
- package/docs/rules/no-blank-customization-body.md +52 -0
- package/docs/rules/no-blank-repository-instructions.md +37 -0
- package/docs/rules/no-blank-skill-body.md +41 -0
- package/docs/rules/no-deprecated-agent-infer.md +42 -0
- package/docs/rules/no-duplicate-agent-names.md +36 -0
- package/docs/rules/no-duplicate-prompt-names.md +36 -0
- package/docs/rules/no-duplicate-skill-names.md +37 -0
- package/docs/rules/no-duplicate-slash-command-names.md +40 -0
- package/docs/rules/no-empty-repository-hook-arrays.md +44 -0
- package/docs/rules/no-legacy-chatmode-files.md +53 -0
- package/docs/rules/overview.md +27 -0
- package/docs/rules/prefer-custom-instructions-under-code-review-limit.md +39 -0
- package/docs/rules/prefer-fast-repository-hooks.md +43 -0
- package/docs/rules/prefer-qualified-tools.md +49 -0
- package/docs/rules/presets/all.md +82 -0
- package/docs/rules/presets/index.md +78 -0
- package/docs/rules/presets/minimal.md +16 -0
- package/docs/rules/presets/recommended.md +67 -0
- package/docs/rules/presets/strict.md +81 -0
- package/docs/rules/require-agent-tool-for-subagents.md +44 -0
- package/docs/rules/require-agents-md-for-cross-surface-agent-instructions.md +39 -0
- package/docs/rules/require-chatmode-file-metadata.md +41 -0
- package/docs/rules/require-existing-agent-hook-cwd.md +51 -0
- package/docs/rules/require-existing-agent-mcp-servers.md +43 -0
- package/docs/rules/require-existing-relative-agent-links.md +41 -0
- package/docs/rules/require-existing-relative-instructions-links.md +43 -0
- package/docs/rules/require-existing-relative-prompt-links.md +41 -0
- package/docs/rules/require-existing-relative-skill-links.md +44 -0
- package/docs/rules/require-existing-repository-hook-cwd.md +45 -0
- package/docs/rules/require-github-copilot-target-for-mcp-servers.md +46 -0
- package/docs/rules/require-instructions-apply-to.md +40 -0
- package/docs/rules/require-json-agent-mcp-servers.md +41 -0
- package/docs/rules/require-prompt-file-metadata.md +45 -0
- package/docs/rules/require-qualified-agent-handoff-models.md +47 -0
- package/docs/rules/require-relative-agent-hook-cwd.md +50 -0
- package/docs/rules/require-relative-agent-links.md +40 -0
- package/docs/rules/require-relative-instructions-links.md +42 -0
- package/docs/rules/require-relative-prompt-links.md +43 -0
- package/docs/rules/require-relative-repository-hook-cwd.md +43 -0
- package/docs/rules/require-relative-skill-links.md +42 -0
- package/docs/rules/require-repository-hook-arrays.md +33 -0
- package/docs/rules/require-repository-hook-command-shell.md +44 -0
- package/docs/rules/require-repository-hooks-object.md +34 -0
- package/docs/rules/require-repository-instructions-file.md +42 -0
- package/docs/rules/require-skill-file-location.md +33 -0
- package/docs/rules/require-skill-file-metadata.md +40 -0
- package/docs/rules/require-skill-md-filename.md +43 -0
- package/docs/rules/require-skill-name-match-directory.md +46 -0
- package/docs/rules/require-string-repository-hook-env-values.md +43 -0
- package/docs/rules/require-valid-agent-argument-hint.md +42 -0
- package/docs/rules/require-valid-agent-handoff-send.md +49 -0
- package/docs/rules/require-valid-agent-handoffs.md +51 -0
- package/docs/rules/require-valid-agent-hook-events.md +47 -0
- package/docs/rules/require-valid-agent-hook-timeouts.md +49 -0
- package/docs/rules/require-valid-agent-hooks.md +49 -0
- package/docs/rules/require-valid-agent-invocation-controls.md +45 -0
- package/docs/rules/require-valid-agent-mcp-servers.md +45 -0
- package/docs/rules/require-valid-agent-model.md +43 -0
- package/docs/rules/require-valid-agent-name.md +42 -0
- package/docs/rules/require-valid-agent-subagents.md +52 -0
- package/docs/rules/require-valid-agent-target.md +44 -0
- package/docs/rules/require-valid-agent-tools.md +43 -0
- package/docs/rules/require-valid-instructions-apply-to-globs.md +45 -0
- package/docs/rules/require-valid-prompt-argument-hint.md +42 -0
- package/docs/rules/require-valid-prompt-model.md +45 -0
- package/docs/rules/require-valid-prompt-name.md +42 -0
- package/docs/rules/require-valid-prompt-tools.md +43 -0
- package/docs/rules/require-valid-repository-hook-command-type.md +45 -0
- package/docs/rules/require-valid-repository-hook-env.md +43 -0
- package/docs/rules/require-valid-repository-hook-events.md +34 -0
- package/docs/rules/require-valid-repository-hook-timeouts.md +43 -0
- package/docs/rules/require-valid-repository-hook-version.md +34 -0
- package/docs/rules/require-valid-skill-directory-name.md +34 -0
- package/docs/rules/require-valid-skill-license.md +45 -0
- package/docs/rules/require-valid-skill-name.md +43 -0
- package/package.json +562 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"require-valid-skill-name.js","sourceRoot":"","sources":["../../src/rules/require-valid-skill-name.ts"],"names":[],"mappings":"AAEA,OAAO,EACH,YAAY,EACZ,sBAAsB,GACzB,MAAM,6CAA6C,CAAC;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AACpE;;;GAGG;AACH,OAAO,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAC;AACxE,OAAO,EACH,kBAAkB,EAClB,oBAAoB,EACpB,mBAAmB,GACtB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACH,8BAA8B,EAC9B,qBAAqB,GACxB,MAAM,+BAA+B,CAAC;AAEvC,MAAM,yBAAyB,GAAsB,iBAAiB,CAAC;IACnE,MAAM,CAAC,OAAO;QACV,OAAO,8BAA8B,CAAC,GAAG,EAAE;YACvC,IAAI,CAAC,eAAe,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAC;gBACrC,OAAO;YACX,CAAC;YAED,MAAM,WAAW,GAAG,kBAAkB,CAAC,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;YAEhE,IACI,WAAW,KAAK,IAAI;gBACpB,CAAC,mBAAmB,CAAC,WAAW,EAAE,MAAM,CAAC,EAC3C,CAAC;gBACC,OAAO;YACX,CAAC;YAED,MAAM,SAAS,GAAG,oBAAoB,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC;YAE5D,IACI,SAAS,KAAK,SAAS;gBACvB,sBAAsB,CAClB,YAAY,CAAC,OAAO,CAAC,QAAQ,EAAE,WAAW,CAAC,CAC9C,EACH,CAAC;gBACC,OAAO;YACX,CAAC;YAED,qBAAqB,CAAC,OAAO,EAAE;gBAC3B,IAAI,EAAE;oBACF,IAAI,EAAE,SAAS,IAAI,SAAS;iBAC/B;gBACD,SAAS,EAAE,kBAAkB;aAChC,CAAC,CAAC;QACP,CAAC,CAAC,CAAC;IACP,CAAC;IACD,cAAc,EAAE,EAAE;IAClB,IAAI,EAAE;QACF,UAAU,EAAE,KAAK;QACjB,IAAI,EAAE;YACF,cAAc,EAAE;gBACZ,6BAA6B;gBAC7B,wBAAwB;gBACxB,qBAAqB;aACxB;YACD,WAAW,EACP,+FAA+F;YACnG,MAAM,EAAE,KAAK;YACb,WAAW,EAAE,IAAI;YACjB,oBAAoB,EAAE,KAAK;SAC9B;QACD,QAAQ,EAAE;YACN,gBAAgB,EACZ,+GAA+G;SACtH;QACD,MAAM,EAAE,EAAE;QACV,IAAI,EAAE,SAAS;KAClB;IACD,IAAI,EAAE,0BAA0B;CACnC,CAAC,CAAC;AAEH,eAAe,yBAAyB,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Getting started
|
|
2
|
+
|
|
3
|
+
`eslint-plugin-copilot` helps teams lint GitHub Copilot customization files in a repository-friendly way.
|
|
4
|
+
|
|
5
|
+
## Supported file types
|
|
6
|
+
|
|
7
|
+
- repository-wide instructions: `.github/copilot-instructions.md`
|
|
8
|
+
- path-specific instructions: `.github/instructions/**/*.instructions.md`
|
|
9
|
+
- reusable prompts: `.github/prompts/**/*.prompt.md`
|
|
10
|
+
- custom agents: `.github/agents/**/*.agent.md`
|
|
11
|
+
- legacy chat modes: `.github/chatmodes/**/*.chatmode.md`
|
|
12
|
+
- skill definitions and supporting Markdown: `.github/skills/**/*.md`, `.claude/skills/**/*.md`
|
|
13
|
+
- agent instruction files: `AGENTS.md`, `CLAUDE.md`, `GEMINI.md`
|
|
14
|
+
- repository hook configs: `.github/hooks/**/*.json`
|
|
15
|
+
|
|
16
|
+
## Basic setup
|
|
17
|
+
|
|
18
|
+
```js
|
|
19
|
+
import copilot from "eslint-plugin-copilot";
|
|
20
|
+
|
|
21
|
+
export default [...copilot.configs.recommended];
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
The preset already configures Markdown support for Copilot content files, JSON support for repository hooks, and the documented file globs for supported Copilot customization assets.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Copilot customization files
|
|
2
|
+
|
|
3
|
+
GitHub Copilot repository customization spans these markdown-first surfaces:
|
|
4
|
+
|
|
5
|
+
- repository instructions
|
|
6
|
+
- path-specific instructions
|
|
7
|
+
- prompt files
|
|
8
|
+
- custom agents
|
|
9
|
+
- legacy chat modes
|
|
10
|
+
- agent instruction files
|
|
11
|
+
- skill definition files
|
|
12
|
+
|
|
13
|
+
It also includes repository hook configuration files under `.github/hooks/*.json`.
|
|
14
|
+
|
|
15
|
+
This plugin intentionally keeps its first rule set focused on structural correctness and metadata quality for those files.
|
|
16
|
+
|
|
17
|
+
That includes modern custom-agent details such as deprecated frontmatter cleanup, subagent/tool wiring checks, valid subagent allow-list metadata, valid invocation-control flags, valid target values, valid `tools` list metadata, valid `mcp-servers` list metadata, handoff metadata integrity, valid handoff send values, qualified handoff model names, valid model override metadata, valid agent-scoped hook commands, supported hook event names, numeric hook timeouts, repository-relative hook working directories, GitHub-target-specific agent metadata, prompt-body relative-link checks, valid prompt-model metadata, prompt and agent naming hygiene, skill location and frontmatter requirements, skill naming and link rules, repository hook JSON schema validation, repository hook path and environment checks, body-content quality checks, and migration guidance away from legacy chatmode files, not just basic required metadata.
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# no-blank-customization-body
|
|
2
|
+
|
|
3
|
+
Disallow blank bodies in Copilot customization files other than repository-wide instructions.
|
|
4
|
+
|
|
5
|
+
> **Rule catalog ID:** R009
|
|
6
|
+
|
|
7
|
+
## Targeted pattern scope
|
|
8
|
+
|
|
9
|
+
- `.github/instructions/**/*.instructions.md`
|
|
10
|
+
- `.github/prompts/**/*.prompt.md`
|
|
11
|
+
- `.github/agents/**/*.agent.md`
|
|
12
|
+
- `.github/chatmodes/**/*.chatmode.md`
|
|
13
|
+
- `AGENTS.md`
|
|
14
|
+
- `CLAUDE.md`
|
|
15
|
+
- `GEMINI.md`
|
|
16
|
+
|
|
17
|
+
## What this rule reports
|
|
18
|
+
|
|
19
|
+
- Copilot customization files whose body is empty after ignoring frontmatter, whitespace, and HTML comments
|
|
20
|
+
- files that only contain metadata without any meaningful Markdown instructions in the document body
|
|
21
|
+
|
|
22
|
+
## Why this rule exists
|
|
23
|
+
|
|
24
|
+
Copilot customization files are instruction surfaces. A prompt, custom agent, or path-specific instructions file that only contains frontmatter does not give Copilot any actual guidance to apply. This rule catches metadata-only files before they silently become ineffective customization points.
|
|
25
|
+
|
|
26
|
+
Repository-wide `.github/copilot-instructions.md` is intentionally excluded because it already has a dedicated blank-content rule.
|
|
27
|
+
|
|
28
|
+
## ❌ Incorrect
|
|
29
|
+
|
|
30
|
+
```md
|
|
31
|
+
---
|
|
32
|
+
description: Review the repository
|
|
33
|
+
agent: ask
|
|
34
|
+
---
|
|
35
|
+
<!-- no actual prompt body -->
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## ✅ Correct
|
|
39
|
+
|
|
40
|
+
```md
|
|
41
|
+
---
|
|
42
|
+
description: Review the repository
|
|
43
|
+
agent: ask
|
|
44
|
+
---
|
|
45
|
+
Review the repository for configuration drift and summarize the biggest risks first.
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## Further reading
|
|
49
|
+
|
|
50
|
+
- [VS Code Docs: Prompt files](https://code.visualstudio.com/docs/copilot/customization/prompt-files)
|
|
51
|
+
- [VS Code Docs: Custom agents](https://code.visualstudio.com/docs/copilot/customization/custom-agents)
|
|
52
|
+
- [VS Code Docs: Custom instructions](https://code.visualstudio.com/docs/copilot/customization/custom-instructions)
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# no-blank-repository-instructions
|
|
2
|
+
|
|
3
|
+
Disallow empty repository-wide Copilot instructions files.
|
|
4
|
+
|
|
5
|
+
> **Rule catalog ID:** R004
|
|
6
|
+
|
|
7
|
+
## Targeted pattern scope
|
|
8
|
+
|
|
9
|
+
- `.github/copilot-instructions.md`
|
|
10
|
+
|
|
11
|
+
## What this rule reports
|
|
12
|
+
|
|
13
|
+
- repository-wide instructions files whose visible body content is blank after trimming comments and whitespace
|
|
14
|
+
|
|
15
|
+
## Why this rule exists
|
|
16
|
+
|
|
17
|
+
GitHub Copilot repository instructions are the baseline customization surface for a repository. An empty `.github/copilot-instructions.md` file communicates intent to customize Copilot, but it provides no usable guidance.
|
|
18
|
+
|
|
19
|
+
## ❌ Incorrect
|
|
20
|
+
|
|
21
|
+
```md
|
|
22
|
+
<!-- placeholder -->
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## ✅ Correct
|
|
26
|
+
|
|
27
|
+
```md
|
|
28
|
+
# Repository guidance
|
|
29
|
+
|
|
30
|
+
- Prefer Flat Config for ESLint.
|
|
31
|
+
- Run `npm test` before proposing changes.
|
|
32
|
+
- Keep prompt files in `.github/prompts/` and path-specific instructions in `.github/instructions/`.
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Further reading
|
|
36
|
+
|
|
37
|
+
- [GitHub Docs: Add repository custom instructions for GitHub Copilot](https://docs.github.com/en/copilot/how-tos/configure-custom-instructions/add-repository-instructions)
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# no-blank-skill-body
|
|
2
|
+
|
|
3
|
+
Disallow blank Copilot skill definition bodies.
|
|
4
|
+
|
|
5
|
+
> **Rule catalog ID:** R047
|
|
6
|
+
|
|
7
|
+
## Targeted pattern scope
|
|
8
|
+
|
|
9
|
+
- `.github/skills/**/SKILL.md`
|
|
10
|
+
- `.claude/skills/**/SKILL.md`
|
|
11
|
+
|
|
12
|
+
## What this rule reports
|
|
13
|
+
|
|
14
|
+
- skill files whose Markdown body is empty after frontmatter
|
|
15
|
+
|
|
16
|
+
## Why this rule exists
|
|
17
|
+
|
|
18
|
+
A skill without any instructions, examples, or guidance provides almost no value. The frontmatter can identify the skill, but the body is where the actual reusable task knowledge lives.
|
|
19
|
+
|
|
20
|
+
## ❌ Incorrect
|
|
21
|
+
|
|
22
|
+
```md
|
|
23
|
+
---
|
|
24
|
+
name: review-checklist
|
|
25
|
+
description: Review code changes with the repository checklist.
|
|
26
|
+
---
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## ✅ Correct
|
|
30
|
+
|
|
31
|
+
```md
|
|
32
|
+
---
|
|
33
|
+
name: review-checklist
|
|
34
|
+
description: Review code changes with the repository checklist.
|
|
35
|
+
---
|
|
36
|
+
Follow the review checklist, call out risk areas, and summarize required follow-up work.
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Further reading
|
|
40
|
+
|
|
41
|
+
- [GitHub Docs: About agent skills](https://docs.github.com/en/copilot/concepts/agents/about-agent-skills)
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# no-deprecated-agent-infer
|
|
2
|
+
|
|
3
|
+
Disallow deprecated `infer` frontmatter in Copilot custom agent files.
|
|
4
|
+
|
|
5
|
+
> **Rule catalog ID:** R007
|
|
6
|
+
|
|
7
|
+
## Targeted pattern scope
|
|
8
|
+
|
|
9
|
+
- `.github/agents/**/*.agent.md`
|
|
10
|
+
|
|
11
|
+
## What this rule reports
|
|
12
|
+
|
|
13
|
+
- custom agent files that still declare deprecated `infer` frontmatter
|
|
14
|
+
|
|
15
|
+
## Why this rule exists
|
|
16
|
+
|
|
17
|
+
VS Code custom agents now use `user-invocable` and `disable-model-invocation` for picker visibility and subagent invocation control. Keeping deprecated `infer` metadata around makes agent behavior less explicit and drifts away from the current contract.
|
|
18
|
+
|
|
19
|
+
## ❌ Incorrect
|
|
20
|
+
|
|
21
|
+
```md
|
|
22
|
+
---
|
|
23
|
+
description: Hidden implementation helper
|
|
24
|
+
infer: false
|
|
25
|
+
---
|
|
26
|
+
Implement changes based on the approved plan.
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## ✅ Correct
|
|
30
|
+
|
|
31
|
+
```md
|
|
32
|
+
---
|
|
33
|
+
description: Hidden implementation helper
|
|
34
|
+
user-invocable: false
|
|
35
|
+
disable-model-invocation: false
|
|
36
|
+
---
|
|
37
|
+
Implement changes based on the approved plan.
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
## Further reading
|
|
41
|
+
|
|
42
|
+
- [VS Code Docs: Custom agents](https://code.visualstudio.com/docs/copilot/customization/custom-agents)
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# no-duplicate-agent-names
|
|
2
|
+
|
|
3
|
+
Disallow duplicate effective custom-agent names across workspace custom-agent files.
|
|
4
|
+
|
|
5
|
+
> **Rule catalog ID:** R039
|
|
6
|
+
|
|
7
|
+
## Targeted pattern scope
|
|
8
|
+
|
|
9
|
+
- `.github/agents/**/*.agent.md`
|
|
10
|
+
|
|
11
|
+
## What this rule reports
|
|
12
|
+
|
|
13
|
+
- agent files whose effective `name` collides with another agent file in `.github/agents`
|
|
14
|
+
- collisions involving explicit `name` frontmatter and filename-derived default names
|
|
15
|
+
|
|
16
|
+
## Why this rule exists
|
|
17
|
+
|
|
18
|
+
Custom agents are easier to select and reason about when each one has a unique effective name. Duplicate names make agent routing and documentation more confusing than necessary.
|
|
19
|
+
|
|
20
|
+
## ❌ Incorrect
|
|
21
|
+
|
|
22
|
+
```text
|
|
23
|
+
.github/agents/reviewer.agent.md
|
|
24
|
+
.github/agents/other.agent.md # with frontmatter: name: reviewer
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## ✅ Correct
|
|
28
|
+
|
|
29
|
+
```text
|
|
30
|
+
.github/agents/reviewer.agent.md
|
|
31
|
+
.github/agents/other.agent.md # with frontmatter: name: reviewer-security
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Further reading
|
|
35
|
+
|
|
36
|
+
- [VS Code Docs: Custom agents](https://code.visualstudio.com/docs/copilot/customization/custom-agents)
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# no-duplicate-prompt-names
|
|
2
|
+
|
|
3
|
+
Disallow duplicate effective prompt names across workspace prompt files.
|
|
4
|
+
|
|
5
|
+
> **Rule catalog ID:** R038
|
|
6
|
+
|
|
7
|
+
## Targeted pattern scope
|
|
8
|
+
|
|
9
|
+
- `.github/prompts/**/*.prompt.md`
|
|
10
|
+
|
|
11
|
+
## What this rule reports
|
|
12
|
+
|
|
13
|
+
- prompt files whose effective `name` collides with another prompt file in `.github/prompts`
|
|
14
|
+
- collisions involving explicit `name` frontmatter and filename-derived default names
|
|
15
|
+
|
|
16
|
+
## Why this rule exists
|
|
17
|
+
|
|
18
|
+
Prompt files share a slash-command namespace. Duplicate effective names make it ambiguous which prompt a caller intends to invoke and can create hard-to-diagnose behavior differences across tools.
|
|
19
|
+
|
|
20
|
+
## ❌ Incorrect
|
|
21
|
+
|
|
22
|
+
```text
|
|
23
|
+
.github/prompts/review.prompt.md
|
|
24
|
+
.github/prompts/other.prompt.md # with frontmatter: name: review
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## ✅ Correct
|
|
28
|
+
|
|
29
|
+
```text
|
|
30
|
+
.github/prompts/review.prompt.md
|
|
31
|
+
.github/prompts/other.prompt.md # with frontmatter: name: review-security
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Further reading
|
|
35
|
+
|
|
36
|
+
- [VS Code Docs: Prompt files](https://code.visualstudio.com/docs/copilot/customization/prompt-files)
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# no-duplicate-skill-names
|
|
2
|
+
|
|
3
|
+
Disallow duplicate effective skill names across project skill definition files.
|
|
4
|
+
|
|
5
|
+
> **Rule catalog ID:** R054
|
|
6
|
+
|
|
7
|
+
## Targeted pattern scope
|
|
8
|
+
|
|
9
|
+
- `.github/skills/**/SKILL.md`
|
|
10
|
+
- `.claude/skills/**/SKILL.md`
|
|
11
|
+
|
|
12
|
+
## What this rule reports
|
|
13
|
+
|
|
14
|
+
- skill definitions with duplicate effective names across `.github/skills` and `.claude/skills`
|
|
15
|
+
- collisions involving explicit frontmatter names and directory-derived default names
|
|
16
|
+
|
|
17
|
+
## Why this rule exists
|
|
18
|
+
|
|
19
|
+
Duplicate skill names make it harder to understand which skill a repository intends to expose for a given task. Keeping skill names unique also avoids confusion when skills are documented or referenced externally.
|
|
20
|
+
|
|
21
|
+
## ❌ Incorrect
|
|
22
|
+
|
|
23
|
+
```text
|
|
24
|
+
.github/skills/review/SKILL.md
|
|
25
|
+
.claude/skills/review-clone/SKILL.md # with frontmatter: name: review
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## ✅ Correct
|
|
29
|
+
|
|
30
|
+
```text
|
|
31
|
+
.github/skills/review/SKILL.md
|
|
32
|
+
.claude/skills/review-clone/SKILL.md # with frontmatter: name: review-clone
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Further reading
|
|
36
|
+
|
|
37
|
+
- [GitHub Docs: About agent skills](https://docs.github.com/en/copilot/concepts/agents/about-agent-skills)
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# no-duplicate-slash-command-names
|
|
2
|
+
|
|
3
|
+
Disallow duplicate slash-command names across prompt files and skills.
|
|
4
|
+
|
|
5
|
+
> **Rule catalog ID:** R069
|
|
6
|
+
|
|
7
|
+
## Targeted pattern scope
|
|
8
|
+
|
|
9
|
+
- `.github/prompts/**/*.prompt.md`
|
|
10
|
+
- `.github/skills/**/SKILL.md`
|
|
11
|
+
- `.claude/skills/**/SKILL.md`
|
|
12
|
+
|
|
13
|
+
## What this rule reports
|
|
14
|
+
|
|
15
|
+
- prompt names that collide with skill names
|
|
16
|
+
- skill names that collide with prompt names
|
|
17
|
+
- collisions involving explicit frontmatter names and default filename or directory-derived names
|
|
18
|
+
|
|
19
|
+
## Why this rule exists
|
|
20
|
+
|
|
21
|
+
Prompt files and skills both participate in slash-command style invocation flows. Reusing the same effective command name across those surfaces creates namespace collisions and makes command selection ambiguous.
|
|
22
|
+
|
|
23
|
+
## ❌ Incorrect
|
|
24
|
+
|
|
25
|
+
```text
|
|
26
|
+
.github/prompts/review.prompt.md # effective name: review
|
|
27
|
+
.github/skills/review/SKILL.md # effective name: review
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## ✅ Correct
|
|
31
|
+
|
|
32
|
+
```text
|
|
33
|
+
.github/prompts/review.prompt.md # effective name: review
|
|
34
|
+
.github/skills/review-checklist/SKILL.md # effective name: review-checklist
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## Further reading
|
|
38
|
+
|
|
39
|
+
- [VS Code Docs: Prompt files](https://code.visualstudio.com/docs/copilot/customization/prompt-files)
|
|
40
|
+
- [GitHub Docs: Creating agent skills for GitHub Copilot](https://docs.github.com/en/copilot/how-tos/use-copilot-agents/coding-agent/create-skills)
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# no-empty-repository-hook-arrays
|
|
2
|
+
|
|
3
|
+
Disallow empty repository hook arrays that opt into an event without any hook definitions.
|
|
4
|
+
|
|
5
|
+
> **Rule catalog ID:** R067
|
|
6
|
+
|
|
7
|
+
## Targeted pattern scope
|
|
8
|
+
|
|
9
|
+
- `.github/hooks/**/*.json`
|
|
10
|
+
|
|
11
|
+
## What this rule reports
|
|
12
|
+
|
|
13
|
+
- hook event arrays declared as `[]`
|
|
14
|
+
|
|
15
|
+
## Why this rule exists
|
|
16
|
+
|
|
17
|
+
An empty array says the repository opted into a hook event but did not actually configure any hooks. Removing empty event entries keeps the file focused on real behavior and makes the configuration easier to read.
|
|
18
|
+
|
|
19
|
+
## ❌ Incorrect
|
|
20
|
+
|
|
21
|
+
```json
|
|
22
|
+
{ "version": 1, "hooks": { "sessionStart": [] } }
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## ✅ Correct
|
|
26
|
+
|
|
27
|
+
```json
|
|
28
|
+
{ "version": 1, "hooks": {} }
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
or:
|
|
32
|
+
|
|
33
|
+
```json
|
|
34
|
+
{
|
|
35
|
+
"version": 1,
|
|
36
|
+
"hooks": {
|
|
37
|
+
"sessionStart": [{ "type": "command", "bash": "echo ready" }]
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## Further reading
|
|
43
|
+
|
|
44
|
+
- [GitHub Docs: Using hooks with GitHub Copilot agents](https://docs.github.com/en/copilot/how-tos/use-copilot-agents/coding-agent/use-hooks)
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# no-legacy-chatmode-files
|
|
2
|
+
|
|
3
|
+
Disallow legacy Copilot `.chatmode.md` files in favor of modern `.agent.md` custom agents.
|
|
4
|
+
|
|
5
|
+
> **Rule catalog ID:** R011
|
|
6
|
+
|
|
7
|
+
## Targeted pattern scope
|
|
8
|
+
|
|
9
|
+
- `.github/chatmodes/**/*.chatmode.md`
|
|
10
|
+
|
|
11
|
+
## What this rule reports
|
|
12
|
+
|
|
13
|
+
- legacy workspace chat mode files that still use the old `.chatmode.md` naming and location
|
|
14
|
+
|
|
15
|
+
## Why this rule exists
|
|
16
|
+
|
|
17
|
+
VS Code custom agents replaced legacy chat modes. The current documentation recommends migrating older `.chatmode.md` files to `.agent.md` files under `.github/agents/` so repositories use the modern Copilot customization surface.
|
|
18
|
+
|
|
19
|
+
Keeping legacy chat mode files around makes repository customization harder to standardize and pushes teams toward an older contract that VS Code now documents as migrated terminology.
|
|
20
|
+
|
|
21
|
+
## ❌ Incorrect
|
|
22
|
+
|
|
23
|
+
```md
|
|
24
|
+
---
|
|
25
|
+
description: Plan work carefully
|
|
26
|
+
---
|
|
27
|
+
Plan the requested change before implementation.
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Saved as:
|
|
31
|
+
|
|
32
|
+
```text
|
|
33
|
+
.github/chatmodes/planner.chatmode.md
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## ✅ Correct
|
|
37
|
+
|
|
38
|
+
```md
|
|
39
|
+
---
|
|
40
|
+
description: Plan work carefully
|
|
41
|
+
---
|
|
42
|
+
Plan the requested change before implementation.
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
Saved as:
|
|
46
|
+
|
|
47
|
+
```text
|
|
48
|
+
.github/agents/planner.agent.md
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## Further reading
|
|
52
|
+
|
|
53
|
+
- [VS Code Docs: Custom agents](https://code.visualstudio.com/docs/copilot/customization/custom-agents)
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# Rule overview
|
|
2
|
+
|
|
3
|
+
`eslint-plugin-copilot` focuses on repository customization quality for GitHub Copilot.
|
|
4
|
+
|
|
5
|
+
## What the rules cover
|
|
6
|
+
|
|
7
|
+
- required frontmatter metadata for prompt, instructions, custom-agent, chatmode, and skill definition files
|
|
8
|
+
- non-empty, correctly shaped optional metadata such as prompt and agent `name`, `argument-hint`, `tools`, `model`, and skill `license`
|
|
9
|
+
- repository-relative `applyTo` glob validation for path-specific instructions
|
|
10
|
+
- practical repository-instructions guidance such as the code-review 4,000-character budget
|
|
11
|
+
- baseline repository setup when you opt into prompts, custom agents, chat modes, skills, agent instruction files, or path-specific instructions
|
|
12
|
+
- duplicate effective names across prompts, custom agents, skills, and shared slash-command namespaces
|
|
13
|
+
- relative-link and existing-target checks for prompts, instructions, agents, and skills
|
|
14
|
+
- modern custom-agent-only metadata such as subagent wiring, invocation controls, targets, MCP servers, hooks, and handoffs
|
|
15
|
+
- GitHub-target-specific custom-agent metadata such as `mcp-servers` targeting and JSON config references
|
|
16
|
+
- repository-relative and existing-path validation for agent hook `cwd` values
|
|
17
|
+
- repository hook JSON schema quality under `.github/hooks/*.json`, including `version`, `hooks`, event arrays, hook `type`, shell commands, `cwd`, `timeoutSec`, and `env`
|
|
18
|
+
- repository hook maintainability checks such as avoiding empty event arrays and oversized timeout budgets
|
|
19
|
+
- migration pressure away from legacy `.chatmode.md` customization files toward modern `.agent.md` agents
|
|
20
|
+
- modern fully-qualified `tools` metadata in prompt, custom agent, and legacy chat mode files
|
|
21
|
+
|
|
22
|
+
## Design goals
|
|
23
|
+
|
|
24
|
+
- reflect documented GitHub Copilot and VS Code customization conventions
|
|
25
|
+
- keep rules static and predictable
|
|
26
|
+
- favor setup correctness over speculative content policing
|
|
27
|
+
- work directly on markdown-first Copilot asset files plus repository hook JSON
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# prefer-custom-instructions-under-code-review-limit
|
|
2
|
+
|
|
3
|
+
Prefer repository and path-specific Copilot instruction files to stay within the 4,000-character code-review instruction budget.
|
|
4
|
+
|
|
5
|
+
> **Rule catalog ID:** R036
|
|
6
|
+
|
|
7
|
+
## Targeted pattern scope
|
|
8
|
+
|
|
9
|
+
- `.github/copilot-instructions.md`
|
|
10
|
+
- `.github/instructions/**/*.instructions.md`
|
|
11
|
+
|
|
12
|
+
## What this rule reports
|
|
13
|
+
|
|
14
|
+
- repository or path-specific instruction files whose raw character length exceeds 4,000 characters
|
|
15
|
+
|
|
16
|
+
## Why this rule exists
|
|
17
|
+
|
|
18
|
+
GitHub documents that code review only considers roughly the first 4,000 characters of custom instructions. Keeping instruction files within that budget reduces the chance that important guidance is silently ignored during review flows.
|
|
19
|
+
|
|
20
|
+
## ❌ Incorrect
|
|
21
|
+
|
|
22
|
+
```md
|
|
23
|
+
<!-- imagine thousands of characters of guidance here -->
|
|
24
|
+
# Review policy
|
|
25
|
+
|
|
26
|
+
...very long instructions document...
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## ✅ Correct
|
|
30
|
+
|
|
31
|
+
```md
|
|
32
|
+
# Review policy
|
|
33
|
+
|
|
34
|
+
Keep review instructions focused, high-signal, and short enough that the whole file fits within the code-review instruction budget.
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## Further reading
|
|
38
|
+
|
|
39
|
+
- [GitHub Docs: Add repository custom instructions for GitHub Copilot](https://docs.github.com/en/copilot/how-tos/configure-custom-instructions/add-repository-instructions)
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# prefer-fast-repository-hooks
|
|
2
|
+
|
|
3
|
+
Prefer repository hooks to stay at or below the default 30-second timeout unless a slower hook is truly necessary.
|
|
4
|
+
|
|
5
|
+
> **Rule catalog ID:** R068
|
|
6
|
+
|
|
7
|
+
## Targeted pattern scope
|
|
8
|
+
|
|
9
|
+
- `.github/hooks/**/*.json`
|
|
10
|
+
|
|
11
|
+
## What this rule reports
|
|
12
|
+
|
|
13
|
+
- hook `timeoutSec` values greater than the documented default 30-second timeout budget
|
|
14
|
+
|
|
15
|
+
## Why this rule exists
|
|
16
|
+
|
|
17
|
+
Long-running hooks slow down agent workflows and increase the chance of timeouts or poor user experience. Keeping hooks within the default budget encourages lightweight, reliable automation.
|
|
18
|
+
|
|
19
|
+
## ❌ Incorrect
|
|
20
|
+
|
|
21
|
+
```json
|
|
22
|
+
{
|
|
23
|
+
"version": 1,
|
|
24
|
+
"hooks": {
|
|
25
|
+
"sessionStart": [{ "type": "command", "bash": "echo ready", "timeoutSec": 120 }]
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## ✅ Correct
|
|
31
|
+
|
|
32
|
+
```json
|
|
33
|
+
{
|
|
34
|
+
"version": 1,
|
|
35
|
+
"hooks": {
|
|
36
|
+
"sessionStart": [{ "type": "command", "bash": "echo ready", "timeoutSec": 10 }]
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Further reading
|
|
42
|
+
|
|
43
|
+
- [GitHub Docs: Using hooks with GitHub Copilot agents](https://docs.github.com/en/copilot/how-tos/use-copilot-agents/coding-agent/use-hooks)
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# prefer-qualified-tools
|
|
2
|
+
|
|
3
|
+
Prefer fully-qualified tool names in Copilot prompt files, custom agents, and legacy chat modes.
|
|
4
|
+
|
|
5
|
+
> **Rule catalog ID:** R006
|
|
6
|
+
|
|
7
|
+
## Targeted pattern scope
|
|
8
|
+
|
|
9
|
+
- `.github/prompts/**/*.prompt.md`
|
|
10
|
+
- `.github/agents/**/*.agent.md`
|
|
11
|
+
- `.github/chatmodes/**/*.chatmode.md`
|
|
12
|
+
|
|
13
|
+
## What this rule reports
|
|
14
|
+
|
|
15
|
+
- entries in `tools` frontmatter arrays that are not fully qualified with a provider or namespace segment
|
|
16
|
+
- except for documented built-in subagent tools such as `agent` and `runSubagent`
|
|
17
|
+
|
|
18
|
+
## Why this rule exists
|
|
19
|
+
|
|
20
|
+
Modern Copilot tooling supports fully-qualified tool names such as `search/codebase` to reduce ambiguity between built-in tools, extension-provided tools, and MCP tools.
|
|
21
|
+
|
|
22
|
+
The built-in `agent` and `runSubagent` tools are exceptions because current VS Code subagent documentation refers to those aliases directly when enabling subagent orchestration.
|
|
23
|
+
|
|
24
|
+
## ❌ Incorrect
|
|
25
|
+
|
|
26
|
+
```md
|
|
27
|
+
---
|
|
28
|
+
description: Release notes helper
|
|
29
|
+
agent: agent
|
|
30
|
+
tools: [file_search, fetch]
|
|
31
|
+
---
|
|
32
|
+
Generate release notes for the latest changes.
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## ✅ Correct
|
|
36
|
+
|
|
37
|
+
```md
|
|
38
|
+
---
|
|
39
|
+
description: Release notes helper
|
|
40
|
+
agent: agent
|
|
41
|
+
tools: [search/file_search, fetch/fetch]
|
|
42
|
+
---
|
|
43
|
+
Generate release notes for the latest changes.
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## Further reading
|
|
47
|
+
|
|
48
|
+
- [VS Code Docs: Reusable prompt files](https://code.visualstudio.com/docs/copilot/customization/prompt-files)
|
|
49
|
+
- [VS Code Docs: Custom agents](https://code.visualstudio.com/docs/copilot/customization/custom-agents)
|