eslint-plugin-copilot 1.0.8 → 1.1.2
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/README.md +71 -72
- package/dist/_internal/copilot-config-references.d.ts +1 -1
- package/dist/_internal/copilot-config-references.d.ts.map +1 -1
- package/dist/_internal/copilot-config-references.js +3 -1
- package/dist/_internal/copilot-config-references.js.map +1 -1
- package/dist/_internal/copilot-file-kind.d.ts.map +1 -1
- package/dist/_internal/copilot-file-kind.js +4 -3
- package/dist/_internal/copilot-file-kind.js.map +1 -1
- package/dist/_internal/create-copilot-rule.d.ts +4 -2
- package/dist/_internal/create-copilot-rule.d.ts.map +1 -1
- package/dist/_internal/create-copilot-rule.js.map +1 -1
- package/dist/_internal/file-system.d.ts.map +1 -1
- package/dist/_internal/file-system.js +31 -18
- package/dist/_internal/file-system.js.map +1 -1
- package/dist/_internal/frontmatter.d.ts +1 -1
- package/dist/_internal/frontmatter.d.ts.map +1 -1
- package/dist/_internal/frontmatter.js +151 -119
- package/dist/_internal/frontmatter.js.map +1 -1
- package/dist/_internal/markdown-links.d.ts.map +1 -1
- package/dist/_internal/markdown-links.js +3 -1
- package/dist/_internal/markdown-links.js.map +1 -1
- package/dist/_internal/markdown-rule.d.ts +2 -1
- package/dist/_internal/markdown-rule.d.ts.map +1 -1
- package/dist/_internal/markdown-rule.js.map +1 -1
- package/dist/_internal/repository-hooks-json.d.ts +5 -2
- package/dist/_internal/repository-hooks-json.d.ts.map +1 -1
- package/dist/_internal/repository-hooks-json.js +7 -6
- package/dist/_internal/repository-hooks-json.js.map +1 -1
- package/dist/_internal/rule-catalog.d.ts.map +1 -1
- package/dist/_internal/rule-catalog.js +2 -3
- package/dist/_internal/rule-catalog.js.map +1 -1
- package/dist/plugin.cjs +560 -633
- package/dist/plugin.cjs.map +4 -4
- package/dist/plugin.d.cts +2 -1
- package/dist/plugin.d.ts +2 -1
- package/dist/plugin.d.ts.map +1 -1
- package/dist/plugin.js +4 -3
- package/dist/plugin.js.map +1 -1
- package/dist/rules/no-blank-customization-body.d.ts +1 -0
- package/dist/rules/no-blank-customization-body.d.ts.map +1 -1
- package/dist/rules/no-blank-customization-body.js +3 -0
- package/dist/rules/no-blank-customization-body.js.map +1 -1
- package/dist/rules/no-blank-repository-instructions.d.ts +1 -0
- package/dist/rules/no-blank-repository-instructions.d.ts.map +1 -1
- package/dist/rules/no-blank-repository-instructions.js +3 -0
- package/dist/rules/no-blank-repository-instructions.js.map +1 -1
- package/dist/rules/no-blank-skill-body.d.ts +1 -0
- package/dist/rules/no-blank-skill-body.d.ts.map +1 -1
- package/dist/rules/no-blank-skill-body.js +3 -0
- package/dist/rules/no-blank-skill-body.js.map +1 -1
- package/dist/rules/no-deprecated-agent-infer.d.ts +1 -0
- package/dist/rules/no-deprecated-agent-infer.d.ts.map +1 -1
- package/dist/rules/no-deprecated-agent-infer.js +3 -0
- package/dist/rules/no-deprecated-agent-infer.js.map +1 -1
- package/dist/rules/no-duplicate-agent-names.d.ts +1 -0
- package/dist/rules/no-duplicate-agent-names.d.ts.map +1 -1
- package/dist/rules/no-duplicate-agent-names.js +6 -4
- package/dist/rules/no-duplicate-agent-names.js.map +1 -1
- package/dist/rules/no-duplicate-prompt-names.d.ts +1 -0
- package/dist/rules/no-duplicate-prompt-names.d.ts.map +1 -1
- package/dist/rules/no-duplicate-prompt-names.js +6 -4
- package/dist/rules/no-duplicate-prompt-names.js.map +1 -1
- package/dist/rules/no-duplicate-skill-names.d.ts +1 -0
- package/dist/rules/no-duplicate-skill-names.d.ts.map +1 -1
- package/dist/rules/no-duplicate-skill-names.js +6 -4
- package/dist/rules/no-duplicate-skill-names.js.map +1 -1
- package/dist/rules/no-duplicate-slash-command-names.d.ts +1 -0
- package/dist/rules/no-duplicate-slash-command-names.d.ts.map +1 -1
- package/dist/rules/no-duplicate-slash-command-names.js +6 -4
- package/dist/rules/no-duplicate-slash-command-names.js.map +1 -1
- package/dist/rules/no-empty-repository-hook-arrays.d.ts +1 -0
- package/dist/rules/no-empty-repository-hook-arrays.d.ts.map +1 -1
- package/dist/rules/no-empty-repository-hook-arrays.js +7 -3
- package/dist/rules/no-empty-repository-hook-arrays.js.map +1 -1
- package/dist/rules/no-legacy-chatmode-files.d.ts +1 -0
- package/dist/rules/no-legacy-chatmode-files.d.ts.map +1 -1
- package/dist/rules/no-legacy-chatmode-files.js +3 -0
- package/dist/rules/no-legacy-chatmode-files.js.map +1 -1
- package/dist/rules/prefer-custom-instructions-under-code-review-limit.d.ts +1 -0
- package/dist/rules/prefer-custom-instructions-under-code-review-limit.d.ts.map +1 -1
- package/dist/rules/prefer-custom-instructions-under-code-review-limit.js +3 -0
- package/dist/rules/prefer-custom-instructions-under-code-review-limit.js.map +1 -1
- package/dist/rules/prefer-fast-repository-hooks.d.ts +1 -0
- package/dist/rules/prefer-fast-repository-hooks.d.ts.map +1 -1
- package/dist/rules/prefer-fast-repository-hooks.js +5 -1
- package/dist/rules/prefer-fast-repository-hooks.js.map +1 -1
- package/dist/rules/prefer-qualified-tools.d.ts +1 -0
- package/dist/rules/prefer-qualified-tools.d.ts.map +1 -1
- package/dist/rules/prefer-qualified-tools.js +8 -3
- package/dist/rules/prefer-qualified-tools.js.map +1 -1
- package/dist/rules/require-agent-tool-for-subagents.d.ts +1 -0
- package/dist/rules/require-agent-tool-for-subagents.d.ts.map +1 -1
- package/dist/rules/require-agent-tool-for-subagents.js +6 -2
- package/dist/rules/require-agent-tool-for-subagents.js.map +1 -1
- package/dist/rules/require-agents-md-for-cross-surface-agent-instructions.d.ts +1 -0
- package/dist/rules/require-agents-md-for-cross-surface-agent-instructions.d.ts.map +1 -1
- package/dist/rules/require-agents-md-for-cross-surface-agent-instructions.js +3 -0
- package/dist/rules/require-agents-md-for-cross-surface-agent-instructions.js.map +1 -1
- package/dist/rules/require-chatmode-file-metadata.d.ts +1 -0
- package/dist/rules/require-chatmode-file-metadata.d.ts.map +1 -1
- package/dist/rules/require-chatmode-file-metadata.js +5 -1
- package/dist/rules/require-chatmode-file-metadata.js.map +1 -1
- package/dist/rules/require-existing-agent-hook-cwd.d.ts +1 -0
- package/dist/rules/require-existing-agent-hook-cwd.d.ts.map +1 -1
- package/dist/rules/require-existing-agent-hook-cwd.js +6 -2
- package/dist/rules/require-existing-agent-hook-cwd.js.map +1 -1
- package/dist/rules/require-existing-agent-mcp-servers.d.ts +1 -0
- package/dist/rules/require-existing-agent-mcp-servers.d.ts.map +1 -1
- package/dist/rules/require-existing-agent-mcp-servers.js +6 -2
- package/dist/rules/require-existing-agent-mcp-servers.js.map +1 -1
- package/dist/rules/require-existing-relative-agent-links.d.ts +1 -0
- package/dist/rules/require-existing-relative-agent-links.d.ts.map +1 -1
- package/dist/rules/require-existing-relative-agent-links.js +3 -0
- package/dist/rules/require-existing-relative-agent-links.js.map +1 -1
- package/dist/rules/require-existing-relative-instructions-links.d.ts +1 -0
- package/dist/rules/require-existing-relative-instructions-links.d.ts.map +1 -1
- package/dist/rules/require-existing-relative-instructions-links.js +3 -0
- package/dist/rules/require-existing-relative-instructions-links.js.map +1 -1
- package/dist/rules/require-existing-relative-prompt-links.d.ts +1 -0
- package/dist/rules/require-existing-relative-prompt-links.d.ts.map +1 -1
- package/dist/rules/require-existing-relative-prompt-links.js +3 -0
- package/dist/rules/require-existing-relative-prompt-links.js.map +1 -1
- package/dist/rules/require-existing-relative-skill-links.d.ts +1 -0
- package/dist/rules/require-existing-relative-skill-links.d.ts.map +1 -1
- package/dist/rules/require-existing-relative-skill-links.js +3 -0
- package/dist/rules/require-existing-relative-skill-links.js.map +1 -1
- package/dist/rules/require-existing-repository-hook-cwd.d.ts +1 -0
- package/dist/rules/require-existing-repository-hook-cwd.d.ts.map +1 -1
- package/dist/rules/require-existing-repository-hook-cwd.js +5 -1
- package/dist/rules/require-existing-repository-hook-cwd.js.map +1 -1
- package/dist/rules/require-github-copilot-target-for-mcp-servers.d.ts +1 -0
- package/dist/rules/require-github-copilot-target-for-mcp-servers.d.ts.map +1 -1
- package/dist/rules/require-github-copilot-target-for-mcp-servers.js +5 -1
- package/dist/rules/require-github-copilot-target-for-mcp-servers.js.map +1 -1
- package/dist/rules/require-instructions-apply-to.d.ts +1 -0
- package/dist/rules/require-instructions-apply-to.d.ts.map +1 -1
- package/dist/rules/require-instructions-apply-to.js +5 -1
- package/dist/rules/require-instructions-apply-to.js.map +1 -1
- package/dist/rules/require-json-agent-mcp-servers.d.ts +1 -0
- package/dist/rules/require-json-agent-mcp-servers.d.ts.map +1 -1
- package/dist/rules/require-json-agent-mcp-servers.js +6 -2
- package/dist/rules/require-json-agent-mcp-servers.js.map +1 -1
- package/dist/rules/require-prompt-file-metadata.d.ts +1 -0
- package/dist/rules/require-prompt-file-metadata.d.ts.map +1 -1
- package/dist/rules/require-prompt-file-metadata.js +43 -32
- package/dist/rules/require-prompt-file-metadata.js.map +1 -1
- package/dist/rules/require-qualified-agent-handoff-models.d.ts +1 -0
- package/dist/rules/require-qualified-agent-handoff-models.d.ts.map +1 -1
- package/dist/rules/require-qualified-agent-handoff-models.js +6 -2
- package/dist/rules/require-qualified-agent-handoff-models.js.map +1 -1
- package/dist/rules/require-relative-agent-hook-cwd.d.ts +1 -0
- package/dist/rules/require-relative-agent-hook-cwd.d.ts.map +1 -1
- package/dist/rules/require-relative-agent-hook-cwd.js +6 -2
- package/dist/rules/require-relative-agent-hook-cwd.js.map +1 -1
- package/dist/rules/require-relative-agent-links.d.ts +1 -0
- package/dist/rules/require-relative-agent-links.d.ts.map +1 -1
- package/dist/rules/require-relative-agent-links.js +3 -0
- package/dist/rules/require-relative-agent-links.js.map +1 -1
- package/dist/rules/require-relative-instructions-links.d.ts +1 -0
- package/dist/rules/require-relative-instructions-links.d.ts.map +1 -1
- package/dist/rules/require-relative-instructions-links.js +3 -0
- package/dist/rules/require-relative-instructions-links.js.map +1 -1
- package/dist/rules/require-relative-prompt-links.d.ts +1 -0
- package/dist/rules/require-relative-prompt-links.d.ts.map +1 -1
- package/dist/rules/require-relative-prompt-links.js +3 -0
- package/dist/rules/require-relative-prompt-links.js.map +1 -1
- package/dist/rules/require-relative-repository-hook-cwd.d.ts +1 -0
- package/dist/rules/require-relative-repository-hook-cwd.d.ts.map +1 -1
- package/dist/rules/require-relative-repository-hook-cwd.js +5 -1
- package/dist/rules/require-relative-repository-hook-cwd.js.map +1 -1
- package/dist/rules/require-relative-skill-links.d.ts +1 -0
- package/dist/rules/require-relative-skill-links.d.ts.map +1 -1
- package/dist/rules/require-relative-skill-links.js +3 -0
- package/dist/rules/require-relative-skill-links.js.map +1 -1
- package/dist/rules/require-repository-hook-arrays.d.ts +1 -0
- package/dist/rules/require-repository-hook-arrays.d.ts.map +1 -1
- package/dist/rules/require-repository-hook-arrays.js +7 -3
- package/dist/rules/require-repository-hook-arrays.js.map +1 -1
- package/dist/rules/require-repository-hook-command-shell.d.ts +1 -0
- package/dist/rules/require-repository-hook-command-shell.d.ts.map +1 -1
- package/dist/rules/require-repository-hook-command-shell.js +5 -1
- package/dist/rules/require-repository-hook-command-shell.js.map +1 -1
- package/dist/rules/require-repository-hooks-object.d.ts +1 -0
- package/dist/rules/require-repository-hooks-object.d.ts.map +1 -1
- package/dist/rules/require-repository-hooks-object.js +3 -0
- package/dist/rules/require-repository-hooks-object.js.map +1 -1
- package/dist/rules/require-repository-instructions-file.d.ts +1 -0
- package/dist/rules/require-repository-instructions-file.d.ts.map +1 -1
- package/dist/rules/require-repository-instructions-file.js +3 -0
- package/dist/rules/require-repository-instructions-file.js.map +1 -1
- package/dist/rules/require-skill-file-location.d.ts +1 -0
- package/dist/rules/require-skill-file-location.d.ts.map +1 -1
- package/dist/rules/require-skill-file-location.js +3 -0
- package/dist/rules/require-skill-file-location.js.map +1 -1
- package/dist/rules/require-skill-file-metadata.d.ts +1 -0
- package/dist/rules/require-skill-file-metadata.d.ts.map +1 -1
- package/dist/rules/require-skill-file-metadata.js +6 -2
- package/dist/rules/require-skill-file-metadata.js.map +1 -1
- package/dist/rules/require-skill-md-filename.d.ts +1 -0
- package/dist/rules/require-skill-md-filename.d.ts.map +1 -1
- package/dist/rules/require-skill-md-filename.js +3 -0
- package/dist/rules/require-skill-md-filename.js.map +1 -1
- package/dist/rules/require-skill-name-match-directory.d.ts +1 -0
- package/dist/rules/require-skill-name-match-directory.d.ts.map +1 -1
- package/dist/rules/require-skill-name-match-directory.js +5 -1
- package/dist/rules/require-skill-name-match-directory.js.map +1 -1
- package/dist/rules/require-string-repository-hook-env-values.d.ts +1 -0
- package/dist/rules/require-string-repository-hook-env-values.d.ts.map +1 -1
- package/dist/rules/require-string-repository-hook-env-values.js +6 -2
- package/dist/rules/require-string-repository-hook-env-values.js.map +1 -1
- package/dist/rules/require-valid-agent-argument-hint.d.ts +1 -0
- package/dist/rules/require-valid-agent-argument-hint.d.ts.map +1 -1
- package/dist/rules/require-valid-agent-argument-hint.js +5 -1
- package/dist/rules/require-valid-agent-argument-hint.js.map +1 -1
- package/dist/rules/require-valid-agent-handoff-send.d.ts +1 -0
- package/dist/rules/require-valid-agent-handoff-send.d.ts.map +1 -1
- package/dist/rules/require-valid-agent-handoff-send.js +7 -3
- package/dist/rules/require-valid-agent-handoff-send.js.map +1 -1
- package/dist/rules/require-valid-agent-handoffs.d.ts +1 -0
- package/dist/rules/require-valid-agent-handoffs.d.ts.map +1 -1
- package/dist/rules/require-valid-agent-handoffs.js +5 -1
- package/dist/rules/require-valid-agent-handoffs.js.map +1 -1
- package/dist/rules/require-valid-agent-hook-events.d.ts +1 -0
- package/dist/rules/require-valid-agent-hook-events.d.ts.map +1 -1
- package/dist/rules/require-valid-agent-hook-events.js +6 -2
- package/dist/rules/require-valid-agent-hook-events.js.map +1 -1
- package/dist/rules/require-valid-agent-hook-timeouts.d.ts +1 -0
- package/dist/rules/require-valid-agent-hook-timeouts.d.ts.map +1 -1
- package/dist/rules/require-valid-agent-hook-timeouts.js +6 -2
- package/dist/rules/require-valid-agent-hook-timeouts.js.map +1 -1
- package/dist/rules/require-valid-agent-hooks.d.ts +1 -0
- package/dist/rules/require-valid-agent-hooks.d.ts.map +1 -1
- package/dist/rules/require-valid-agent-hooks.js +31 -21
- package/dist/rules/require-valid-agent-hooks.js.map +1 -1
- package/dist/rules/require-valid-agent-invocation-controls.d.ts +1 -0
- package/dist/rules/require-valid-agent-invocation-controls.d.ts.map +1 -1
- package/dist/rules/require-valid-agent-invocation-controls.js +7 -3
- package/dist/rules/require-valid-agent-invocation-controls.js.map +1 -1
- package/dist/rules/require-valid-agent-mcp-servers.d.ts +1 -0
- package/dist/rules/require-valid-agent-mcp-servers.d.ts.map +1 -1
- package/dist/rules/require-valid-agent-mcp-servers.js +8 -4
- package/dist/rules/require-valid-agent-mcp-servers.js.map +1 -1
- package/dist/rules/require-valid-agent-model.d.ts +1 -0
- package/dist/rules/require-valid-agent-model.d.ts.map +1 -1
- package/dist/rules/require-valid-agent-model.js +7 -3
- package/dist/rules/require-valid-agent-model.js.map +1 -1
- package/dist/rules/require-valid-agent-name.d.ts +1 -0
- package/dist/rules/require-valid-agent-name.d.ts.map +1 -1
- package/dist/rules/require-valid-agent-name.js +5 -1
- package/dist/rules/require-valid-agent-name.js.map +1 -1
- package/dist/rules/require-valid-agent-subagents.d.ts +1 -0
- package/dist/rules/require-valid-agent-subagents.d.ts.map +1 -1
- package/dist/rules/require-valid-agent-subagents.js +8 -4
- package/dist/rules/require-valid-agent-subagents.js.map +1 -1
- package/dist/rules/require-valid-agent-target.d.ts +1 -0
- package/dist/rules/require-valid-agent-target.d.ts.map +1 -1
- package/dist/rules/require-valid-agent-target.js +6 -2
- package/dist/rules/require-valid-agent-target.js.map +1 -1
- package/dist/rules/require-valid-agent-tools.d.ts +1 -0
- package/dist/rules/require-valid-agent-tools.d.ts.map +1 -1
- package/dist/rules/require-valid-agent-tools.js +8 -4
- package/dist/rules/require-valid-agent-tools.js.map +1 -1
- package/dist/rules/require-valid-instructions-apply-to-globs.d.ts +1 -0
- package/dist/rules/require-valid-instructions-apply-to-globs.d.ts.map +1 -1
- package/dist/rules/require-valid-instructions-apply-to-globs.js +8 -3
- package/dist/rules/require-valid-instructions-apply-to-globs.js.map +1 -1
- package/dist/rules/require-valid-prompt-argument-hint.d.ts +1 -0
- package/dist/rules/require-valid-prompt-argument-hint.d.ts.map +1 -1
- package/dist/rules/require-valid-prompt-argument-hint.js +6 -3
- package/dist/rules/require-valid-prompt-argument-hint.js.map +1 -1
- package/dist/rules/require-valid-prompt-model.d.ts +1 -0
- package/dist/rules/require-valid-prompt-model.d.ts.map +1 -1
- package/dist/rules/require-valid-prompt-model.js +9 -5
- package/dist/rules/require-valid-prompt-model.js.map +1 -1
- package/dist/rules/require-valid-prompt-name.d.ts +1 -0
- package/dist/rules/require-valid-prompt-name.d.ts.map +1 -1
- package/dist/rules/require-valid-prompt-name.js +5 -1
- package/dist/rules/require-valid-prompt-name.js.map +1 -1
- package/dist/rules/require-valid-prompt-tools.d.ts +1 -0
- package/dist/rules/require-valid-prompt-tools.d.ts.map +1 -1
- package/dist/rules/require-valid-prompt-tools.js +8 -4
- package/dist/rules/require-valid-prompt-tools.js.map +1 -1
- package/dist/rules/require-valid-repository-hook-command-type.d.ts +1 -0
- package/dist/rules/require-valid-repository-hook-command-type.d.ts.map +1 -1
- package/dist/rules/require-valid-repository-hook-command-type.js +5 -1
- package/dist/rules/require-valid-repository-hook-command-type.js.map +1 -1
- package/dist/rules/require-valid-repository-hook-env.d.ts +1 -0
- package/dist/rules/require-valid-repository-hook-env.d.ts.map +1 -1
- package/dist/rules/require-valid-repository-hook-env.js +6 -2
- package/dist/rules/require-valid-repository-hook-env.js.map +1 -1
- package/dist/rules/require-valid-repository-hook-events.d.ts +1 -0
- package/dist/rules/require-valid-repository-hook-events.d.ts.map +1 -1
- package/dist/rules/require-valid-repository-hook-events.js +5 -1
- package/dist/rules/require-valid-repository-hook-events.js.map +1 -1
- package/dist/rules/require-valid-repository-hook-timeouts.d.ts +1 -0
- package/dist/rules/require-valid-repository-hook-timeouts.d.ts.map +1 -1
- package/dist/rules/require-valid-repository-hook-timeouts.js +7 -3
- package/dist/rules/require-valid-repository-hook-timeouts.js.map +1 -1
- package/dist/rules/require-valid-repository-hook-version.d.ts +1 -0
- package/dist/rules/require-valid-repository-hook-version.d.ts.map +1 -1
- package/dist/rules/require-valid-repository-hook-version.js +3 -0
- package/dist/rules/require-valid-repository-hook-version.js.map +1 -1
- package/dist/rules/require-valid-skill-directory-name.d.ts +1 -0
- package/dist/rules/require-valid-skill-directory-name.d.ts.map +1 -1
- package/dist/rules/require-valid-skill-directory-name.js +3 -0
- package/dist/rules/require-valid-skill-directory-name.js.map +1 -1
- package/dist/rules/require-valid-skill-license.d.ts +1 -0
- package/dist/rules/require-valid-skill-license.d.ts.map +1 -1
- package/dist/rules/require-valid-skill-license.js +5 -1
- package/dist/rules/require-valid-skill-license.js.map +1 -1
- package/dist/rules/require-valid-skill-name.d.ts +1 -0
- package/dist/rules/require-valid-skill-name.d.ts.map +1 -1
- package/dist/rules/require-valid-skill-name.js +5 -1
- package/dist/rules/require-valid-skill-name.js.map +1 -1
- package/package.json +37 -277
package/dist/plugin.cjs
CHANGED
|
@@ -35,12 +35,13 @@ __export(plugin_exports, {
|
|
|
35
35
|
module.exports = __toCommonJS(plugin_exports);
|
|
36
36
|
var import_json = __toESM(require("@eslint/json"), 1);
|
|
37
37
|
var import_markdown = __toESM(require("@eslint/markdown"), 1);
|
|
38
|
+
var import_ts_extras56 = require("ts-extras");
|
|
38
39
|
|
|
39
40
|
// package.json
|
|
40
41
|
var package_default = {
|
|
41
42
|
$schema: "https://www.schemastore.org/package.json",
|
|
42
43
|
name: "eslint-plugin-copilot",
|
|
43
|
-
version: "1.
|
|
44
|
+
version: "1.1.2",
|
|
44
45
|
private: false,
|
|
45
46
|
description: "ESLint rules for GitHub Copilot repository customization files.",
|
|
46
47
|
keywords: [
|
|
@@ -187,7 +188,7 @@ var package_default = {
|
|
|
187
188
|
"lint:quiet": 'cross-env ESLINT_PROGRESS=nofile NODE_OPTIONS=--max_old_space_size=16384 eslint --cache --cache-strategy content --cache-location .cache/.eslintcache && echo "Eslint done!"',
|
|
188
189
|
"lint:remark": 'remark --rc-path .remarkrc.mjs --silently-ignore --ignore-path .remarkignore --frail "*.{md,mdx}" "docs/**/*.{md,mdx}" --quiet',
|
|
189
190
|
"lint:remark:fix": 'prettier --log-level warn --ignore-path prettierignore.remark --cache --cache-location=.cache/.prettier-cache --cache-strategy=content --no-error-on-unmatched-pattern --write "*.{md,mdx}" "docs/**/*.{md,mdx}" && npm run remark:fix',
|
|
190
|
-
"lint:secretlint": 'secretlint --secretlintrc .secretlintrc.
|
|
191
|
+
"lint:secretlint": 'secretlint --secretlintrc .secretlintrc.cjs --secretlintignore .secretlintignore "./*" ".vscode/**" "assets/**" "src/**" "electron/**" "shared/**" "config/**" "scripts/**" "playwright/**" "storybook/**" ".storybook" "tests/**" "benchmarks/**" ".devin/**" "public/**" ".github/**" "docs/Architecture/**" "docs/*" "docs/assets/**" "docs/Guides/**" "docs/Testing/**" "docs/TSDoc/**" "docs/docusaurus/src/**" "docs/docusaurus/static/**" "docs/docusaurus/blog/**" "docs/docusaurus/docs/**" "docs/docusaurus/docs/*"',
|
|
191
192
|
"lint:secrets": "detect-secrets scan",
|
|
192
193
|
"lint:unused": "npm run knip -- --include unlisted,unresolved,duplicates",
|
|
193
194
|
"lint:unused-deps": "depcheck --ignores='@types/*,@testing-library/*,@vitest/*'",
|
|
@@ -207,6 +208,7 @@ var package_default = {
|
|
|
207
208
|
"sync:presets-rules-matrix": "node scripts/sync-presets-rules-matrix.mjs",
|
|
208
209
|
"sync:readme-rules-table": "node scripts/sync-readme-rules-table.mjs",
|
|
209
210
|
"sync:readme-rules-table:write": "node scripts/sync-readme-rules-table.mjs --write",
|
|
211
|
+
"sync:rules:write": "npm run sync:readme-rules-table:write && npm run sync:presets-rules-matrix",
|
|
210
212
|
pretest: "npm run build",
|
|
211
213
|
test: "vitest run",
|
|
212
214
|
"test:ci": "cross-env CI=true vitest run --reporter=default",
|
|
@@ -230,61 +232,31 @@ var package_default = {
|
|
|
230
232
|
typecheck: "tsc -p tsconfig.json --noEmit && tsc -p tsconfig.build.json --noEmit && tsc -p tsconfig.eslint.json --noEmit && tsc -p tsconfig.js.json --noEmit && npm run --workspace docs/docusaurus typecheck",
|
|
231
233
|
"typecheck:all": "npm run typecheck",
|
|
232
234
|
"types:update": "typesync",
|
|
233
|
-
"update-deps": "npx ncu -i --install never && npm run sync:peer-eslint-range && npm
|
|
235
|
+
"update-deps": "npx ncu -i --install never && npm update --workspaces --force && npm install --force && npm run sync:peer-eslint-range && npm run sync:node-version-files && npm run sync:rules:write",
|
|
234
236
|
"verify:readme-rules-table": "npm run build && npm run sync:readme-rules-table"
|
|
235
237
|
},
|
|
236
238
|
overrides: {
|
|
237
239
|
"jsonc-eslint-parser": "$jsonc-eslint-parser"
|
|
238
240
|
},
|
|
239
241
|
dependencies: {
|
|
240
|
-
"@
|
|
241
|
-
"@
|
|
242
|
-
"@typescript-eslint/utils": "^8.
|
|
242
|
+
"@eslint/json": "^1.2.0",
|
|
243
|
+
"@eslint/markdown": "^8.0.1",
|
|
244
|
+
"@typescript-eslint/type-utils": "^8.59.1",
|
|
245
|
+
"@typescript-eslint/utils": "^8.59.1",
|
|
246
|
+
"ts-extras": "^1.0.0",
|
|
247
|
+
"type-fest": "^5.6.0"
|
|
243
248
|
},
|
|
244
249
|
devDependencies: {
|
|
245
250
|
"@arethetypeswrong/cli": "^0.18.2",
|
|
246
251
|
"@csstools/stylelint-formatter-github": "^2.0.0",
|
|
247
|
-
"@docusaurus/eslint-plugin": "^3.10.0",
|
|
248
252
|
"@double-great/remark-lint-alt-text": "^1.1.1",
|
|
249
|
-
"@double-great/stylelint-a11y": "^3.4.9",
|
|
250
|
-
"@eslint-community/eslint-plugin-eslint-comments": "^4.7.1",
|
|
251
|
-
"@eslint-react/eslint-plugin": "^4.2.3",
|
|
252
253
|
"@eslint/compat": "^2.0.5",
|
|
253
|
-
"@eslint/config-
|
|
254
|
-
"@eslint/config-inspector": "^1.5.0",
|
|
255
|
-
"@eslint/css": "^1.1.0",
|
|
256
|
-
"@eslint/js": "^10.0.1",
|
|
257
|
-
"@eslint/json": "^1.2.0",
|
|
258
|
-
"@eslint/markdown": "^8.0.1",
|
|
259
|
-
"@html-eslint/eslint-plugin": "^0.59.0",
|
|
260
|
-
"@html-eslint/parser": "^0.59.0",
|
|
261
|
-
"@microsoft/eslint-plugin-sdl": "^1.1.0",
|
|
254
|
+
"@eslint/config-inspector": "^2.0.0",
|
|
262
255
|
"@microsoft/tsdoc-config": "^0.18.1",
|
|
263
|
-
"@secretlint/secretlint-rule-anthropic": "^11.6.0",
|
|
264
|
-
"@secretlint/secretlint-rule-aws": "^11.6.0",
|
|
265
|
-
"@secretlint/secretlint-rule-database-connection-string": "^11.6.0",
|
|
266
|
-
"@secretlint/secretlint-rule-gcp": "^11.6.0",
|
|
267
|
-
"@secretlint/secretlint-rule-github": "^11.6.0",
|
|
268
|
-
"@secretlint/secretlint-rule-no-dotenv": "^11.6.0",
|
|
269
|
-
"@secretlint/secretlint-rule-no-homedir": "^11.6.0",
|
|
270
|
-
"@secretlint/secretlint-rule-npm": "^11.6.0",
|
|
271
|
-
"@secretlint/secretlint-rule-openai": "^11.6.0",
|
|
272
|
-
"@secretlint/secretlint-rule-pattern": "^11.6.0",
|
|
273
|
-
"@secretlint/secretlint-rule-preset-recommend": "^11.6.0",
|
|
274
|
-
"@secretlint/secretlint-rule-privatekey": "^11.6.0",
|
|
275
|
-
"@secretlint/secretlint-rule-secp256k1-privatekey": "^11.6.0",
|
|
276
|
-
"@secretlint/types": "^11.6.0",
|
|
277
|
-
"@softonus/prettier-plugin-duplicate-remover": "^1.1.2",
|
|
278
256
|
"@stryker-ignorer/console-all": "^0.3.2",
|
|
279
257
|
"@stryker-mutator/core": "^9.6.1",
|
|
280
258
|
"@stryker-mutator/typescript-checker": "^9.6.1",
|
|
281
259
|
"@stryker-mutator/vitest-runner": "^9.6.1",
|
|
282
|
-
"@stylelint-types/stylelint-order": "^7.0.1",
|
|
283
|
-
"@stylelint-types/stylelint-stylistic": "^5.0.0",
|
|
284
|
-
"@stylistic/eslint-plugin": "^5.10.0",
|
|
285
|
-
"@stylistic/stylelint-plugin": "^5.1.0",
|
|
286
|
-
"@types/eslint-plugin-jsx-a11y": "^6.10.1",
|
|
287
|
-
"@types/eslint-plugin-security": "^3.0.1",
|
|
288
260
|
"@types/htmlhint": "^1.1.5",
|
|
289
261
|
"@types/madge": "^5.0.3",
|
|
290
262
|
"@types/node": "^25.6.0",
|
|
@@ -296,287 +268,76 @@ var package_default = {
|
|
|
296
268
|
"@types/postcss-normalize": "^9.0.4",
|
|
297
269
|
"@types/postcss-reporter": "^7.0.5",
|
|
298
270
|
"@types/sloc": "^0.2.3",
|
|
299
|
-
"@typescript-eslint/
|
|
300
|
-
"@
|
|
301
|
-
"@vitest/
|
|
302
|
-
"@vitest/eslint-plugin": "^1.6.15",
|
|
303
|
-
"@vitest/ui": "^4.1.4",
|
|
271
|
+
"@typescript-eslint/rule-tester": "^8.59.1",
|
|
272
|
+
"@vitest/coverage-v8": "^4.1.5",
|
|
273
|
+
"@vitest/ui": "^4.1.5",
|
|
304
274
|
actionlint: "^2.0.6",
|
|
305
275
|
"all-contributors-cli": "^6.26.1",
|
|
306
276
|
"cognitive-complexity-ts": "^0.8.1",
|
|
307
|
-
commitlint: "^20.5.
|
|
277
|
+
commitlint: "^20.5.3",
|
|
308
278
|
"commitlint-config-gitmoji": "^2.3.1",
|
|
309
279
|
"cross-env": "^10.1.0",
|
|
310
280
|
depcheck: "^1.4.7",
|
|
311
281
|
"detect-secrets": "^1.0.6",
|
|
312
|
-
eslint: "^10.
|
|
313
|
-
"eslint-config-
|
|
314
|
-
"eslint-config-prettier": "^10.1.8",
|
|
282
|
+
eslint: "^10.3.0",
|
|
283
|
+
"eslint-config-nick2bad4u": "^1.0.11",
|
|
315
284
|
"eslint-formatter-unix": "^9.0.1",
|
|
316
|
-
"eslint-import-resolver-typescript": "^4.4.4",
|
|
317
|
-
"eslint-plugin-array-func": "^5.1.1",
|
|
318
|
-
"eslint-plugin-canonical": "^5.1.3",
|
|
319
|
-
"eslint-plugin-case-police": "^2.2.0",
|
|
320
|
-
"eslint-plugin-comment-length": "^2.3.0",
|
|
321
|
-
"eslint-plugin-css-modules": "^2.12.0",
|
|
322
|
-
"eslint-plugin-de-morgan": "^2.1.1",
|
|
323
|
-
"eslint-plugin-depend": "^1.5.0",
|
|
324
|
-
"eslint-plugin-eslint-plugin": "^7.3.2",
|
|
325
|
-
"eslint-plugin-etc": "^2.0.3",
|
|
326
|
-
"eslint-plugin-etc-misc": "^1.0.6",
|
|
327
|
-
"eslint-plugin-file-progress-2": "^5.0.0",
|
|
328
|
-
"eslint-plugin-html": "^8.1.4",
|
|
329
|
-
"eslint-plugin-import-x": "^4.16.2",
|
|
330
|
-
"eslint-plugin-jsdoc": "^62.9.0",
|
|
331
|
-
"eslint-plugin-jsonc": "^3.1.2",
|
|
332
|
-
"eslint-plugin-jsx-a11y": "^6.10.2",
|
|
333
|
-
"eslint-plugin-listeners": "^1.5.1",
|
|
334
|
-
"eslint-plugin-loadable-imports": "^1.0.1",
|
|
335
|
-
"eslint-plugin-math": "^0.13.1",
|
|
336
|
-
"eslint-plugin-module-interop": "^0.3.1",
|
|
337
|
-
"eslint-plugin-n": "^17.24.0",
|
|
338
|
-
"eslint-plugin-nitpick": "^0.12.0",
|
|
339
|
-
"eslint-plugin-no-barrel-files": "^1.3.0",
|
|
340
|
-
"eslint-plugin-no-explicit-type-exports": "^0.12.1",
|
|
341
|
-
"eslint-plugin-no-function-declare-after-return": "^1.1.0",
|
|
342
|
-
"eslint-plugin-no-lookahead-lookbehind-regexp": "^0.4.0",
|
|
343
|
-
"eslint-plugin-no-only-tests": "^3.3.0",
|
|
344
|
-
"eslint-plugin-no-secrets": "^2.3.3",
|
|
345
|
-
"eslint-plugin-no-unsanitized": "^4.1.5",
|
|
346
|
-
"eslint-plugin-no-use-extend-native": "^0.7.2",
|
|
347
|
-
"eslint-plugin-node-dependencies": "^2.2.0",
|
|
348
|
-
"eslint-plugin-package-json": "^0.91.1",
|
|
349
|
-
"eslint-plugin-perfectionist": "^5.8.0",
|
|
350
|
-
"eslint-plugin-prefer-arrow": "^1.2.3",
|
|
351
|
-
"eslint-plugin-prettier": "^5.5.5",
|
|
352
|
-
"eslint-plugin-promise": "^7.2.1",
|
|
353
|
-
"eslint-plugin-redos": "^4.5.0",
|
|
354
|
-
"eslint-plugin-regexp": "^3.1.0",
|
|
355
|
-
"eslint-plugin-require-jsdoc": "^1.0.4",
|
|
356
|
-
"eslint-plugin-security": "^4.0.0",
|
|
357
|
-
"eslint-plugin-sonarjs": "^4.0.2",
|
|
358
|
-
"eslint-plugin-sort-class-members": "^1.22.1",
|
|
359
|
-
"eslint-plugin-testing-library": "^7.16.2",
|
|
360
|
-
"eslint-plugin-toml": "^1.3.1",
|
|
361
|
-
"eslint-plugin-total-functions": "^7.1.0",
|
|
362
|
-
"eslint-plugin-tsdoc": "^0.5.2",
|
|
363
|
-
"eslint-plugin-tsdoc-require-2": "^1.0.9",
|
|
364
|
-
"eslint-plugin-undefined-css-classes": "^0.1.5",
|
|
365
|
-
"eslint-plugin-unicorn": "^64.0.0",
|
|
366
|
-
"eslint-plugin-unused-imports": "^4.4.1",
|
|
367
|
-
"eslint-plugin-write-good-comments": "^0.2.0",
|
|
368
|
-
"eslint-plugin-yml": "^3.3.1",
|
|
369
285
|
"eslint-rule-benchmark": "^0.8.0",
|
|
370
|
-
"fast-check": "^4.
|
|
371
|
-
"git-cliff": "^2.
|
|
286
|
+
"fast-check": "^4.7.0",
|
|
287
|
+
"git-cliff": "^2.13.1",
|
|
372
288
|
"gitleaks-secret-scanner": "^2.1.1",
|
|
373
|
-
globals: "^17.5.0",
|
|
374
289
|
htmlhint: "^1.9.2",
|
|
375
290
|
jscpd: "^4.0.9",
|
|
376
|
-
|
|
377
|
-
knip: "^6.4.0",
|
|
291
|
+
knip: "^6.11.0",
|
|
378
292
|
leasot: "^14.4.0",
|
|
379
293
|
madge: "^8.0.0",
|
|
380
294
|
"markdown-link-check": "^3.14.2",
|
|
381
|
-
"npm-check-updates": "^
|
|
382
|
-
"npm-package-json-lint": "^10.
|
|
295
|
+
"npm-check-updates": "^22.1.0",
|
|
296
|
+
"npm-package-json-lint": "^10.4.0",
|
|
383
297
|
picocolors: "^1.1.1",
|
|
384
|
-
postcss: "^8.5.
|
|
298
|
+
postcss: "^8.5.13",
|
|
385
299
|
"postcss-assets": "^6.0.0",
|
|
386
300
|
"postcss-clamp": "^4.1.0",
|
|
387
301
|
"postcss-combine-duplicated-selectors": "^10.0.3",
|
|
388
302
|
"postcss-flexbugs-fixes": "^5.0.2",
|
|
389
|
-
"postcss-html": "^1.8.1",
|
|
390
303
|
"postcss-import": "^16.1.1",
|
|
391
304
|
"postcss-inline-svg": "^6.0.0",
|
|
392
305
|
"postcss-logical": "^9.0.0",
|
|
393
306
|
"postcss-normalize": "^13.0.1",
|
|
394
307
|
"postcss-reporter": "^7.1.0",
|
|
395
308
|
"postcss-round-subpixels": "^2.0.0",
|
|
396
|
-
"postcss-
|
|
397
|
-
"postcss-sort-media-queries": "^6.4.4",
|
|
398
|
-
"postcss-styled-jsx": "^1.0.1",
|
|
399
|
-
"postcss-styled-syntax": "^0.7.1",
|
|
309
|
+
"postcss-sort-media-queries": "^6.5.0",
|
|
400
310
|
"postcss-viewport-height-correction": "^1.1.1",
|
|
401
|
-
prettier: "^3.8.
|
|
402
|
-
"prettier-
|
|
403
|
-
"prettier-plugin-interpolated-html-tags": "^2.0.1",
|
|
404
|
-
"prettier-plugin-jsdoc": "^1.8.0",
|
|
405
|
-
"prettier-plugin-jsdoc-type": "^0.2.0",
|
|
406
|
-
"prettier-plugin-merge": "^0.10.1",
|
|
407
|
-
"prettier-plugin-multiline-arrays": "^4.1.5",
|
|
408
|
-
"prettier-plugin-packagejson": "^3.0.2",
|
|
409
|
-
"prettier-plugin-properties": "^0.3.1",
|
|
410
|
-
"prettier-plugin-sort-json": "^4.2.0",
|
|
411
|
-
"prettier-plugin-toml": "^2.0.6",
|
|
311
|
+
prettier: "^3.8.3",
|
|
312
|
+
"prettier-config-nick2bad4u": "^1.0.9",
|
|
412
313
|
publint: "^0.3.18",
|
|
413
|
-
"recheck-jar": "^4.5.0",
|
|
414
314
|
"rehype-katex": "^7.0.1",
|
|
415
315
|
remark: "^15.0.1",
|
|
416
316
|
"remark-cli": "^12.0.1",
|
|
417
|
-
"remark-
|
|
418
|
-
"remark-frontmatter": "^5.0.0",
|
|
419
|
-
"remark-gfm": "^4.0.1",
|
|
420
|
-
"remark-ignore": "^3.0.0",
|
|
421
|
-
"remark-inline-links": "^7.0.0",
|
|
422
|
-
"remark-lint": "^10.0.1",
|
|
423
|
-
"remark-lint-blockquote-indentation": "^4.0.1",
|
|
424
|
-
"remark-lint-check-toc": "^1.0.0",
|
|
425
|
-
"remark-lint-checkbox-character-style": "^5.0.1",
|
|
426
|
-
"remark-lint-checkbox-content-indent": "^5.0.1",
|
|
427
|
-
"remark-lint-code-block-split-list": "^1.0.0",
|
|
428
|
-
"remark-lint-code-block-style": "^4.0.1",
|
|
429
|
-
"remark-lint-correct-media-syntax": "^1.0.1",
|
|
430
|
-
"remark-lint-definition-case": "^4.0.1",
|
|
431
|
-
"remark-lint-definition-sort": "^1.0.1",
|
|
432
|
-
"remark-lint-definition-spacing": "^4.0.1",
|
|
433
|
-
"remark-lint-directive-attribute-sort": "^1.0.1",
|
|
434
|
-
"remark-lint-directive-collapsed-attribute": "^1.0.1",
|
|
435
|
-
"remark-lint-directive-quote-style": "^1.0.1",
|
|
436
|
-
"remark-lint-directive-shortcut-attribute": "^1.0.1",
|
|
437
|
-
"remark-lint-directive-unique-attribute-name": "^1.0.1",
|
|
438
|
-
"remark-lint-emphasis-marker": "^4.0.1",
|
|
439
|
-
"remark-lint-fenced-code-flag": "^4.2.0",
|
|
440
|
-
"remark-lint-fenced-code-flag-case": "^3.0.0",
|
|
441
|
-
"remark-lint-fenced-code-marker": "^4.0.1",
|
|
442
|
-
"remark-lint-file-extension": "^3.0.1",
|
|
443
|
-
"remark-lint-final-definition": "^4.0.2",
|
|
444
|
-
"remark-lint-final-newline": "^3.0.1",
|
|
445
|
-
"remark-lint-first-heading-level": "^4.0.1",
|
|
446
|
-
"remark-lint-frontmatter-schema": "^3.15.4",
|
|
447
|
-
"remark-lint-hard-break-spaces": "^4.1.1",
|
|
448
|
-
"remark-lint-heading-capitalization": "^1.3.0",
|
|
449
|
-
"remark-lint-heading-increment": "^4.0.1",
|
|
450
|
-
"remark-lint-heading-style": "^4.0.1",
|
|
451
|
-
"remark-lint-heading-whitespace": "^1.0.0",
|
|
452
|
-
"remark-lint-linebreak-style": "^4.0.1",
|
|
453
|
-
"remark-lint-link-title-style": "^4.0.1",
|
|
454
|
-
"remark-lint-list-item-bullet-indent": "^5.0.1",
|
|
455
|
-
"remark-lint-list-item-content-indent": "^4.0.1",
|
|
456
|
-
"remark-lint-list-item-indent": "^4.0.1",
|
|
457
|
-
"remark-lint-list-item-spacing": "^5.0.1",
|
|
458
|
-
"remark-lint-maximum-heading-length": "^4.1.1",
|
|
459
|
-
"remark-lint-maximum-line-length": "^4.1.1",
|
|
460
|
-
"remark-lint-mdx-jsx-attribute-sort": "^1.0.1",
|
|
461
|
-
"remark-lint-mdx-jsx-no-void-children": "^1.0.1",
|
|
462
|
-
"remark-lint-mdx-jsx-quote-style": "^1.0.1",
|
|
463
|
-
"remark-lint-mdx-jsx-self-close": "^1.0.1",
|
|
464
|
-
"remark-lint-mdx-jsx-shorthand-attribute": "^1.0.1",
|
|
465
|
-
"remark-lint-mdx-jsx-unique-attribute-name": "^1.0.1",
|
|
466
|
-
"remark-lint-media-style": "^1.0.1",
|
|
467
|
-
"remark-lint-no-blockquote-without-marker": "^6.0.1",
|
|
468
|
-
"remark-lint-no-consecutive-blank-lines": "^5.0.1",
|
|
469
|
-
"remark-lint-no-dead-urls": "^2.0.1",
|
|
470
|
-
"remark-lint-no-duplicate-defined-urls": "^3.0.1",
|
|
471
|
-
"remark-lint-no-duplicate-definitions": "^4.0.1",
|
|
472
|
-
"remark-lint-no-duplicate-headings": "^4.0.1",
|
|
473
|
-
"remark-lint-no-duplicate-headings-in-section": "^4.0.1",
|
|
474
|
-
"remark-lint-no-emphasis-as-heading": "^4.0.1",
|
|
475
|
-
"remark-lint-no-empty-sections": "^4.0.0",
|
|
476
|
-
"remark-lint-no-empty-url": "^4.0.1",
|
|
477
|
-
"remark-lint-no-file-name-articles": "^3.0.1",
|
|
478
|
-
"remark-lint-no-file-name-consecutive-dashes": "^3.0.1",
|
|
479
|
-
"remark-lint-no-file-name-irregular-characters": "^3.0.1",
|
|
480
|
-
"remark-lint-no-file-name-mixed-case": "^3.0.1",
|
|
481
|
-
"remark-lint-no-file-name-outer-dashes": "^3.0.1",
|
|
482
|
-
"remark-lint-no-heading-content-indent": "^5.0.1",
|
|
483
|
-
"remark-lint-no-heading-indent": "^5.0.1",
|
|
484
|
-
"remark-lint-no-heading-like-paragraph": "^4.0.1",
|
|
485
|
-
"remark-lint-no-heading-punctuation": "^4.0.1",
|
|
486
|
-
"remark-lint-no-hidden-table-cell": "^1.0.1",
|
|
487
|
-
"remark-lint-no-html": "^4.0.1",
|
|
488
|
-
"remark-lint-no-literal-urls": "^4.0.1",
|
|
489
|
-
"remark-lint-no-missing-blank-lines": "^4.0.1",
|
|
490
|
-
"remark-lint-no-multiple-toplevel-headings": "^4.0.1",
|
|
491
|
-
"remark-lint-no-paragraph-content-indent": "^5.0.1",
|
|
492
|
-
"remark-lint-no-reference-like-url": "^4.0.1",
|
|
493
|
-
"remark-lint-no-shell-dollars": "^4.0.1",
|
|
494
|
-
"remark-lint-no-shortcut-reference-image": "^4.0.1",
|
|
495
|
-
"remark-lint-no-shortcut-reference-link": "^4.0.1",
|
|
496
|
-
"remark-lint-no-table-indentation": "^5.0.1",
|
|
497
|
-
"remark-lint-no-tabs": "^4.0.1",
|
|
498
|
-
"remark-lint-no-undefined-references": "^5.0.2",
|
|
499
|
-
"remark-lint-no-unneeded-full-reference-image": "^4.0.1",
|
|
500
|
-
"remark-lint-no-unneeded-full-reference-link": "^4.0.1",
|
|
501
|
-
"remark-lint-no-unused-definitions": "^4.0.2",
|
|
502
|
-
"remark-lint-ordered-list-marker-style": "^4.0.1",
|
|
503
|
-
"remark-lint-ordered-list-marker-value": "^4.0.1",
|
|
504
|
-
"remark-lint-rule-style": "^4.0.1",
|
|
505
|
-
"remark-lint-strikethrough-marker": "^3.0.1",
|
|
506
|
-
"remark-lint-strong-marker": "^4.0.1",
|
|
507
|
-
"remark-lint-table-cell-padding": "^5.1.1",
|
|
508
|
-
"remark-lint-table-pipe-alignment": "^4.1.1",
|
|
509
|
-
"remark-lint-table-pipes": "^5.0.1",
|
|
510
|
-
"remark-lint-unordered-list-marker-style": "^4.0.1",
|
|
511
|
-
"remark-lint-write-good": "^1.2.0",
|
|
512
|
-
"remark-math": "^6.0.0",
|
|
513
|
-
"remark-preset-lint-consistent": "^6.0.1",
|
|
514
|
-
"remark-preset-lint-markdown-style-guide": "^6.0.1",
|
|
515
|
-
"remark-preset-lint-recommended": "^7.0.1",
|
|
516
|
-
"remark-preset-prettier": "^2.0.2",
|
|
517
|
-
"remark-toc": "^9.0.0",
|
|
518
|
-
"remark-validate-links": "^13.1.0",
|
|
519
|
-
"remark-wiki-link": "^2.0.1",
|
|
317
|
+
"remark-config-nick2bad4u": "^1.0.1",
|
|
520
318
|
rimraf: "^6.1.3",
|
|
521
|
-
secretlint: "^
|
|
319
|
+
secretlint: "^12.3.1",
|
|
320
|
+
"secretlint-config-nick2bad4u": "^1.0.3",
|
|
522
321
|
sloc: "^0.3.2",
|
|
523
322
|
"sort-package-json": "^3.6.1",
|
|
524
|
-
stylelint: "^17.
|
|
525
|
-
"stylelint-
|
|
526
|
-
"stylelint-checkstyle-formatter": "^0.1.2",
|
|
527
|
-
"stylelint-codeframe-formatter": "^1.2.0",
|
|
528
|
-
"stylelint-config-alphabetical-order": "^2.0.0",
|
|
529
|
-
"stylelint-config-idiomatic-order": "^10.0.0",
|
|
530
|
-
"stylelint-config-inspector": "^2.0.3",
|
|
531
|
-
"stylelint-config-recess-order": "^7.7.0",
|
|
532
|
-
"stylelint-config-recommended": "^18.0.0",
|
|
533
|
-
"stylelint-config-sass-guidelines": "^13.0.0",
|
|
534
|
-
"stylelint-config-standard": "^40.0.0",
|
|
535
|
-
"stylelint-config-standard-scss": "^17.0.0",
|
|
536
|
-
"stylelint-config-tailwindcss": "^1.0.1",
|
|
537
|
-
"stylelint-declaration-block-no-ignored-properties": "^3.0.0",
|
|
538
|
-
"stylelint-declaration-strict-value": "^1.11.1",
|
|
539
|
-
"stylelint-define-config": "^17.5.0",
|
|
540
|
-
"stylelint-find-new-rules": "^6.0.0",
|
|
541
|
-
"stylelint-formatter-gitlab-code-quality-report": "^1.1.0",
|
|
542
|
-
"stylelint-formatter-pretty": "^4.0.1",
|
|
543
|
-
"stylelint-gamut": "^2.0.0",
|
|
544
|
-
"stylelint-group-selectors": "^1.0.10",
|
|
545
|
-
"stylelint-high-performance-animation": "^2.0.0",
|
|
546
|
-
"stylelint-media-use-custom-media": "^4.1.0",
|
|
547
|
-
"stylelint-no-browser-hacks": "^2.0.0",
|
|
548
|
-
"stylelint-no-indistinguishable-colors": "^2.3.1",
|
|
549
|
-
"stylelint-no-restricted-syntax": "^2.2.1",
|
|
550
|
-
"stylelint-no-unresolved-module": "^2.5.2",
|
|
551
|
-
"stylelint-no-unsupported-browser-features": "^8.1.1",
|
|
552
|
-
"stylelint-order": "^8.1.1",
|
|
553
|
-
"stylelint-plugin-defensive-css": "^2.9.0",
|
|
554
|
-
"stylelint-plugin-logical-css": "^2.1.0",
|
|
555
|
-
"stylelint-plugin-use-baseline": "^1.4.1",
|
|
556
|
-
"stylelint-prettier": "^5.0.3",
|
|
557
|
-
"stylelint-react-native": "^2.7.0",
|
|
558
|
-
"stylelint-scales": "^5.0.0",
|
|
559
|
-
"stylelint-selector-bem-pattern": "^4.0.1",
|
|
560
|
-
"stylelint-use-nesting": "^6.0.2",
|
|
561
|
-
"stylelint-value-no-unknown-custom-properties": "^6.1.1",
|
|
562
|
-
"toml-eslint-parser": "^1.0.3",
|
|
323
|
+
stylelint: "^17.10.0",
|
|
324
|
+
"stylelint-config-nick2bad4u": "^1.0.5",
|
|
563
325
|
"ts-unused-exports": "^11.0.1",
|
|
564
326
|
typedoc: "^0.28.19",
|
|
565
|
-
typescript: "^6.0.
|
|
566
|
-
"typescript-eslint": "^8.
|
|
327
|
+
typescript: "^6.0.3",
|
|
328
|
+
"typescript-eslint": "^8.59.1",
|
|
567
329
|
typesync: "^0.14.3",
|
|
568
330
|
vfile: "^6.0.3",
|
|
569
|
-
vite: "^8.0.
|
|
331
|
+
vite: "^8.0.10",
|
|
570
332
|
"vite-tsconfig-paths": "^6.1.1",
|
|
571
|
-
vitest: "^4.1.
|
|
572
|
-
"yaml-eslint-parser": "^2.0.0",
|
|
333
|
+
vitest: "^4.1.5",
|
|
573
334
|
"yamllint-js": "^0.2.4"
|
|
574
335
|
},
|
|
575
336
|
peerDependencies: {
|
|
576
|
-
eslint: "^9.0.0 || ^10.
|
|
337
|
+
eslint: "^9.0.0 || ^10.3.0",
|
|
577
338
|
typescript: ">=5.0.0"
|
|
578
339
|
},
|
|
579
|
-
packageManager: "npm@11.
|
|
340
|
+
packageManager: "npm@11.13.0",
|
|
580
341
|
engines: {
|
|
581
342
|
node: ">=22.0.0"
|
|
582
343
|
},
|
|
@@ -600,6 +361,7 @@ var package_default = {
|
|
|
600
361
|
};
|
|
601
362
|
|
|
602
363
|
// dist/_internal/copilot-config-references.js
|
|
364
|
+
var import_ts_extras = require("ts-extras");
|
|
603
365
|
var copilotConfigMetadataByName = {
|
|
604
366
|
all: {
|
|
605
367
|
icon: "\u{1F7E3}",
|
|
@@ -630,6 +392,7 @@ var copilotConfigMetadataByName = {
|
|
|
630
392
|
// dist/_internal/copilot-file-kind.js
|
|
631
393
|
var fs = __toESM(require("node:fs"), 1);
|
|
632
394
|
var path = __toESM(require("node:path"), 1);
|
|
395
|
+
var import_ts_extras2 = require("ts-extras");
|
|
633
396
|
var normalizeFilePath = (filePath) => path.resolve(filePath).replaceAll("\\", "/");
|
|
634
397
|
var isLegacyChatmodeFilePath = (filePath) => {
|
|
635
398
|
const normalizedFilePath = normalizeFilePath(filePath);
|
|
@@ -689,11 +452,11 @@ var getCopilotFileKind = (filePath) => {
|
|
|
689
452
|
};
|
|
690
453
|
var findRepositoryRoot = (filePath) => {
|
|
691
454
|
const normalizedFilePath = path.resolve(filePath);
|
|
692
|
-
const pathSegments = normalizeFilePath(normalizedFilePath)
|
|
455
|
+
const pathSegments = (0, import_ts_extras2.stringSplit)(normalizeFilePath(normalizedFilePath), "/");
|
|
693
456
|
const githubDirectoryIndex = pathSegments.lastIndexOf(".github");
|
|
694
457
|
if (githubDirectoryIndex > 0) {
|
|
695
458
|
const rootSegments = pathSegments.slice(0, githubDirectoryIndex);
|
|
696
|
-
const candidateRoot =
|
|
459
|
+
const candidateRoot = (0, import_ts_extras2.arrayJoin)(rootSegments, path.sep);
|
|
697
460
|
if (candidateRoot.length > 0) {
|
|
698
461
|
return candidateRoot;
|
|
699
462
|
}
|
|
@@ -725,6 +488,7 @@ var getRepositoryInstructionsPaths = (filePath) => {
|
|
|
725
488
|
var import_utils = require("@typescript-eslint/utils");
|
|
726
489
|
|
|
727
490
|
// dist/_internal/rule-catalog.js
|
|
491
|
+
var import_ts_extras3 = require("ts-extras");
|
|
728
492
|
var orderedRuleNames = [
|
|
729
493
|
"require-instructions-apply-to",
|
|
730
494
|
"require-prompt-file-metadata",
|
|
@@ -808,9 +572,7 @@ var copilotRuleCatalogEntries = orderedRuleNames.map((ruleName, index) => {
|
|
|
808
572
|
var copilotRuleCatalogByRuleName = new Map(copilotRuleCatalogEntries.map((entry) => [entry.ruleName, entry]));
|
|
809
573
|
var getRuleCatalogEntryForRuleName = (ruleName) => {
|
|
810
574
|
const entry = copilotRuleCatalogByRuleName.get(ruleName);
|
|
811
|
-
|
|
812
|
-
throw new TypeError(`Rule '${ruleName}' is missing from the stable rule catalog.`);
|
|
813
|
-
}
|
|
575
|
+
(0, import_ts_extras3.assertDefined)(entry);
|
|
814
576
|
return entry;
|
|
815
577
|
};
|
|
816
578
|
|
|
@@ -869,6 +631,7 @@ var createCopilotRule = (ruleDefinition) => {
|
|
|
869
631
|
};
|
|
870
632
|
|
|
871
633
|
// dist/_internal/frontmatter.js
|
|
634
|
+
var import_ts_extras4 = require("ts-extras");
|
|
872
635
|
var isAsciiLetter = (character) => character >= "A" && character <= "Z" || character >= "a" && character <= "z";
|
|
873
636
|
var isYamlIdentifierCharacter = (character) => isAsciiLetter(character) || character >= "0" && character <= "9" || character === "-";
|
|
874
637
|
var isSupportedFrontmatterFieldName = (value) => {
|
|
@@ -984,12 +747,15 @@ var stripQuotes = (value) => {
|
|
|
984
747
|
function normalizeScalarValue(value) {
|
|
985
748
|
return stripQuotes(value.trim()).trim();
|
|
986
749
|
}
|
|
987
|
-
var
|
|
750
|
+
var withObjectEntryField = (target, source) => {
|
|
988
751
|
const property = parseFieldLine(source.trim());
|
|
989
752
|
if (property === null) {
|
|
990
|
-
return;
|
|
753
|
+
return { ...target };
|
|
991
754
|
}
|
|
992
|
-
|
|
755
|
+
return {
|
|
756
|
+
...target,
|
|
757
|
+
[property.key]: normalizeScalarValue(property.value)
|
|
758
|
+
};
|
|
993
759
|
};
|
|
994
760
|
var parseInlineList = (value) => {
|
|
995
761
|
const trimmedValue = value.trim();
|
|
@@ -1000,7 +766,7 @@ var parseInlineList = (value) => {
|
|
|
1000
766
|
if (innerValue.length === 0) {
|
|
1001
767
|
return [];
|
|
1002
768
|
}
|
|
1003
|
-
return
|
|
769
|
+
return (0, import_ts_extras4.stringSplit)(innerValue, ",").map((item) => normalizeScalarValue(item)).filter((item) => item.length > 0);
|
|
1004
770
|
};
|
|
1005
771
|
var parseBlockList = (lines) => lines.map((line) => {
|
|
1006
772
|
const trimmedLine = line.trim();
|
|
@@ -1010,7 +776,7 @@ var parseBlockList = (lines) => lines.map((line) => {
|
|
|
1010
776
|
return normalizeScalarValue(trimmedLine.slice(1));
|
|
1011
777
|
}).filter((value) => value.length > 0);
|
|
1012
778
|
var parseFrontmatterFields = (content) => {
|
|
1013
|
-
const lines = content.replaceAll("\r\n", "\n")
|
|
779
|
+
const lines = (0, import_ts_extras4.stringSplit)(content.replaceAll("\r\n", "\n"), "\n");
|
|
1014
780
|
const fields = /* @__PURE__ */ new Map();
|
|
1015
781
|
let index = 0;
|
|
1016
782
|
while (index < lines.length) {
|
|
@@ -1092,134 +858,145 @@ var getFrontmatterList = (document, key) => {
|
|
|
1092
858
|
return field?.kind === "list" && field.values.length > 0 ? field.values : void 0;
|
|
1093
859
|
};
|
|
1094
860
|
var hasFrontmatterField = (document, key) => document.fields.has(key);
|
|
1095
|
-
var
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
const currentLine = lines[index] ?? "";
|
|
861
|
+
var getFrontmatterContentLines = (document) => (0, import_ts_extras4.stringSplit)(document.content.replaceAll("\r\n", "\n"), "\n");
|
|
862
|
+
var getTopLevelFrontmatterFieldBlock = (document, key) => {
|
|
863
|
+
const lines = getFrontmatterContentLines(document);
|
|
864
|
+
for (const [index, currentLine] of lines.entries()) {
|
|
1100
865
|
if (currentLine.startsWith(" ") || currentLine.startsWith(" ")) {
|
|
1101
|
-
index += 1;
|
|
1102
866
|
continue;
|
|
1103
867
|
}
|
|
1104
868
|
const field = parseFieldLine(currentLine.trimEnd());
|
|
1105
|
-
if (field
|
|
1106
|
-
index += 1;
|
|
1107
|
-
continue;
|
|
1108
|
-
}
|
|
1109
|
-
if (field.key !== key) {
|
|
1110
|
-
index += 1;
|
|
869
|
+
if (field?.key !== key) {
|
|
1111
870
|
continue;
|
|
1112
871
|
}
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
}
|
|
1117
|
-
if (rawValue.length > 0) {
|
|
1118
|
-
return void 0;
|
|
1119
|
-
}
|
|
1120
|
-
const { blockLines } = collectIndentedBlockLines(lines, index + 1);
|
|
1121
|
-
const entries = [];
|
|
1122
|
-
let currentEntry = null;
|
|
1123
|
-
for (const blockLine of blockLines) {
|
|
1124
|
-
const trimmedLine = blockLine.trim();
|
|
1125
|
-
if (trimmedLine.startsWith("-")) {
|
|
1126
|
-
if (currentEntry !== null) {
|
|
1127
|
-
entries.push(currentEntry);
|
|
1128
|
-
}
|
|
1129
|
-
currentEntry = {};
|
|
1130
|
-
const inlineProperty = trimmedLine.slice(1).trim();
|
|
1131
|
-
if (inlineProperty.length > 0) {
|
|
1132
|
-
setObjectEntryField(currentEntry, inlineProperty);
|
|
1133
|
-
}
|
|
1134
|
-
continue;
|
|
1135
|
-
}
|
|
1136
|
-
if (currentEntry === null) {
|
|
1137
|
-
continue;
|
|
1138
|
-
}
|
|
1139
|
-
setObjectEntryField(currentEntry, trimmedLine);
|
|
1140
|
-
}
|
|
1141
|
-
if (currentEntry !== null) {
|
|
1142
|
-
entries.push(currentEntry);
|
|
1143
|
-
}
|
|
1144
|
-
return entries;
|
|
872
|
+
return {
|
|
873
|
+
blockLines: collectIndentedBlockLines(lines, index + 1).blockLines,
|
|
874
|
+
rawValue: field.value.trim()
|
|
875
|
+
};
|
|
1145
876
|
}
|
|
1146
877
|
return void 0;
|
|
1147
878
|
};
|
|
1148
|
-
var
|
|
1149
|
-
const
|
|
1150
|
-
let
|
|
1151
|
-
|
|
1152
|
-
const
|
|
1153
|
-
if (
|
|
1154
|
-
|
|
879
|
+
var parseFrontmatterObjectListEntries = (blockLines) => {
|
|
880
|
+
const entries = [];
|
|
881
|
+
let currentEntry = null;
|
|
882
|
+
for (const blockLine of blockLines) {
|
|
883
|
+
const trimmedLine = blockLine.trim();
|
|
884
|
+
if (trimmedLine.startsWith("-")) {
|
|
885
|
+
if (currentEntry !== null) {
|
|
886
|
+
entries.push(currentEntry);
|
|
887
|
+
}
|
|
888
|
+
const inlineProperty = trimmedLine.slice(1).trim();
|
|
889
|
+
currentEntry = inlineProperty.length === 0 ? {} : withObjectEntryField({}, inlineProperty);
|
|
1155
890
|
continue;
|
|
1156
891
|
}
|
|
1157
|
-
|
|
1158
|
-
if (field === null) {
|
|
1159
|
-
index += 1;
|
|
892
|
+
if (currentEntry === null) {
|
|
1160
893
|
continue;
|
|
1161
894
|
}
|
|
1162
|
-
|
|
1163
|
-
|
|
895
|
+
currentEntry = withObjectEntryField(currentEntry, trimmedLine);
|
|
896
|
+
}
|
|
897
|
+
if (currentEntry !== null) {
|
|
898
|
+
entries.push(currentEntry);
|
|
899
|
+
}
|
|
900
|
+
return entries;
|
|
901
|
+
};
|
|
902
|
+
var flushGroupedObjectListEntry = (groups, state) => {
|
|
903
|
+
if (state.currentGroupName === null || state.currentEntry === null) {
|
|
904
|
+
return state;
|
|
905
|
+
}
|
|
906
|
+
const groupEntries = groups.get(state.currentGroupName) ?? [];
|
|
907
|
+
groupEntries.push(state.currentEntry);
|
|
908
|
+
groups.set(state.currentGroupName, groupEntries);
|
|
909
|
+
return {
|
|
910
|
+
...state,
|
|
911
|
+
currentEntry: null
|
|
912
|
+
};
|
|
913
|
+
};
|
|
914
|
+
var isGroupedObjectListHeaderLine = (indentationWidth, trimmedLine) => !trimmedLine.startsWith("-") && indentationWidth <= 4;
|
|
915
|
+
var createGroupedObjectListEntry = (trimmedLine) => {
|
|
916
|
+
const inlineProperty = trimmedLine.slice(1).trim();
|
|
917
|
+
return inlineProperty.length === 0 ? {} : withObjectEntryField({}, inlineProperty);
|
|
918
|
+
};
|
|
919
|
+
var handleGroupedObjectListHeaderLine = (groups, state, trimmedLine) => {
|
|
920
|
+
const flushedState = flushGroupedObjectListEntry(groups, state);
|
|
921
|
+
const groupField = parseFieldLine(trimmedLine);
|
|
922
|
+
if (groupField === null) {
|
|
923
|
+
return {
|
|
924
|
+
...flushedState,
|
|
925
|
+
currentGroupName: null
|
|
926
|
+
};
|
|
927
|
+
}
|
|
928
|
+
groups.set(groupField.key, groups.get(groupField.key) ?? []);
|
|
929
|
+
return {
|
|
930
|
+
...flushedState,
|
|
931
|
+
currentGroupName: groupField.key
|
|
932
|
+
};
|
|
933
|
+
};
|
|
934
|
+
var handleGroupedObjectListEntryStartLine = (groups, state, trimmedLine) => {
|
|
935
|
+
const flushedState = flushGroupedObjectListEntry(groups, state);
|
|
936
|
+
if (flushedState.currentGroupName === null) {
|
|
937
|
+
return flushedState;
|
|
938
|
+
}
|
|
939
|
+
return {
|
|
940
|
+
...flushedState,
|
|
941
|
+
currentEntry: createGroupedObjectListEntry(trimmedLine)
|
|
942
|
+
};
|
|
943
|
+
};
|
|
944
|
+
var handleGroupedObjectListPropertyLine = (state, trimmedLine) => {
|
|
945
|
+
if (state.currentEntry === null) {
|
|
946
|
+
return state;
|
|
947
|
+
}
|
|
948
|
+
return {
|
|
949
|
+
...state,
|
|
950
|
+
currentEntry: withObjectEntryField(state.currentEntry, trimmedLine)
|
|
951
|
+
};
|
|
952
|
+
};
|
|
953
|
+
var parseFrontmatterObjectListGroups = (blockLines) => {
|
|
954
|
+
const groups = /* @__PURE__ */ new Map();
|
|
955
|
+
let state = {
|
|
956
|
+
currentEntry: null,
|
|
957
|
+
currentGroupName: null
|
|
958
|
+
};
|
|
959
|
+
for (const blockLine of blockLines) {
|
|
960
|
+
const indentationWidth = getIndentationWidth(blockLine);
|
|
961
|
+
const trimmedLine = blockLine.trim();
|
|
962
|
+
if (trimmedLine.length === 0) {
|
|
1164
963
|
continue;
|
|
1165
964
|
}
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
965
|
+
if (isGroupedObjectListHeaderLine(indentationWidth, trimmedLine)) {
|
|
966
|
+
state = handleGroupedObjectListHeaderLine(groups, state, trimmedLine);
|
|
967
|
+
continue;
|
|
1169
968
|
}
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
let currentEntry = null;
|
|
1174
|
-
const flushCurrentEntry = () => {
|
|
1175
|
-
if (currentGroupName === null || currentEntry === null) {
|
|
1176
|
-
return;
|
|
1177
|
-
}
|
|
1178
|
-
const groupEntries = groups.get(currentGroupName) ?? [];
|
|
1179
|
-
groupEntries.push(currentEntry);
|
|
1180
|
-
groups.set(currentGroupName, groupEntries);
|
|
1181
|
-
currentEntry = null;
|
|
1182
|
-
};
|
|
1183
|
-
for (const blockLine of blockLines) {
|
|
1184
|
-
const indentationWidth = getIndentationWidth(blockLine);
|
|
1185
|
-
const trimmedLine = blockLine.trim();
|
|
1186
|
-
if (trimmedLine.length === 0) {
|
|
1187
|
-
continue;
|
|
1188
|
-
}
|
|
1189
|
-
if (!trimmedLine.startsWith("-") && indentationWidth <= 4) {
|
|
1190
|
-
flushCurrentEntry();
|
|
1191
|
-
const groupField = parseFieldLine(trimmedLine);
|
|
1192
|
-
if (groupField === null) {
|
|
1193
|
-
currentGroupName = null;
|
|
1194
|
-
continue;
|
|
1195
|
-
}
|
|
1196
|
-
currentGroupName = groupField.key;
|
|
1197
|
-
if (currentGroupName !== null && !groups.has(currentGroupName)) {
|
|
1198
|
-
groups.set(currentGroupName, []);
|
|
1199
|
-
}
|
|
1200
|
-
continue;
|
|
1201
|
-
}
|
|
1202
|
-
if (trimmedLine.startsWith("-")) {
|
|
1203
|
-
flushCurrentEntry();
|
|
1204
|
-
if (currentGroupName === null) {
|
|
1205
|
-
continue;
|
|
1206
|
-
}
|
|
1207
|
-
currentEntry = {};
|
|
1208
|
-
const inlineProperty = trimmedLine.slice(1).trim();
|
|
1209
|
-
if (inlineProperty.length > 0) {
|
|
1210
|
-
setObjectEntryField(currentEntry, inlineProperty);
|
|
1211
|
-
}
|
|
1212
|
-
continue;
|
|
1213
|
-
}
|
|
1214
|
-
if (currentEntry === null) {
|
|
1215
|
-
continue;
|
|
1216
|
-
}
|
|
1217
|
-
setObjectEntryField(currentEntry, trimmedLine);
|
|
969
|
+
if (trimmedLine.startsWith("-")) {
|
|
970
|
+
state = handleGroupedObjectListEntryStartLine(groups, state, trimmedLine);
|
|
971
|
+
continue;
|
|
1218
972
|
}
|
|
1219
|
-
|
|
1220
|
-
return groups;
|
|
973
|
+
state = handleGroupedObjectListPropertyLine(state, trimmedLine);
|
|
1221
974
|
}
|
|
1222
|
-
|
|
975
|
+
flushGroupedObjectListEntry(groups, state);
|
|
976
|
+
return groups;
|
|
977
|
+
};
|
|
978
|
+
var getFrontmatterObjectList = (document, key) => {
|
|
979
|
+
const fieldBlock = getTopLevelFrontmatterFieldBlock(document, key);
|
|
980
|
+
if (!(0, import_ts_extras4.isDefined)(fieldBlock)) {
|
|
981
|
+
return void 0;
|
|
982
|
+
}
|
|
983
|
+
if (fieldBlock.rawValue === "[]") {
|
|
984
|
+
return [];
|
|
985
|
+
}
|
|
986
|
+
if (fieldBlock.rawValue.length > 0) {
|
|
987
|
+
return void 0;
|
|
988
|
+
}
|
|
989
|
+
return parseFrontmatterObjectListEntries(fieldBlock.blockLines);
|
|
990
|
+
};
|
|
991
|
+
var getFrontmatterObjectListGroups = (document, key) => {
|
|
992
|
+
const fieldBlock = getTopLevelFrontmatterFieldBlock(document, key);
|
|
993
|
+
if (!(0, import_ts_extras4.isDefined)(fieldBlock)) {
|
|
994
|
+
return void 0;
|
|
995
|
+
}
|
|
996
|
+
if (fieldBlock.rawValue.length > 0) {
|
|
997
|
+
return void 0;
|
|
998
|
+
}
|
|
999
|
+
return parseFrontmatterObjectListGroups(fieldBlock.blockLines);
|
|
1223
1000
|
};
|
|
1224
1001
|
var getMeaningfulMarkdownBody = (text) => stripHtmlComments(text).trim();
|
|
1225
1002
|
|
|
@@ -1269,7 +1046,8 @@ var noBlankCustomizationBodyRule = createCopilotRule({
|
|
|
1269
1046
|
description: "disallow blank bodies in Copilot customization files other than repository-wide instructions.",
|
|
1270
1047
|
frozen: false,
|
|
1271
1048
|
recommended: true,
|
|
1272
|
-
requiresTypeChecking: false
|
|
1049
|
+
requiresTypeChecking: false,
|
|
1050
|
+
url: createRuleDocsUrl("no-blank-customization-body")
|
|
1273
1051
|
},
|
|
1274
1052
|
messages: {
|
|
1275
1053
|
blankBody: "Copilot customization files should include meaningful Markdown instructions in the document body, not only frontmatter or comments."
|
|
@@ -1309,7 +1087,8 @@ var noBlankRepositoryInstructionsRule = createCopilotRule({
|
|
|
1309
1087
|
description: "disallow empty repository-wide Copilot instructions files.",
|
|
1310
1088
|
frozen: false,
|
|
1311
1089
|
recommended: true,
|
|
1312
|
-
requiresTypeChecking: false
|
|
1090
|
+
requiresTypeChecking: false,
|
|
1091
|
+
url: createRuleDocsUrl("no-blank-repository-instructions")
|
|
1313
1092
|
},
|
|
1314
1093
|
messages: {
|
|
1315
1094
|
blankInstructions: "Repository-wide Copilot instructions should contain actionable Markdown guidance instead of being blank."
|
|
@@ -1349,7 +1128,8 @@ var noBlankSkillBodyRule = createCopilotRule({
|
|
|
1349
1128
|
description: "disallow blank Copilot skill definition bodies.",
|
|
1350
1129
|
frozen: false,
|
|
1351
1130
|
recommended: true,
|
|
1352
|
-
requiresTypeChecking: false
|
|
1131
|
+
requiresTypeChecking: false,
|
|
1132
|
+
url: createRuleDocsUrl("no-blank-skill-body")
|
|
1353
1133
|
},
|
|
1354
1134
|
messages: {
|
|
1355
1135
|
blankSkillBody: "Copilot skill definition files should include a non-empty Markdown body with instructions, examples, or guidance."
|
|
@@ -1388,7 +1168,8 @@ var noDeprecatedAgentInferRule = createCopilotRule({
|
|
|
1388
1168
|
description: "disallow deprecated `infer` frontmatter in Copilot custom agent files.",
|
|
1389
1169
|
frozen: false,
|
|
1390
1170
|
recommended: true,
|
|
1391
|
-
requiresTypeChecking: false
|
|
1171
|
+
requiresTypeChecking: false,
|
|
1172
|
+
url: createRuleDocsUrl("no-deprecated-agent-infer")
|
|
1392
1173
|
},
|
|
1393
1174
|
messages: {
|
|
1394
1175
|
deprecatedInfer: "Copilot custom agent files should replace deprecated `infer` frontmatter with `user-invocable` and/or `disable-model-invocation`."
|
|
@@ -1403,6 +1184,7 @@ var no_deprecated_agent_infer_default = noDeprecatedAgentInferRule;
|
|
|
1403
1184
|
// dist/rules/no-duplicate-agent-names.js
|
|
1404
1185
|
var fs3 = __toESM(require("node:fs"), 1);
|
|
1405
1186
|
var path4 = __toESM(require("node:path"), 1);
|
|
1187
|
+
var import_ts_extras6 = require("ts-extras");
|
|
1406
1188
|
|
|
1407
1189
|
// dist/_internal/copilot-customization-names.js
|
|
1408
1190
|
var path2 = __toESM(require("node:path"), 1);
|
|
@@ -1459,6 +1241,7 @@ var collectDuplicateNameGroups = (entries, normalizeName) => {
|
|
|
1459
1241
|
// dist/_internal/file-system.js
|
|
1460
1242
|
var fs2 = __toESM(require("node:fs"), 1);
|
|
1461
1243
|
var path3 = __toESM(require("node:path"), 1);
|
|
1244
|
+
var import_ts_extras5 = require("ts-extras");
|
|
1462
1245
|
var WINDOWS_ABSOLUTE_PATH_PATTERN = /^[A-Za-z]:[/\\]/u;
|
|
1463
1246
|
var URI_SCHEME_PATTERN = /^[A-Za-z][+\-.0-9A-Za-z]*:/u;
|
|
1464
1247
|
var normalizeAbsolutePath = (filePath) => path3.resolve(filePath).replaceAll("\\", "/");
|
|
@@ -1467,7 +1250,7 @@ var stripPathFragmentAndQuery = (value) => {
|
|
|
1467
1250
|
const queryIndex = value.indexOf("?");
|
|
1468
1251
|
const fragmentIndex = value.indexOf("#");
|
|
1469
1252
|
const cutIndexCandidates = [queryIndex, fragmentIndex].filter((index) => index >= 0);
|
|
1470
|
-
if (
|
|
1253
|
+
if ((0, import_ts_extras5.isEmpty)(cutIndexCandidates)) {
|
|
1471
1254
|
return value;
|
|
1472
1255
|
}
|
|
1473
1256
|
return value.slice(0, Math.min(...cutIndexCandidates));
|
|
@@ -1491,6 +1274,30 @@ var isRelativeWorkspacePath = (value) => {
|
|
|
1491
1274
|
};
|
|
1492
1275
|
var resolveRelativeWorkspacePath = (currentFilePath, relativePath) => path3.resolve(path3.dirname(currentFilePath), stripPathFragmentAndQuery(relativePath));
|
|
1493
1276
|
var resolveRepositoryRelativePath = (repositoryRootPath, relativePath) => path3.resolve(repositoryRootPath, stripPathFragmentAndQuery(relativePath));
|
|
1277
|
+
var collectDirectoryFiles = (currentDirectory, predicate) => {
|
|
1278
|
+
const discoveredFiles = [];
|
|
1279
|
+
const pendingDirectories = [];
|
|
1280
|
+
for (const entry of fs2.readdirSync(currentDirectory, {
|
|
1281
|
+
withFileTypes: true
|
|
1282
|
+
})) {
|
|
1283
|
+
const absoluteEntryPath = path3.join(currentDirectory, entry.name);
|
|
1284
|
+
if (entry.isDirectory()) {
|
|
1285
|
+
pendingDirectories.push(absoluteEntryPath);
|
|
1286
|
+
continue;
|
|
1287
|
+
}
|
|
1288
|
+
if (!entry.isFile()) {
|
|
1289
|
+
continue;
|
|
1290
|
+
}
|
|
1291
|
+
if ((0, import_ts_extras5.isDefined)(predicate) && !predicate(absoluteEntryPath)) {
|
|
1292
|
+
continue;
|
|
1293
|
+
}
|
|
1294
|
+
discoveredFiles.push(absoluteEntryPath);
|
|
1295
|
+
}
|
|
1296
|
+
return {
|
|
1297
|
+
discoveredFiles,
|
|
1298
|
+
pendingDirectories
|
|
1299
|
+
};
|
|
1300
|
+
};
|
|
1494
1301
|
var listFilesRecursively = (directoryPath, predicate) => {
|
|
1495
1302
|
if (!pathExists(directoryPath)) {
|
|
1496
1303
|
return [];
|
|
@@ -1499,25 +1306,12 @@ var listFilesRecursively = (directoryPath, predicate) => {
|
|
|
1499
1306
|
const pendingDirectories = [directoryPath];
|
|
1500
1307
|
while (pendingDirectories.length > 0) {
|
|
1501
1308
|
const currentDirectory = pendingDirectories.pop();
|
|
1502
|
-
if (
|
|
1309
|
+
if (!(0, import_ts_extras5.isDefined)(currentDirectory)) {
|
|
1503
1310
|
continue;
|
|
1504
1311
|
}
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
const absoluteEntryPath = path3.join(currentDirectory, entry.name);
|
|
1509
|
-
if (entry.isDirectory()) {
|
|
1510
|
-
pendingDirectories.push(absoluteEntryPath);
|
|
1511
|
-
continue;
|
|
1512
|
-
}
|
|
1513
|
-
if (!entry.isFile()) {
|
|
1514
|
-
continue;
|
|
1515
|
-
}
|
|
1516
|
-
if (predicate !== void 0 && !predicate(absoluteEntryPath)) {
|
|
1517
|
-
continue;
|
|
1518
|
-
}
|
|
1519
|
-
discoveredFiles.push(absoluteEntryPath);
|
|
1520
|
-
}
|
|
1312
|
+
const currentDirectoryContents = collectDirectoryFiles(currentDirectory, predicate);
|
|
1313
|
+
pendingDirectories.push(...currentDirectoryContents.pendingDirectories);
|
|
1314
|
+
discoveredFiles.push(...currentDirectoryContents.discoveredFiles);
|
|
1521
1315
|
}
|
|
1522
1316
|
return discoveredFiles.toSorted((left, right) => left.localeCompare(right));
|
|
1523
1317
|
};
|
|
@@ -1542,12 +1336,12 @@ var noDuplicateAgentNamesRule = createCopilotRule({
|
|
|
1542
1336
|
}), normalizeNameForComparison);
|
|
1543
1337
|
const currentAgentName = getAgentName(context.filename, extractFrontmatter(context.sourceCode.text));
|
|
1544
1338
|
const duplicateGroup = duplicateGroups.get(normalizeNameForComparison(currentAgentName));
|
|
1545
|
-
if (
|
|
1339
|
+
if (!(0, import_ts_extras6.isDefined)(duplicateGroup)) {
|
|
1546
1340
|
return;
|
|
1547
1341
|
}
|
|
1548
1342
|
reportAtDocumentStart(context, {
|
|
1549
1343
|
data: {
|
|
1550
|
-
files: duplicateGroup.map((entry) => normalizeRelativeFilePath(repositoryRoot, entry.filePath))
|
|
1344
|
+
files: (0, import_ts_extras6.arrayJoin)(duplicateGroup.map((entry) => normalizeRelativeFilePath(repositoryRoot, entry.filePath)), ", "),
|
|
1551
1345
|
name: currentAgentName
|
|
1552
1346
|
},
|
|
1553
1347
|
messageId: "duplicateAgentName"
|
|
@@ -1565,7 +1359,8 @@ var noDuplicateAgentNamesRule = createCopilotRule({
|
|
|
1565
1359
|
description: "disallow duplicate effective custom-agent names across workspace custom-agent files.",
|
|
1566
1360
|
frozen: false,
|
|
1567
1361
|
recommended: true,
|
|
1568
|
-
requiresTypeChecking: false
|
|
1362
|
+
requiresTypeChecking: false,
|
|
1363
|
+
url: createRuleDocsUrl("no-duplicate-agent-names")
|
|
1569
1364
|
},
|
|
1570
1365
|
messages: {
|
|
1571
1366
|
duplicateAgentName: "Copilot custom-agent name `{{name}}` is duplicated across agent files: {{files}}."
|
|
@@ -1580,6 +1375,7 @@ var no_duplicate_agent_names_default = noDuplicateAgentNamesRule;
|
|
|
1580
1375
|
// dist/rules/no-duplicate-prompt-names.js
|
|
1581
1376
|
var fs4 = __toESM(require("node:fs"), 1);
|
|
1582
1377
|
var path5 = __toESM(require("node:path"), 1);
|
|
1378
|
+
var import_ts_extras7 = require("ts-extras");
|
|
1583
1379
|
var normalizeRelativeFilePath2 = (repositoryRoot, filePath) => path5.relative(repositoryRoot, filePath).replaceAll("\\", "/");
|
|
1584
1380
|
var noDuplicatePromptNamesRule = createCopilotRule({
|
|
1585
1381
|
create(context) {
|
|
@@ -1599,12 +1395,12 @@ var noDuplicatePromptNamesRule = createCopilotRule({
|
|
|
1599
1395
|
}), normalizeNameForComparison);
|
|
1600
1396
|
const currentPromptName = getPromptName(context.filename, extractFrontmatter(context.sourceCode.text));
|
|
1601
1397
|
const duplicateGroup = duplicateGroups.get(normalizeNameForComparison(currentPromptName));
|
|
1602
|
-
if (
|
|
1398
|
+
if (!(0, import_ts_extras7.isDefined)(duplicateGroup)) {
|
|
1603
1399
|
return;
|
|
1604
1400
|
}
|
|
1605
1401
|
reportAtDocumentStart(context, {
|
|
1606
1402
|
data: {
|
|
1607
|
-
files: duplicateGroup.map((entry) => normalizeRelativeFilePath2(repositoryRoot, entry.filePath))
|
|
1403
|
+
files: (0, import_ts_extras7.arrayJoin)(duplicateGroup.map((entry) => normalizeRelativeFilePath2(repositoryRoot, entry.filePath)), ", "),
|
|
1608
1404
|
name: currentPromptName
|
|
1609
1405
|
},
|
|
1610
1406
|
messageId: "duplicatePromptName"
|
|
@@ -1622,7 +1418,8 @@ var noDuplicatePromptNamesRule = createCopilotRule({
|
|
|
1622
1418
|
description: "disallow duplicate effective prompt names across workspace prompt files.",
|
|
1623
1419
|
frozen: false,
|
|
1624
1420
|
recommended: true,
|
|
1625
|
-
requiresTypeChecking: false
|
|
1421
|
+
requiresTypeChecking: false,
|
|
1422
|
+
url: createRuleDocsUrl("no-duplicate-prompt-names")
|
|
1626
1423
|
},
|
|
1627
1424
|
messages: {
|
|
1628
1425
|
duplicatePromptName: "Copilot prompt name `{{name}}` is duplicated across prompt files: {{files}}."
|
|
@@ -1637,6 +1434,7 @@ var no_duplicate_prompt_names_default = noDuplicatePromptNamesRule;
|
|
|
1637
1434
|
// dist/rules/no-duplicate-skill-names.js
|
|
1638
1435
|
var fs5 = __toESM(require("node:fs"), 1);
|
|
1639
1436
|
var path6 = __toESM(require("node:path"), 1);
|
|
1437
|
+
var import_ts_extras8 = require("ts-extras");
|
|
1640
1438
|
var normalizeRelativeFilePath3 = (repositoryRoot, filePath) => path6.relative(repositoryRoot, filePath).replaceAll("\\", "/");
|
|
1641
1439
|
var noDuplicateSkillNamesRule = createCopilotRule({
|
|
1642
1440
|
create(context) {
|
|
@@ -1658,12 +1456,12 @@ var noDuplicateSkillNamesRule = createCopilotRule({
|
|
|
1658
1456
|
}), normalizeNameForComparison);
|
|
1659
1457
|
const currentSkillName = getSkillName(context.filename, extractFrontmatter(context.sourceCode.text));
|
|
1660
1458
|
const duplicateGroup = duplicateGroups.get(normalizeNameForComparison(currentSkillName));
|
|
1661
|
-
if (
|
|
1459
|
+
if (!(0, import_ts_extras8.isDefined)(duplicateGroup)) {
|
|
1662
1460
|
return;
|
|
1663
1461
|
}
|
|
1664
1462
|
reportAtDocumentStart(context, {
|
|
1665
1463
|
data: {
|
|
1666
|
-
files: duplicateGroup.map((entry) => normalizeRelativeFilePath3(repositoryRoot, entry.filePath))
|
|
1464
|
+
files: (0, import_ts_extras8.arrayJoin)(duplicateGroup.map((entry) => normalizeRelativeFilePath3(repositoryRoot, entry.filePath)), ", "),
|
|
1667
1465
|
name: currentSkillName
|
|
1668
1466
|
},
|
|
1669
1467
|
messageId: "duplicateSkillName"
|
|
@@ -1681,7 +1479,8 @@ var noDuplicateSkillNamesRule = createCopilotRule({
|
|
|
1681
1479
|
description: "disallow duplicate effective skill names across project skill definition files.",
|
|
1682
1480
|
frozen: false,
|
|
1683
1481
|
recommended: true,
|
|
1684
|
-
requiresTypeChecking: false
|
|
1482
|
+
requiresTypeChecking: false,
|
|
1483
|
+
url: createRuleDocsUrl("no-duplicate-skill-names")
|
|
1685
1484
|
},
|
|
1686
1485
|
messages: {
|
|
1687
1486
|
duplicateSkillName: "Copilot skill name `{{name}}` is duplicated across skill files: {{files}}."
|
|
@@ -1696,6 +1495,7 @@ var no_duplicate_skill_names_default = noDuplicateSkillNamesRule;
|
|
|
1696
1495
|
// dist/rules/no-duplicate-slash-command-names.js
|
|
1697
1496
|
var fs6 = __toESM(require("node:fs"), 1);
|
|
1698
1497
|
var path7 = __toESM(require("node:path"), 1);
|
|
1498
|
+
var import_ts_extras9 = require("ts-extras");
|
|
1699
1499
|
var isPromptOrSkillCommandFile = (filePath) => filePath.endsWith(".prompt.md") || isSkillFilePath(filePath);
|
|
1700
1500
|
var normalizeRelativeFilePath4 = (repositoryRoot, filePath) => path7.relative(repositoryRoot, filePath).replaceAll("\\", "/");
|
|
1701
1501
|
var noDuplicateSlashCommandNamesRule = createCopilotRule({
|
|
@@ -1721,12 +1521,12 @@ var noDuplicateSlashCommandNamesRule = createCopilotRule({
|
|
|
1721
1521
|
const frontmatter = extractFrontmatter(context.sourceCode.text);
|
|
1722
1522
|
const currentCommandName = context.filename.endsWith(".prompt.md") ? getPromptName(context.filename, frontmatter) : getSkillName(context.filename, frontmatter);
|
|
1723
1523
|
const duplicateGroup = duplicateGroups.get(normalizeNameForComparison(currentCommandName));
|
|
1724
|
-
if (
|
|
1524
|
+
if (!(0, import_ts_extras9.isDefined)(duplicateGroup)) {
|
|
1725
1525
|
return;
|
|
1726
1526
|
}
|
|
1727
1527
|
reportAtDocumentStart(context, {
|
|
1728
1528
|
data: {
|
|
1729
|
-
files: duplicateGroup.map((entry) => normalizeRelativeFilePath4(repositoryRoot, entry.filePath))
|
|
1529
|
+
files: (0, import_ts_extras9.arrayJoin)(duplicateGroup.map((entry) => normalizeRelativeFilePath4(repositoryRoot, entry.filePath)), ", "),
|
|
1730
1530
|
name: currentCommandName
|
|
1731
1531
|
},
|
|
1732
1532
|
messageId: "duplicateSlashCommandName"
|
|
@@ -1744,7 +1544,8 @@ var noDuplicateSlashCommandNamesRule = createCopilotRule({
|
|
|
1744
1544
|
description: "disallow duplicate slash-command names across prompt files and skills.",
|
|
1745
1545
|
frozen: false,
|
|
1746
1546
|
recommended: true,
|
|
1747
|
-
requiresTypeChecking: false
|
|
1547
|
+
requiresTypeChecking: false,
|
|
1548
|
+
url: createRuleDocsUrl("no-duplicate-slash-command-names")
|
|
1748
1549
|
},
|
|
1749
1550
|
messages: {
|
|
1750
1551
|
duplicateSlashCommandName: "Slash command name `{{name}}` is duplicated across prompt or skill files: {{files}}."
|
|
@@ -1756,7 +1557,11 @@ var noDuplicateSlashCommandNamesRule = createCopilotRule({
|
|
|
1756
1557
|
});
|
|
1757
1558
|
var no_duplicate_slash_command_names_default = noDuplicateSlashCommandNamesRule;
|
|
1758
1559
|
|
|
1560
|
+
// dist/rules/no-empty-repository-hook-arrays.js
|
|
1561
|
+
var import_ts_extras11 = require("ts-extras");
|
|
1562
|
+
|
|
1759
1563
|
// dist/_internal/repository-hooks-json.js
|
|
1564
|
+
var import_ts_extras10 = require("ts-extras");
|
|
1760
1565
|
var DEFAULT_REPOSITORY_HOOK_TIMEOUT_SECONDS = 30;
|
|
1761
1566
|
var VALID_REPOSITORY_HOOK_EVENT_NAMES = /* @__PURE__ */ new Set([
|
|
1762
1567
|
"agentStop",
|
|
@@ -1769,15 +1574,15 @@ var VALID_REPOSITORY_HOOK_EVENT_NAMES = /* @__PURE__ */ new Set([
|
|
|
1769
1574
|
"userPromptSubmitted"
|
|
1770
1575
|
]);
|
|
1771
1576
|
var VALID_REPOSITORY_HOOK_TYPES = /* @__PURE__ */ new Set(["command", "prompt"]);
|
|
1772
|
-
var isRepositoryHookEventName = (value) =>
|
|
1773
|
-
var isRepositoryHookType = (value) =>
|
|
1577
|
+
var isRepositoryHookEventName = (value) => (0, import_ts_extras10.setHas)(VALID_REPOSITORY_HOOK_EVENT_NAMES, value);
|
|
1578
|
+
var isRepositoryHookType = (value) => (0, import_ts_extras10.setHas)(VALID_REPOSITORY_HOOK_TYPES, value);
|
|
1774
1579
|
var isJsonObject = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
1775
1580
|
var isJsonArray = (value) => Array.isArray(value);
|
|
1776
1581
|
var isJsonString = (value) => typeof value === "string";
|
|
1777
|
-
var isJsonNumber = (value) => typeof value === "number" &&
|
|
1582
|
+
var isJsonNumber = (value) => typeof value === "number" && (0, import_ts_extras10.isFinite)(value);
|
|
1778
1583
|
var parseJsonText = (text) => {
|
|
1779
1584
|
try {
|
|
1780
|
-
return JSON.parse(text);
|
|
1585
|
+
return (0, import_ts_extras10.safeCastTo)(JSON.parse(text));
|
|
1781
1586
|
} catch {
|
|
1782
1587
|
return void 0;
|
|
1783
1588
|
}
|
|
@@ -1786,7 +1591,7 @@ var getRepositoryHooksValue = (root) => isJsonObject(root) ? root["hooks"] : voi
|
|
|
1786
1591
|
var getRepositoryHooksVersionValue = (root) => isJsonObject(root) ? root["version"] : void 0;
|
|
1787
1592
|
var getRepositoryHookEventEntries = (root) => {
|
|
1788
1593
|
const hooksValue = getRepositoryHooksValue(root);
|
|
1789
|
-
return isJsonObject(hooksValue) ?
|
|
1594
|
+
return isJsonObject(hooksValue) ? (0, import_ts_extras10.objectEntries)(hooksValue) : [];
|
|
1790
1595
|
};
|
|
1791
1596
|
var getRepositoryHookObjects = (root) => {
|
|
1792
1597
|
const hookEntries = [];
|
|
@@ -1808,7 +1613,7 @@ var getRepositoryHookObjects = (root) => {
|
|
|
1808
1613
|
return hookEntries;
|
|
1809
1614
|
};
|
|
1810
1615
|
var formatJsonValue = (value) => {
|
|
1811
|
-
if (
|
|
1616
|
+
if (!(0, import_ts_extras10.isDefined)(value)) {
|
|
1812
1617
|
return "(missing)";
|
|
1813
1618
|
}
|
|
1814
1619
|
if (typeof value === "string") {
|
|
@@ -1826,13 +1631,13 @@ var noEmptyRepositoryHookArraysRule = createCopilotRule({
|
|
|
1826
1631
|
return;
|
|
1827
1632
|
}
|
|
1828
1633
|
const root = parseJsonText(context.sourceCode.text);
|
|
1829
|
-
const emptyEntry = getRepositoryHookEventEntries(root).find(([, eventValue]) => isJsonArray(eventValue) &&
|
|
1830
|
-
if (
|
|
1634
|
+
const emptyEntry = getRepositoryHookEventEntries(root).find(([, eventValue]) => isJsonArray(eventValue) && (0, import_ts_extras11.isEmpty)(eventValue));
|
|
1635
|
+
if (!(0, import_ts_extras11.isDefined)(emptyEntry)) {
|
|
1831
1636
|
return;
|
|
1832
1637
|
}
|
|
1833
1638
|
reportAtDocumentStart(context, {
|
|
1834
1639
|
data: {
|
|
1835
|
-
eventName: emptyEntry
|
|
1640
|
+
eventName: (0, import_ts_extras11.arrayFirst)(emptyEntry)
|
|
1836
1641
|
},
|
|
1837
1642
|
messageId: "emptyRepositoryHookArray"
|
|
1838
1643
|
});
|
|
@@ -1846,7 +1651,8 @@ var noEmptyRepositoryHookArraysRule = createCopilotRule({
|
|
|
1846
1651
|
description: "disallow empty repository hook arrays that opt into an event without any hook definitions.",
|
|
1847
1652
|
frozen: false,
|
|
1848
1653
|
recommended: false,
|
|
1849
|
-
requiresTypeChecking: false
|
|
1654
|
+
requiresTypeChecking: false,
|
|
1655
|
+
url: createRuleDocsUrl("no-empty-repository-hook-arrays")
|
|
1850
1656
|
},
|
|
1851
1657
|
messages: {
|
|
1852
1658
|
emptyRepositoryHookArray: "Repository hook event `{{eventName}}` should not be declared with an empty array."
|
|
@@ -1881,7 +1687,8 @@ var noLegacyChatmodeFilesRule = createCopilotRule({
|
|
|
1881
1687
|
description: "disallow legacy Copilot `.chatmode.md` files in favor of modern `.agent.md` custom agents.",
|
|
1882
1688
|
frozen: false,
|
|
1883
1689
|
recommended: true,
|
|
1884
|
-
requiresTypeChecking: false
|
|
1690
|
+
requiresTypeChecking: false,
|
|
1691
|
+
url: createRuleDocsUrl("no-legacy-chatmode-files")
|
|
1885
1692
|
},
|
|
1886
1693
|
messages: {
|
|
1887
1694
|
legacyChatmodeFile: "Legacy Copilot `.chatmode.md` files should be migrated to `.github/agents/*.agent.md` custom agents."
|
|
@@ -1925,7 +1732,8 @@ var preferCustomInstructionsUnderCodeReviewLimitRule = createCopilotRule({
|
|
|
1925
1732
|
description: "enforce repository and path-specific Copilot instruction files staying within the 4,000-character code-review instruction budget.",
|
|
1926
1733
|
frozen: false,
|
|
1927
1734
|
recommended: false,
|
|
1928
|
-
requiresTypeChecking: false
|
|
1735
|
+
requiresTypeChecking: false,
|
|
1736
|
+
url: createRuleDocsUrl("prefer-custom-instructions-under-code-review-limit")
|
|
1929
1737
|
},
|
|
1930
1738
|
messages: {
|
|
1931
1739
|
exceedsCodeReviewLimit: "Copilot code review only reads roughly the first {{maxCharacters}} characters of custom instructions; this file is {{characterCount}} characters long."
|
|
@@ -1938,6 +1746,7 @@ var preferCustomInstructionsUnderCodeReviewLimitRule = createCopilotRule({
|
|
|
1938
1746
|
var prefer_custom_instructions_under_code_review_limit_default = preferCustomInstructionsUnderCodeReviewLimitRule;
|
|
1939
1747
|
|
|
1940
1748
|
// dist/rules/prefer-fast-repository-hooks.js
|
|
1749
|
+
var import_ts_extras12 = require("ts-extras");
|
|
1941
1750
|
var preferFastRepositoryHooksRule = createCopilotRule({
|
|
1942
1751
|
create(context) {
|
|
1943
1752
|
return {
|
|
@@ -1950,7 +1759,7 @@ var preferFastRepositoryHooksRule = createCopilotRule({
|
|
|
1950
1759
|
const timeout2 = hook["timeoutSec"];
|
|
1951
1760
|
return isJsonNumber(timeout2) && timeout2 > DEFAULT_REPOSITORY_HOOK_TIMEOUT_SECONDS;
|
|
1952
1761
|
});
|
|
1953
|
-
if (
|
|
1762
|
+
if (!(0, import_ts_extras12.isDefined)(slowHook)) {
|
|
1954
1763
|
return;
|
|
1955
1764
|
}
|
|
1956
1765
|
const timeout = slowHook.hook["timeoutSec"];
|
|
@@ -1974,7 +1783,8 @@ var preferFastRepositoryHooksRule = createCopilotRule({
|
|
|
1974
1783
|
description: "enforce repository hooks staying at or below the default 30-second timeout unless a slower hook is truly necessary.",
|
|
1975
1784
|
frozen: false,
|
|
1976
1785
|
recommended: false,
|
|
1977
|
-
requiresTypeChecking: false
|
|
1786
|
+
requiresTypeChecking: false,
|
|
1787
|
+
url: createRuleDocsUrl("prefer-fast-repository-hooks")
|
|
1978
1788
|
},
|
|
1979
1789
|
messages: {
|
|
1980
1790
|
slowRepositoryHookTimeout: "Repository hook `timeoutSec` for `{{eventName}}` is {{timeout}} seconds, which exceeds the default 30-second timeout budget."
|
|
@@ -1987,8 +1797,10 @@ var preferFastRepositoryHooksRule = createCopilotRule({
|
|
|
1987
1797
|
var prefer_fast_repository_hooks_default = preferFastRepositoryHooksRule;
|
|
1988
1798
|
|
|
1989
1799
|
// dist/rules/prefer-qualified-tools.js
|
|
1800
|
+
var import_ts_extras13 = require("ts-extras");
|
|
1990
1801
|
var isQualifiedToolName = (toolName) => toolName.includes("/");
|
|
1991
1802
|
var allowedUnqualifiedToolNames = /* @__PURE__ */ new Set(["agent", "runSubagent"]);
|
|
1803
|
+
var isAllowedUnqualifiedToolName = (toolName) => (0, import_ts_extras13.setHas)(allowedUnqualifiedToolNames, toolName);
|
|
1992
1804
|
var preferQualifiedToolsRule = createCopilotRule({
|
|
1993
1805
|
create(context) {
|
|
1994
1806
|
return createMarkdownDocumentListener(() => {
|
|
@@ -2001,11 +1813,11 @@ var preferQualifiedToolsRule = createCopilotRule({
|
|
|
2001
1813
|
return;
|
|
2002
1814
|
}
|
|
2003
1815
|
const tools = getFrontmatterList(frontmatter, "tools");
|
|
2004
|
-
if (
|
|
1816
|
+
if (!(0, import_ts_extras13.isDefined)(tools)) {
|
|
2005
1817
|
return;
|
|
2006
1818
|
}
|
|
2007
|
-
const firstUnqualifiedTool = tools.find((toolName) => !isQualifiedToolName(toolName) && !
|
|
2008
|
-
if (firstUnqualifiedTool ===
|
|
1819
|
+
const firstUnqualifiedTool = tools.find((toolName) => !isQualifiedToolName(toolName) && !isAllowedUnqualifiedToolName(toolName)) ?? null;
|
|
1820
|
+
if (firstUnqualifiedTool === null) {
|
|
2009
1821
|
return;
|
|
2010
1822
|
}
|
|
2011
1823
|
reportAtDocumentStart(context, {
|
|
@@ -2021,7 +1833,8 @@ var preferQualifiedToolsRule = createCopilotRule({
|
|
|
2021
1833
|
description: "enforce fully-qualified tool names in Copilot prompt files, custom agents, and legacy chat modes.",
|
|
2022
1834
|
frozen: false,
|
|
2023
1835
|
recommended: false,
|
|
2024
|
-
requiresTypeChecking: false
|
|
1836
|
+
requiresTypeChecking: false,
|
|
1837
|
+
url: createRuleDocsUrl("prefer-qualified-tools")
|
|
2025
1838
|
},
|
|
2026
1839
|
messages: {
|
|
2027
1840
|
preferQualifiedTool: "Prefer fully-qualified Copilot tool names in `tools` metadata when a documented built-in alias is not required. `{{toolName}}` should include a provider or tool-set prefix such as `search/codebase`."
|
|
@@ -2034,7 +1847,8 @@ var preferQualifiedToolsRule = createCopilotRule({
|
|
|
2034
1847
|
var prefer_qualified_tools_default = preferQualifiedToolsRule;
|
|
2035
1848
|
|
|
2036
1849
|
// dist/rules/require-agent-tool-for-subagents.js
|
|
2037
|
-
var
|
|
1850
|
+
var import_ts_extras14 = require("ts-extras");
|
|
1851
|
+
var hasAgentTool = (tools) => tools?.some((toolName) => (0, import_ts_extras14.arrayAt)((0, import_ts_extras14.stringSplit)(toolName, "/"), -1) === "agent") ?? false;
|
|
2038
1852
|
var requireAgentToolForSubagentsRule = createCopilotRule({
|
|
2039
1853
|
create(context) {
|
|
2040
1854
|
return createMarkdownDocumentListener(() => {
|
|
@@ -2050,7 +1864,7 @@ var requireAgentToolForSubagentsRule = createCopilotRule({
|
|
|
2050
1864
|
}
|
|
2051
1865
|
const allowedAgents = getFrontmatterList(frontmatter, "agents");
|
|
2052
1866
|
const agentsScalar = getFrontmatterScalar(frontmatter, "agents");
|
|
2053
|
-
if (agentsScalar !== "*" && (allowedAgents
|
|
1867
|
+
if (agentsScalar !== "*" && (!(0, import_ts_extras14.isDefined)(allowedAgents) || (0, import_ts_extras14.isEmpty)(allowedAgents))) {
|
|
2054
1868
|
return;
|
|
2055
1869
|
}
|
|
2056
1870
|
const tools = getFrontmatterList(frontmatter, "tools");
|
|
@@ -2073,7 +1887,8 @@ var requireAgentToolForSubagentsRule = createCopilotRule({
|
|
|
2073
1887
|
description: "require custom agents that declare subagents to also include the `agent` tool.",
|
|
2074
1888
|
frozen: false,
|
|
2075
1889
|
recommended: true,
|
|
2076
|
-
requiresTypeChecking: false
|
|
1890
|
+
requiresTypeChecking: false,
|
|
1891
|
+
url: createRuleDocsUrl("require-agent-tool-for-subagents")
|
|
2077
1892
|
},
|
|
2078
1893
|
messages: {
|
|
2079
1894
|
missingAgentTool: "Copilot custom agent files that declare `agents` must include the `agent` tool in `tools`.",
|
|
@@ -2117,7 +1932,8 @@ var requireAgentsMdForCrossSurfaceAgentInstructionsRule = createCopilotRule({
|
|
|
2117
1932
|
description: "require `CLAUDE.md` and `GEMINI.md` agent-instructions files to be paired with a sibling `AGENTS.md` for broader cross-surface support.",
|
|
2118
1933
|
frozen: false,
|
|
2119
1934
|
recommended: false,
|
|
2120
|
-
requiresTypeChecking: false
|
|
1935
|
+
requiresTypeChecking: false,
|
|
1936
|
+
url: createRuleDocsUrl("require-agents-md-for-cross-surface-agent-instructions")
|
|
2121
1937
|
},
|
|
2122
1938
|
messages: {
|
|
2123
1939
|
missingAgentsMdSibling: "`{{basename}}` is less portable across Copilot surfaces without a sibling `AGENTS.md` file in the same directory."
|
|
@@ -2130,6 +1946,7 @@ var requireAgentsMdForCrossSurfaceAgentInstructionsRule = createCopilotRule({
|
|
|
2130
1946
|
var require_agents_md_for_cross_surface_agent_instructions_default = requireAgentsMdForCrossSurfaceAgentInstructionsRule;
|
|
2131
1947
|
|
|
2132
1948
|
// dist/rules/require-chatmode-file-metadata.js
|
|
1949
|
+
var import_ts_extras15 = require("ts-extras");
|
|
2133
1950
|
var requireChatmodeFileMetadataRule = createCopilotRule({
|
|
2134
1951
|
create(context) {
|
|
2135
1952
|
return createMarkdownDocumentListener(() => {
|
|
@@ -2144,7 +1961,7 @@ var requireChatmodeFileMetadataRule = createCopilotRule({
|
|
|
2144
1961
|
return;
|
|
2145
1962
|
}
|
|
2146
1963
|
const description = getFrontmatterScalar(frontmatter, "description");
|
|
2147
|
-
if (
|
|
1964
|
+
if ((0, import_ts_extras15.isDefined)(description)) {
|
|
2148
1965
|
return;
|
|
2149
1966
|
}
|
|
2150
1967
|
reportAtDocumentStart(context, {
|
|
@@ -2164,7 +1981,8 @@ var requireChatmodeFileMetadataRule = createCopilotRule({
|
|
|
2164
1981
|
description: "require custom Copilot agent files and legacy chat mode files to declare a non-empty description in frontmatter.",
|
|
2165
1982
|
frozen: false,
|
|
2166
1983
|
recommended: true,
|
|
2167
|
-
requiresTypeChecking: false
|
|
1984
|
+
requiresTypeChecking: false,
|
|
1985
|
+
url: createRuleDocsUrl("require-chatmode-file-metadata")
|
|
2168
1986
|
},
|
|
2169
1987
|
messages: {
|
|
2170
1988
|
emptyDescription: "Copilot custom agent and legacy chat mode files must define a non-empty `description` frontmatter value.",
|
|
@@ -2179,6 +1997,7 @@ var requireChatmodeFileMetadataRule = createCopilotRule({
|
|
|
2179
1997
|
var require_chatmode_file_metadata_default = requireChatmodeFileMetadataRule;
|
|
2180
1998
|
|
|
2181
1999
|
// dist/rules/require-existing-agent-hook-cwd.js
|
|
2000
|
+
var import_ts_extras16 = require("ts-extras");
|
|
2182
2001
|
var requireExistingAgentHookCwdRule = createCopilotRule({
|
|
2183
2002
|
create(context) {
|
|
2184
2003
|
return createMarkdownDocumentListener(() => {
|
|
@@ -2187,7 +2006,7 @@ var requireExistingAgentHookCwdRule = createCopilotRule({
|
|
|
2187
2006
|
}
|
|
2188
2007
|
const frontmatter = extractFrontmatter(context.sourceCode.text);
|
|
2189
2008
|
const hookGroups = frontmatter === null ? void 0 : getFrontmatterObjectListGroups(frontmatter, "hooks");
|
|
2190
|
-
if (hookGroups
|
|
2009
|
+
if (!(0, import_ts_extras16.isDefined)(hookGroups) || hookGroups.size === 0) {
|
|
2191
2010
|
return;
|
|
2192
2011
|
}
|
|
2193
2012
|
const repositoryRoot = findRepositoryRoot(context.filename);
|
|
@@ -2196,7 +2015,7 @@ var requireExistingAgentHookCwdRule = createCopilotRule({
|
|
|
2196
2015
|
const cwd = entry["cwd"]?.trim();
|
|
2197
2016
|
return typeof cwd === "string" && cwd.length > 0 && isRelativeWorkspacePath(cwd) && !pathExists(resolveRepositoryRelativePath(repositoryRoot, cwd));
|
|
2198
2017
|
})?.["cwd"];
|
|
2199
|
-
if (
|
|
2018
|
+
if (!(0, import_ts_extras16.isDefined)(missingCwd)) {
|
|
2200
2019
|
continue;
|
|
2201
2020
|
}
|
|
2202
2021
|
reportAtDocumentStart(context, {
|
|
@@ -2216,7 +2035,8 @@ var requireExistingAgentHookCwdRule = createCopilotRule({
|
|
|
2216
2035
|
description: "require Copilot custom-agent hook `cwd` entries to resolve to existing repository directories.",
|
|
2217
2036
|
frozen: false,
|
|
2218
2037
|
recommended: false,
|
|
2219
|
-
requiresTypeChecking: false
|
|
2038
|
+
requiresTypeChecking: false,
|
|
2039
|
+
url: createRuleDocsUrl("require-existing-agent-hook-cwd")
|
|
2220
2040
|
},
|
|
2221
2041
|
messages: {
|
|
2222
2042
|
missingAgentHookCwd: "Copilot custom-agent hook `cwd` value `{{cwd}}` does not resolve to an existing repository path."
|
|
@@ -2229,6 +2049,7 @@ var requireExistingAgentHookCwdRule = createCopilotRule({
|
|
|
2229
2049
|
var require_existing_agent_hook_cwd_default = requireExistingAgentHookCwdRule;
|
|
2230
2050
|
|
|
2231
2051
|
// dist/rules/require-existing-agent-mcp-servers.js
|
|
2052
|
+
var import_ts_extras17 = require("ts-extras");
|
|
2232
2053
|
var requireExistingAgentMcpServersRule = createCopilotRule({
|
|
2233
2054
|
create(context) {
|
|
2234
2055
|
return createMarkdownDocumentListener(() => {
|
|
@@ -2237,12 +2058,12 @@ var requireExistingAgentMcpServersRule = createCopilotRule({
|
|
|
2237
2058
|
}
|
|
2238
2059
|
const frontmatter = extractFrontmatter(context.sourceCode.text);
|
|
2239
2060
|
const mcpServers = frontmatter === null ? void 0 : getFrontmatterList(frontmatter, "mcp-servers");
|
|
2240
|
-
if (
|
|
2061
|
+
if (!(0, import_ts_extras17.isDefined)(mcpServers)) {
|
|
2241
2062
|
return;
|
|
2242
2063
|
}
|
|
2243
2064
|
const repositoryRoot = findRepositoryRoot(context.filename);
|
|
2244
2065
|
const missingServer = mcpServers.find((serverPath) => !pathExists(resolveRepositoryRelativePath(repositoryRoot, serverPath)));
|
|
2245
|
-
if (
|
|
2066
|
+
if (!(0, import_ts_extras17.isDefined)(missingServer)) {
|
|
2246
2067
|
return;
|
|
2247
2068
|
}
|
|
2248
2069
|
reportAtDocumentStart(context, {
|
|
@@ -2263,7 +2084,8 @@ var requireExistingAgentMcpServersRule = createCopilotRule({
|
|
|
2263
2084
|
description: "require Copilot custom-agent `mcp-servers` entries to resolve to existing repository files.",
|
|
2264
2085
|
frozen: false,
|
|
2265
2086
|
recommended: false,
|
|
2266
|
-
requiresTypeChecking: false
|
|
2087
|
+
requiresTypeChecking: false,
|
|
2088
|
+
url: createRuleDocsUrl("require-existing-agent-mcp-servers")
|
|
2267
2089
|
},
|
|
2268
2090
|
messages: {
|
|
2269
2091
|
missingAgentMcpServer: "Copilot custom-agent `mcp-servers` entry `{{mcpServer}}` does not resolve to an existing repository file."
|
|
@@ -2286,6 +2108,7 @@ var getCustomizationBodyWithOffset = (sourceText) => {
|
|
|
2286
2108
|
};
|
|
2287
2109
|
|
|
2288
2110
|
// dist/_internal/markdown-links.js
|
|
2111
|
+
var import_ts_extras18 = require("ts-extras");
|
|
2289
2112
|
var FENCED_BACKTICK_CODE_BLOCK_PATTERN = /```[\s\S]*?```/gu;
|
|
2290
2113
|
var FENCED_TILDE_CODE_BLOCK_PATTERN = /~~~[\s\S]*?~~~/gu;
|
|
2291
2114
|
var INLINE_CODE_PATTERN = /`[^\n\r`]+`/gu;
|
|
@@ -2295,7 +2118,8 @@ var extractMarkdownLinkDestination = (rawDestination) => {
|
|
|
2295
2118
|
if (trimmedDestination.startsWith("<") && trimmedDestination.endsWith(">")) {
|
|
2296
2119
|
return trimmedDestination.slice(1, -1).trim();
|
|
2297
2120
|
}
|
|
2298
|
-
const
|
|
2121
|
+
const normalizedDestination = trimmedDestination.replaceAll(/\s+/gu, " ");
|
|
2122
|
+
const [destination] = (0, import_ts_extras18.stringSplit)(normalizedDestination, " ");
|
|
2299
2123
|
return destination?.trim() ?? "";
|
|
2300
2124
|
};
|
|
2301
2125
|
var extractMarkdownLinks = (text, offset = 0) => {
|
|
@@ -2387,7 +2211,8 @@ var requireExistingRelativeAgentLinksRule = createCopilotRule({
|
|
|
2387
2211
|
description: "require relative Markdown links in Copilot custom agents to resolve to existing workspace targets.",
|
|
2388
2212
|
frozen: false,
|
|
2389
2213
|
recommended: false,
|
|
2390
|
-
requiresTypeChecking: false
|
|
2214
|
+
requiresTypeChecking: false,
|
|
2215
|
+
url: createRuleDocsUrl("require-existing-relative-agent-links")
|
|
2391
2216
|
},
|
|
2392
2217
|
messages: {
|
|
2393
2218
|
missingAgentLinkTarget: "Copilot custom-agent relative link `{{destination}}` does not resolve to an existing workspace path."
|
|
@@ -2439,7 +2264,8 @@ var requireExistingRelativeInstructionsLinksRule = createCopilotRule({
|
|
|
2439
2264
|
description: "require relative Markdown links in path-specific Copilot instructions files to resolve to existing workspace targets.",
|
|
2440
2265
|
frozen: false,
|
|
2441
2266
|
recommended: false,
|
|
2442
|
-
requiresTypeChecking: false
|
|
2267
|
+
requiresTypeChecking: false,
|
|
2268
|
+
url: createRuleDocsUrl("require-existing-relative-instructions-links")
|
|
2443
2269
|
},
|
|
2444
2270
|
messages: {
|
|
2445
2271
|
missingInstructionsLinkTarget: "Copilot instructions relative link `{{destination}}` does not resolve to an existing workspace path."
|
|
@@ -2491,7 +2317,8 @@ var requireExistingRelativePromptLinksRule = createCopilotRule({
|
|
|
2491
2317
|
description: "require relative Markdown links in Copilot prompt files to resolve to existing workspace targets.",
|
|
2492
2318
|
frozen: false,
|
|
2493
2319
|
recommended: false,
|
|
2494
|
-
requiresTypeChecking: false
|
|
2320
|
+
requiresTypeChecking: false,
|
|
2321
|
+
url: createRuleDocsUrl("require-existing-relative-prompt-links")
|
|
2495
2322
|
},
|
|
2496
2323
|
messages: {
|
|
2497
2324
|
missingPromptLinkTarget: "Copilot prompt-file relative link `{{destination}}` does not resolve to an existing workspace path."
|
|
@@ -2543,7 +2370,8 @@ var requireExistingRelativeSkillLinksRule = createCopilotRule({
|
|
|
2543
2370
|
description: "require relative Markdown links in Copilot skill definition files to resolve to existing workspace resources.",
|
|
2544
2371
|
frozen: false,
|
|
2545
2372
|
recommended: false,
|
|
2546
|
-
requiresTypeChecking: false
|
|
2373
|
+
requiresTypeChecking: false,
|
|
2374
|
+
url: createRuleDocsUrl("require-existing-relative-skill-links")
|
|
2547
2375
|
},
|
|
2548
2376
|
messages: {
|
|
2549
2377
|
missingSkillLinkTarget: "Copilot skill relative link `{{destination}}` does not resolve to an existing workspace path."
|
|
@@ -2556,6 +2384,7 @@ var requireExistingRelativeSkillLinksRule = createCopilotRule({
|
|
|
2556
2384
|
var require_existing_relative_skill_links_default = requireExistingRelativeSkillLinksRule;
|
|
2557
2385
|
|
|
2558
2386
|
// dist/rules/require-existing-repository-hook-cwd.js
|
|
2387
|
+
var import_ts_extras19 = require("ts-extras");
|
|
2559
2388
|
var requireExistingRepositoryHookCwdRule = createCopilotRule({
|
|
2560
2389
|
create(context) {
|
|
2561
2390
|
return {
|
|
@@ -2569,7 +2398,7 @@ var requireExistingRepositoryHookCwdRule = createCopilotRule({
|
|
|
2569
2398
|
const cwd2 = hook["cwd"];
|
|
2570
2399
|
return isJsonString(cwd2) && cwd2.trim().length > 0 && isRelativeWorkspacePath(cwd2) && !pathExists(resolveRepositoryRelativePath(repositoryRoot, cwd2));
|
|
2571
2400
|
});
|
|
2572
|
-
if (
|
|
2401
|
+
if (!(0, import_ts_extras19.isDefined)(invalidHook)) {
|
|
2573
2402
|
return;
|
|
2574
2403
|
}
|
|
2575
2404
|
const cwd = invalidHook.hook["cwd"];
|
|
@@ -2596,7 +2425,8 @@ var requireExistingRepositoryHookCwdRule = createCopilotRule({
|
|
|
2596
2425
|
description: "require repository hook `cwd` values to resolve to existing repository paths.",
|
|
2597
2426
|
frozen: false,
|
|
2598
2427
|
recommended: false,
|
|
2599
|
-
requiresTypeChecking: false
|
|
2428
|
+
requiresTypeChecking: false,
|
|
2429
|
+
url: createRuleDocsUrl("require-existing-repository-hook-cwd")
|
|
2600
2430
|
},
|
|
2601
2431
|
messages: {
|
|
2602
2432
|
missingRepositoryHookCwd: "Repository hook `cwd` value `{{cwd}}` for `{{eventName}}` does not resolve to an existing repository path."
|
|
@@ -2609,6 +2439,7 @@ var requireExistingRepositoryHookCwdRule = createCopilotRule({
|
|
|
2609
2439
|
var require_existing_repository_hook_cwd_default = requireExistingRepositoryHookCwdRule;
|
|
2610
2440
|
|
|
2611
2441
|
// dist/rules/require-github-copilot-target-for-mcp-servers.js
|
|
2442
|
+
var import_ts_extras20 = require("ts-extras");
|
|
2612
2443
|
var requireGithubCopilotTargetForMcpServersRule = createCopilotRule({
|
|
2613
2444
|
create(context) {
|
|
2614
2445
|
return createMarkdownDocumentListener(() => {
|
|
@@ -2623,7 +2454,7 @@ var requireGithubCopilotTargetForMcpServersRule = createCopilotRule({
|
|
|
2623
2454
|
if (target === "github-copilot") {
|
|
2624
2455
|
return;
|
|
2625
2456
|
}
|
|
2626
|
-
if (
|
|
2457
|
+
if (!(0, import_ts_extras20.isDefined)(target)) {
|
|
2627
2458
|
reportAtDocumentStart(context, {
|
|
2628
2459
|
messageId: hasFrontmatterField(frontmatter, "target") ? "emptyTarget" : "missingTarget"
|
|
2629
2460
|
});
|
|
@@ -2646,7 +2477,8 @@ var requireGithubCopilotTargetForMcpServersRule = createCopilotRule({
|
|
|
2646
2477
|
description: "require custom agents that declare `mcp-servers` to set `target: github-copilot`.",
|
|
2647
2478
|
frozen: false,
|
|
2648
2479
|
recommended: true,
|
|
2649
|
-
requiresTypeChecking: false
|
|
2480
|
+
requiresTypeChecking: false,
|
|
2481
|
+
url: createRuleDocsUrl("require-github-copilot-target-for-mcp-servers")
|
|
2650
2482
|
},
|
|
2651
2483
|
messages: {
|
|
2652
2484
|
emptyTarget: "Copilot custom agent files that declare `mcp-servers` must define a non-empty `target: github-copilot` frontmatter value.",
|
|
@@ -2661,6 +2493,7 @@ var requireGithubCopilotTargetForMcpServersRule = createCopilotRule({
|
|
|
2661
2493
|
var require_github_copilot_target_for_mcp_servers_default = requireGithubCopilotTargetForMcpServersRule;
|
|
2662
2494
|
|
|
2663
2495
|
// dist/rules/require-instructions-apply-to.js
|
|
2496
|
+
var import_ts_extras21 = require("ts-extras");
|
|
2664
2497
|
var requireInstructionsApplyToRule = createCopilotRule({
|
|
2665
2498
|
create(context) {
|
|
2666
2499
|
return createMarkdownDocumentListener(() => {
|
|
@@ -2676,7 +2509,7 @@ var requireInstructionsApplyToRule = createCopilotRule({
|
|
|
2676
2509
|
}
|
|
2677
2510
|
const applyToScalar = getFrontmatterScalar(frontmatter, "applyTo");
|
|
2678
2511
|
const applyToList = getFrontmatterList(frontmatter, "applyTo");
|
|
2679
|
-
if (applyToScalar
|
|
2512
|
+
if ((0, import_ts_extras21.isDefined)(applyToScalar) || (0, import_ts_extras21.isDefined)(applyToList)) {
|
|
2680
2513
|
return;
|
|
2681
2514
|
}
|
|
2682
2515
|
reportAtDocumentStart(context, {
|
|
@@ -2696,7 +2529,8 @@ var requireInstructionsApplyToRule = createCopilotRule({
|
|
|
2696
2529
|
description: "require path-specific Copilot instructions files to declare a non-empty `applyTo` frontmatter glob.",
|
|
2697
2530
|
frozen: false,
|
|
2698
2531
|
recommended: true,
|
|
2699
|
-
requiresTypeChecking: false
|
|
2532
|
+
requiresTypeChecking: false,
|
|
2533
|
+
url: createRuleDocsUrl("require-instructions-apply-to")
|
|
2700
2534
|
},
|
|
2701
2535
|
messages: {
|
|
2702
2536
|
emptyApplyTo: "Copilot instructions files must define a non-empty `applyTo` frontmatter value.",
|
|
@@ -2711,6 +2545,7 @@ var requireInstructionsApplyToRule = createCopilotRule({
|
|
|
2711
2545
|
var require_instructions_apply_to_default = requireInstructionsApplyToRule;
|
|
2712
2546
|
|
|
2713
2547
|
// dist/rules/require-json-agent-mcp-servers.js
|
|
2548
|
+
var import_ts_extras22 = require("ts-extras");
|
|
2714
2549
|
var JSON_FILE_EXTENSION_PATTERN = /\.json$/iu;
|
|
2715
2550
|
var requireJsonAgentMcpServersRule = createCopilotRule({
|
|
2716
2551
|
create(context) {
|
|
@@ -2720,11 +2555,11 @@ var requireJsonAgentMcpServersRule = createCopilotRule({
|
|
|
2720
2555
|
}
|
|
2721
2556
|
const frontmatter = extractFrontmatter(context.sourceCode.text);
|
|
2722
2557
|
const mcpServers = frontmatter === null ? void 0 : getFrontmatterList(frontmatter, "mcp-servers");
|
|
2723
|
-
if (
|
|
2558
|
+
if (!(0, import_ts_extras22.isDefined)(mcpServers)) {
|
|
2724
2559
|
return;
|
|
2725
2560
|
}
|
|
2726
2561
|
const invalidServer = mcpServers.find((serverPath) => !JSON_FILE_EXTENSION_PATTERN.test(serverPath.trim()));
|
|
2727
|
-
if (
|
|
2562
|
+
if (!(0, import_ts_extras22.isDefined)(invalidServer)) {
|
|
2728
2563
|
return;
|
|
2729
2564
|
}
|
|
2730
2565
|
reportAtDocumentStart(context, {
|
|
@@ -2746,7 +2581,8 @@ var requireJsonAgentMcpServersRule = createCopilotRule({
|
|
|
2746
2581
|
description: "require Copilot custom-agent `mcp-servers` entries to reference JSON config files.",
|
|
2747
2582
|
frozen: false,
|
|
2748
2583
|
recommended: true,
|
|
2749
|
-
requiresTypeChecking: false
|
|
2584
|
+
requiresTypeChecking: false,
|
|
2585
|
+
url: createRuleDocsUrl("require-json-agent-mcp-servers")
|
|
2750
2586
|
},
|
|
2751
2587
|
messages: {
|
|
2752
2588
|
nonJsonAgentMcpServer: "Copilot custom-agent `mcp-servers` entry `{{mcpServer}}` should reference a `.json` config file."
|
|
@@ -2759,11 +2595,41 @@ var requireJsonAgentMcpServersRule = createCopilotRule({
|
|
|
2759
2595
|
var require_json_agent_mcp_servers_default = requireJsonAgentMcpServersRule;
|
|
2760
2596
|
|
|
2761
2597
|
// dist/rules/require-prompt-file-metadata.js
|
|
2598
|
+
var import_ts_extras23 = require("ts-extras");
|
|
2762
2599
|
var VALID_BUILT_IN_PROMPT_AGENTS = /* @__PURE__ */ new Set([
|
|
2763
2600
|
"agent",
|
|
2764
2601
|
"ask",
|
|
2765
2602
|
"plan"
|
|
2766
2603
|
]);
|
|
2604
|
+
var getRequiredPromptScalar = (context, frontmatter, key, emptyMessageId, missingMessageId) => {
|
|
2605
|
+
const value = getFrontmatterScalar(frontmatter, key);
|
|
2606
|
+
if ((0, import_ts_extras23.isDefined)(value)) {
|
|
2607
|
+
return value;
|
|
2608
|
+
}
|
|
2609
|
+
reportAtDocumentStart(context, {
|
|
2610
|
+
messageId: hasFrontmatterField(frontmatter, key) ? emptyMessageId : missingMessageId
|
|
2611
|
+
});
|
|
2612
|
+
return void 0;
|
|
2613
|
+
};
|
|
2614
|
+
var reportAgentToolsRequirement = (context, frontmatter, agent, tools) => {
|
|
2615
|
+
if (agent === "agent") {
|
|
2616
|
+
if ((0, import_ts_extras23.isDefined)(tools)) {
|
|
2617
|
+
return false;
|
|
2618
|
+
}
|
|
2619
|
+
reportAtDocumentStart(context, {
|
|
2620
|
+
messageId: hasFrontmatterField(frontmatter, "tools") ? "emptyTools" : "missingTools"
|
|
2621
|
+
});
|
|
2622
|
+
return true;
|
|
2623
|
+
}
|
|
2624
|
+
if ((0, import_ts_extras23.setHas)(VALID_BUILT_IN_PROMPT_AGENTS, agent) && hasFrontmatterField(frontmatter, "tools")) {
|
|
2625
|
+
reportAtDocumentStart(context, {
|
|
2626
|
+
data: { agent },
|
|
2627
|
+
messageId: "unexpectedTools"
|
|
2628
|
+
});
|
|
2629
|
+
return true;
|
|
2630
|
+
}
|
|
2631
|
+
return false;
|
|
2632
|
+
};
|
|
2767
2633
|
var requirePromptFileMetadataRule = createCopilotRule({
|
|
2768
2634
|
create(context) {
|
|
2769
2635
|
return createMarkdownDocumentListener(() => {
|
|
@@ -2777,11 +2643,8 @@ var requirePromptFileMetadataRule = createCopilotRule({
|
|
|
2777
2643
|
});
|
|
2778
2644
|
return;
|
|
2779
2645
|
}
|
|
2780
|
-
const description =
|
|
2781
|
-
if (
|
|
2782
|
-
reportAtDocumentStart(context, {
|
|
2783
|
-
messageId: hasFrontmatterField(frontmatter, "description") ? "emptyDescription" : "missingDescription"
|
|
2784
|
-
});
|
|
2646
|
+
const description = getRequiredPromptScalar(context, frontmatter, "description", "emptyDescription", "missingDescription");
|
|
2647
|
+
if (!(0, import_ts_extras23.isDefined)(description)) {
|
|
2785
2648
|
return;
|
|
2786
2649
|
}
|
|
2787
2650
|
if (hasFrontmatterField(frontmatter, "mode")) {
|
|
@@ -2790,29 +2653,12 @@ var requirePromptFileMetadataRule = createCopilotRule({
|
|
|
2790
2653
|
});
|
|
2791
2654
|
return;
|
|
2792
2655
|
}
|
|
2793
|
-
const agent =
|
|
2794
|
-
if (
|
|
2795
|
-
reportAtDocumentStart(context, {
|
|
2796
|
-
messageId: hasFrontmatterField(frontmatter, "agent") ? "emptyAgent" : "missingAgent"
|
|
2797
|
-
});
|
|
2656
|
+
const agent = getRequiredPromptScalar(context, frontmatter, "agent", "emptyAgent", "missingAgent");
|
|
2657
|
+
if (!(0, import_ts_extras23.isDefined)(agent)) {
|
|
2798
2658
|
return;
|
|
2799
2659
|
}
|
|
2800
2660
|
const tools = getFrontmatterList(frontmatter, "tools");
|
|
2801
|
-
|
|
2802
|
-
if (tools !== void 0) {
|
|
2803
|
-
return;
|
|
2804
|
-
}
|
|
2805
|
-
reportAtDocumentStart(context, {
|
|
2806
|
-
messageId: hasFrontmatterField(frontmatter, "tools") ? "emptyTools" : "missingTools"
|
|
2807
|
-
});
|
|
2808
|
-
return;
|
|
2809
|
-
}
|
|
2810
|
-
if (VALID_BUILT_IN_PROMPT_AGENTS.has(agent) && hasFrontmatterField(frontmatter, "tools")) {
|
|
2811
|
-
reportAtDocumentStart(context, {
|
|
2812
|
-
data: { agent },
|
|
2813
|
-
messageId: "unexpectedTools"
|
|
2814
|
-
});
|
|
2815
|
-
}
|
|
2661
|
+
reportAgentToolsRequirement(context, frontmatter, agent, tools);
|
|
2816
2662
|
});
|
|
2817
2663
|
},
|
|
2818
2664
|
meta: {
|
|
@@ -2827,7 +2673,8 @@ var requirePromptFileMetadataRule = createCopilotRule({
|
|
|
2827
2673
|
description: "require reusable Copilot prompt files to declare description, agent, and built-in agent-mode tools metadata.",
|
|
2828
2674
|
frozen: false,
|
|
2829
2675
|
recommended: true,
|
|
2830
|
-
requiresTypeChecking: false
|
|
2676
|
+
requiresTypeChecking: false,
|
|
2677
|
+
url: createRuleDocsUrl("require-prompt-file-metadata")
|
|
2831
2678
|
},
|
|
2832
2679
|
messages: {
|
|
2833
2680
|
deprecatedMode: "Copilot prompt files should use `agent` instead of the deprecated `mode` frontmatter key.",
|
|
@@ -2848,6 +2695,7 @@ var requirePromptFileMetadataRule = createCopilotRule({
|
|
|
2848
2695
|
var require_prompt_file_metadata_default = requirePromptFileMetadataRule;
|
|
2849
2696
|
|
|
2850
2697
|
// dist/rules/require-qualified-agent-handoff-models.js
|
|
2698
|
+
var import_ts_extras24 = require("ts-extras");
|
|
2851
2699
|
var isQualifiedModelName = (value) => {
|
|
2852
2700
|
const trimmedValue = value.trim();
|
|
2853
2701
|
if (!trimmedValue.endsWith(")")) {
|
|
@@ -2871,12 +2719,12 @@ var requireQualifiedAgentHandoffModelsRule = createCopilotRule({
|
|
|
2871
2719
|
return;
|
|
2872
2720
|
}
|
|
2873
2721
|
const handoffs = getFrontmatterObjectList(frontmatter, "handoffs");
|
|
2874
|
-
if (handoffs
|
|
2722
|
+
if (!(0, import_ts_extras24.isDefined)(handoffs) || (0, import_ts_extras24.isEmpty)(handoffs)) {
|
|
2875
2723
|
return;
|
|
2876
2724
|
}
|
|
2877
2725
|
for (const [index, handoff] of handoffs.entries()) {
|
|
2878
2726
|
const model = handoff["model"]?.trim();
|
|
2879
|
-
if (model
|
|
2727
|
+
if (!(0, import_ts_extras24.isDefined)(model) || model.length === 0 || isQualifiedModelName(model)) {
|
|
2880
2728
|
continue;
|
|
2881
2729
|
}
|
|
2882
2730
|
reportAtDocumentStart(context, {
|
|
@@ -2901,7 +2749,8 @@ var requireQualifiedAgentHandoffModelsRule = createCopilotRule({
|
|
|
2901
2749
|
description: "require Copilot custom-agent handoff models to use qualified `Model Name (vendor)` names.",
|
|
2902
2750
|
frozen: false,
|
|
2903
2751
|
recommended: true,
|
|
2904
|
-
requiresTypeChecking: false
|
|
2752
|
+
requiresTypeChecking: false,
|
|
2753
|
+
url: createRuleDocsUrl("require-qualified-agent-handoff-models")
|
|
2905
2754
|
},
|
|
2906
2755
|
messages: {
|
|
2907
2756
|
unqualifiedHandoffModel: "Copilot custom agent handoff #{{handoffNumber}} should use a qualified `handoffs.model` name like `GPT-5 (copilot)`, not `{{model}}`."
|
|
@@ -2914,6 +2763,7 @@ var requireQualifiedAgentHandoffModelsRule = createCopilotRule({
|
|
|
2914
2763
|
var require_qualified_agent_handoff_models_default = requireQualifiedAgentHandoffModelsRule;
|
|
2915
2764
|
|
|
2916
2765
|
// dist/rules/require-relative-agent-hook-cwd.js
|
|
2766
|
+
var import_ts_extras25 = require("ts-extras");
|
|
2917
2767
|
var isValidRelativeHookCwd = (cwd) => {
|
|
2918
2768
|
const trimmedCwd = cwd.trim();
|
|
2919
2769
|
return trimmedCwd.length > 0 && isRelativeWorkspacePath(trimmedCwd);
|
|
@@ -2929,13 +2779,13 @@ var requireRelativeAgentHookCwdRule = createCopilotRule({
|
|
|
2929
2779
|
return;
|
|
2930
2780
|
}
|
|
2931
2781
|
const hookGroups = getFrontmatterObjectListGroups(frontmatter, "hooks");
|
|
2932
|
-
if (hookGroups
|
|
2782
|
+
if (!(0, import_ts_extras25.isDefined)(hookGroups) || hookGroups.size === 0) {
|
|
2933
2783
|
return;
|
|
2934
2784
|
}
|
|
2935
2785
|
for (const [eventName, hooks] of hookGroups) {
|
|
2936
2786
|
for (const [index, hook] of hooks.entries()) {
|
|
2937
2787
|
const cwd = hook["cwd"]?.trim();
|
|
2938
|
-
if (cwd
|
|
2788
|
+
if (!(0, import_ts_extras25.isDefined)(cwd) || isValidRelativeHookCwd(cwd)) {
|
|
2939
2789
|
continue;
|
|
2940
2790
|
}
|
|
2941
2791
|
reportAtDocumentStart(context, {
|
|
@@ -2962,7 +2812,8 @@ var requireRelativeAgentHookCwdRule = createCopilotRule({
|
|
|
2962
2812
|
description: "require Copilot custom-agent hook `cwd` values to stay relative to the repository root.",
|
|
2963
2813
|
frozen: false,
|
|
2964
2814
|
recommended: true,
|
|
2965
|
-
requiresTypeChecking: false
|
|
2815
|
+
requiresTypeChecking: false,
|
|
2816
|
+
url: createRuleDocsUrl("require-relative-agent-hook-cwd")
|
|
2966
2817
|
},
|
|
2967
2818
|
messages: {
|
|
2968
2819
|
invalidHookCwd: "Copilot custom agent hook #{{hookNumber}} in `{{eventName}}` must use a non-empty repository-relative `cwd` value, not `{{currentValue}}`."
|
|
@@ -3012,7 +2863,8 @@ var requireRelativeAgentLinksRule = createCopilotRule({
|
|
|
3012
2863
|
description: "require Copilot custom agents to use relative Markdown links for workspace files.",
|
|
3013
2864
|
frozen: false,
|
|
3014
2865
|
recommended: true,
|
|
3015
|
-
requiresTypeChecking: false
|
|
2866
|
+
requiresTypeChecking: false,
|
|
2867
|
+
url: createRuleDocsUrl("require-relative-agent-links")
|
|
3016
2868
|
},
|
|
3017
2869
|
messages: {
|
|
3018
2870
|
nonRelativeAgentLink: "Copilot custom agents should reference workspace files with relative Markdown links, not `{{destination}}`."
|
|
@@ -3062,7 +2914,8 @@ var requireRelativeInstructionsLinksRule = createCopilotRule({
|
|
|
3062
2914
|
description: "require path-specific Copilot instructions files to use relative Markdown links for workspace files.",
|
|
3063
2915
|
frozen: false,
|
|
3064
2916
|
recommended: true,
|
|
3065
|
-
requiresTypeChecking: false
|
|
2917
|
+
requiresTypeChecking: false,
|
|
2918
|
+
url: createRuleDocsUrl("require-relative-instructions-links")
|
|
3066
2919
|
},
|
|
3067
2920
|
messages: {
|
|
3068
2921
|
nonRelativeInstructionsLink: "Copilot instructions files should reference workspace files with relative Markdown links, not `{{destination}}`."
|
|
@@ -3130,7 +2983,8 @@ var requireRelativePromptLinksRule = createCopilotRule({
|
|
|
3130
2983
|
description: "require Copilot prompt files to use relative Markdown links for workspace files.",
|
|
3131
2984
|
frozen: false,
|
|
3132
2985
|
recommended: true,
|
|
3133
|
-
requiresTypeChecking: false
|
|
2986
|
+
requiresTypeChecking: false,
|
|
2987
|
+
url: createRuleDocsUrl("require-relative-prompt-links")
|
|
3134
2988
|
},
|
|
3135
2989
|
messages: {
|
|
3136
2990
|
nonRelativePromptLink: "Copilot prompt files should reference workspace files with relative Markdown links, not `{{destination}}`."
|
|
@@ -3143,6 +2997,7 @@ var requireRelativePromptLinksRule = createCopilotRule({
|
|
|
3143
2997
|
var require_relative_prompt_links_default = requireRelativePromptLinksRule;
|
|
3144
2998
|
|
|
3145
2999
|
// dist/rules/require-relative-repository-hook-cwd.js
|
|
3000
|
+
var import_ts_extras26 = require("ts-extras");
|
|
3146
3001
|
var requireRelativeRepositoryHookCwdRule = createCopilotRule({
|
|
3147
3002
|
create(context) {
|
|
3148
3003
|
return {
|
|
@@ -3155,7 +3010,7 @@ var requireRelativeRepositoryHookCwdRule = createCopilotRule({
|
|
|
3155
3010
|
const cwd2 = hook["cwd"];
|
|
3156
3011
|
return isJsonString(cwd2) && isNonRelativeWorkspacePath(cwd2);
|
|
3157
3012
|
});
|
|
3158
|
-
if (
|
|
3013
|
+
if (!(0, import_ts_extras26.isDefined)(invalidHook)) {
|
|
3159
3014
|
return;
|
|
3160
3015
|
}
|
|
3161
3016
|
const cwd = invalidHook.hook["cwd"];
|
|
@@ -3183,7 +3038,8 @@ var requireRelativeRepositoryHookCwdRule = createCopilotRule({
|
|
|
3183
3038
|
description: "require repository hook `cwd` values to use repository-relative paths.",
|
|
3184
3039
|
frozen: false,
|
|
3185
3040
|
recommended: true,
|
|
3186
|
-
requiresTypeChecking: false
|
|
3041
|
+
requiresTypeChecking: false,
|
|
3042
|
+
url: createRuleDocsUrl("require-relative-repository-hook-cwd")
|
|
3187
3043
|
},
|
|
3188
3044
|
messages: {
|
|
3189
3045
|
nonRelativeRepositoryHookCwd: "Repository hook `cwd` values for `{{eventName}}` should use repository-relative paths, not `{{cwd}}`."
|
|
@@ -3233,7 +3089,8 @@ var requireRelativeSkillLinksRule = createCopilotRule({
|
|
|
3233
3089
|
description: "require Copilot skill definition files to use relative Markdown links for workspace resources.",
|
|
3234
3090
|
frozen: false,
|
|
3235
3091
|
recommended: true,
|
|
3236
|
-
requiresTypeChecking: false
|
|
3092
|
+
requiresTypeChecking: false,
|
|
3093
|
+
url: createRuleDocsUrl("require-relative-skill-links")
|
|
3237
3094
|
},
|
|
3238
3095
|
messages: {
|
|
3239
3096
|
nonRelativeSkillLink: "Copilot skill definition files should reference workspace resources with relative Markdown links, not `{{destination}}`."
|
|
@@ -3246,6 +3103,7 @@ var requireRelativeSkillLinksRule = createCopilotRule({
|
|
|
3246
3103
|
var require_relative_skill_links_default = requireRelativeSkillLinksRule;
|
|
3247
3104
|
|
|
3248
3105
|
// dist/rules/require-repository-hook-arrays.js
|
|
3106
|
+
var import_ts_extras27 = require("ts-extras");
|
|
3249
3107
|
var requireRepositoryHookArraysRule = createCopilotRule({
|
|
3250
3108
|
create(context) {
|
|
3251
3109
|
return {
|
|
@@ -3254,13 +3112,13 @@ var requireRepositoryHookArraysRule = createCopilotRule({
|
|
|
3254
3112
|
return;
|
|
3255
3113
|
}
|
|
3256
3114
|
const root = parseJsonText(context.sourceCode.text);
|
|
3257
|
-
const invalidEntry = getRepositoryHookEventEntries(root).find(([, eventValue]) => !isJsonArray(eventValue));
|
|
3258
|
-
if (invalidEntry ===
|
|
3115
|
+
const invalidEntry = getRepositoryHookEventEntries(root).find(([, eventValue]) => !isJsonArray(eventValue)) ?? null;
|
|
3116
|
+
if (invalidEntry === null) {
|
|
3259
3117
|
return;
|
|
3260
3118
|
}
|
|
3261
3119
|
reportAtDocumentStart(context, {
|
|
3262
3120
|
data: {
|
|
3263
|
-
eventName:
|
|
3121
|
+
eventName: (0, import_ts_extras27.arrayFirst)(invalidEntry),
|
|
3264
3122
|
value: formatJsonValue(invalidEntry[1])
|
|
3265
3123
|
},
|
|
3266
3124
|
messageId: "invalidRepositoryHookArray"
|
|
@@ -3279,7 +3137,8 @@ var requireRepositoryHookArraysRule = createCopilotRule({
|
|
|
3279
3137
|
description: "require each repository hook event entry in `hooks` to be an array.",
|
|
3280
3138
|
frozen: false,
|
|
3281
3139
|
recommended: true,
|
|
3282
|
-
requiresTypeChecking: false
|
|
3140
|
+
requiresTypeChecking: false,
|
|
3141
|
+
url: createRuleDocsUrl("require-repository-hook-arrays")
|
|
3283
3142
|
},
|
|
3284
3143
|
messages: {
|
|
3285
3144
|
invalidRepositoryHookArray: "Repository hook event `{{eventName}}` must map to an array of hook definitions (current value: `{{value}}`)."
|
|
@@ -3292,6 +3151,7 @@ var requireRepositoryHookArraysRule = createCopilotRule({
|
|
|
3292
3151
|
var require_repository_hook_arrays_default = requireRepositoryHookArraysRule;
|
|
3293
3152
|
|
|
3294
3153
|
// dist/rules/require-repository-hook-command-shell.js
|
|
3154
|
+
var import_ts_extras28 = require("ts-extras");
|
|
3295
3155
|
var hasHookShellCommand = (value) => typeof value === "string" && value.trim().length > 0;
|
|
3296
3156
|
var requireRepositoryHookCommandShellRule = createCopilotRule({
|
|
3297
3157
|
create(context) {
|
|
@@ -3302,7 +3162,7 @@ var requireRepositoryHookCommandShellRule = createCopilotRule({
|
|
|
3302
3162
|
}
|
|
3303
3163
|
const root = parseJsonText(context.sourceCode.text);
|
|
3304
3164
|
const invalidHook = getRepositoryHookObjects(root).find(({ hook }) => isJsonString(hook["type"]) && hook["type"] === "command" && !hasHookShellCommand(hook["bash"]) && !hasHookShellCommand(hook["powershell"]));
|
|
3305
|
-
if (
|
|
3165
|
+
if (!(0, import_ts_extras28.isDefined)(invalidHook)) {
|
|
3306
3166
|
return;
|
|
3307
3167
|
}
|
|
3308
3168
|
reportAtDocumentStart(context, {
|
|
@@ -3325,7 +3185,8 @@ var requireRepositoryHookCommandShellRule = createCopilotRule({
|
|
|
3325
3185
|
description: "require repository `command` hook definitions to declare at least one shell command under `bash` or `powershell`.",
|
|
3326
3186
|
frozen: false,
|
|
3327
3187
|
recommended: true,
|
|
3328
|
-
requiresTypeChecking: false
|
|
3188
|
+
requiresTypeChecking: false,
|
|
3189
|
+
url: createRuleDocsUrl("require-repository-hook-command-shell")
|
|
3329
3190
|
},
|
|
3330
3191
|
messages: {
|
|
3331
3192
|
missingRepositoryHookShellCommand: "Repository `command` hooks for `{{eventName}}` must declare a non-empty `bash` or `powershell` command."
|
|
@@ -3367,7 +3228,8 @@ var requireRepositoryHooksObjectRule = createCopilotRule({
|
|
|
3367
3228
|
description: "require repository hook configuration files to declare a top-level `hooks` object.",
|
|
3368
3229
|
frozen: false,
|
|
3369
3230
|
recommended: true,
|
|
3370
|
-
requiresTypeChecking: false
|
|
3231
|
+
requiresTypeChecking: false,
|
|
3232
|
+
url: createRuleDocsUrl("require-repository-hooks-object")
|
|
3371
3233
|
},
|
|
3372
3234
|
messages: {
|
|
3373
3235
|
invalidRepositoryHooksObject: "Repository hook configuration files must declare a top-level `hooks` object."
|
|
@@ -3407,7 +3269,8 @@ var requireRepositoryInstructionsFileRule = createCopilotRule({
|
|
|
3407
3269
|
description: "require repositories that define Copilot customization assets to also provide repository instructions via `.github/copilot-instructions.md` or `.github/instructions/copilot-instructions.md`.",
|
|
3408
3270
|
frozen: false,
|
|
3409
3271
|
recommended: false,
|
|
3410
|
-
requiresTypeChecking: false
|
|
3272
|
+
requiresTypeChecking: false,
|
|
3273
|
+
url: createRuleDocsUrl("require-repository-instructions-file")
|
|
3411
3274
|
},
|
|
3412
3275
|
messages: {
|
|
3413
3276
|
missingRepositoryInstructions: "Repositories that define Copilot prompts, custom agents, legacy chat modes, agent instructions, or path-specific instructions should also provide baseline repository guidance in `.github/copilot-instructions.md` or `.github/instructions/copilot-instructions.md`."
|
|
@@ -3455,7 +3318,8 @@ var requireSkillFileLocationRule = createCopilotRule({
|
|
|
3455
3318
|
description: "require project skill definition files to live at a documented `.github/skills/<skill>/SKILL.md` or `.claude/skills/<skill>/SKILL.md` path.",
|
|
3456
3319
|
frozen: false,
|
|
3457
3320
|
recommended: true,
|
|
3458
|
-
requiresTypeChecking: false
|
|
3321
|
+
requiresTypeChecking: false,
|
|
3322
|
+
url: createRuleDocsUrl("require-skill-file-location")
|
|
3459
3323
|
},
|
|
3460
3324
|
messages: {
|
|
3461
3325
|
invalidSkillLocation: "Copilot skill definition files should live at `.github/skills/<skill>/SKILL.md` or `.claude/skills/<skill>/SKILL.md`."
|
|
@@ -3468,6 +3332,7 @@ var requireSkillFileLocationRule = createCopilotRule({
|
|
|
3468
3332
|
var require_skill_file_location_default = requireSkillFileLocationRule;
|
|
3469
3333
|
|
|
3470
3334
|
// dist/rules/require-skill-file-metadata.js
|
|
3335
|
+
var import_ts_extras29 = require("ts-extras");
|
|
3471
3336
|
var requireSkillFileMetadataRule = createCopilotRule({
|
|
3472
3337
|
create(context) {
|
|
3473
3338
|
return createMarkdownDocumentListener(() => {
|
|
@@ -3481,13 +3346,13 @@ var requireSkillFileMetadataRule = createCopilotRule({
|
|
|
3481
3346
|
});
|
|
3482
3347
|
return;
|
|
3483
3348
|
}
|
|
3484
|
-
if (getFrontmatterScalar(frontmatter, "name")
|
|
3349
|
+
if (!(0, import_ts_extras29.isDefined)(getFrontmatterScalar(frontmatter, "name"))) {
|
|
3485
3350
|
reportAtDocumentStart(context, {
|
|
3486
3351
|
messageId: "missingSkillName"
|
|
3487
3352
|
});
|
|
3488
3353
|
return;
|
|
3489
3354
|
}
|
|
3490
|
-
if (getFrontmatterScalar(frontmatter, "description")
|
|
3355
|
+
if (!(0, import_ts_extras29.isDefined)(getFrontmatterScalar(frontmatter, "description"))) {
|
|
3491
3356
|
reportAtDocumentStart(context, {
|
|
3492
3357
|
messageId: "missingSkillDescription"
|
|
3493
3358
|
});
|
|
@@ -3505,7 +3370,8 @@ var requireSkillFileMetadataRule = createCopilotRule({
|
|
|
3505
3370
|
description: "require Copilot skill definition files to declare `name` and `description` frontmatter.",
|
|
3506
3371
|
frozen: false,
|
|
3507
3372
|
recommended: true,
|
|
3508
|
-
requiresTypeChecking: false
|
|
3373
|
+
requiresTypeChecking: false,
|
|
3374
|
+
url: createRuleDocsUrl("require-skill-file-metadata")
|
|
3509
3375
|
},
|
|
3510
3376
|
messages: {
|
|
3511
3377
|
missingSkillDescription: "Copilot skill definition files must declare a non-empty `description` frontmatter value.",
|
|
@@ -3553,7 +3419,8 @@ var requireSkillMdFilenameRule = createCopilotRule({
|
|
|
3553
3419
|
description: "require markdown files that declare skill-definition frontmatter to use the documented `SKILL.md` filename.",
|
|
3554
3420
|
frozen: false,
|
|
3555
3421
|
recommended: true,
|
|
3556
|
-
requiresTypeChecking: false
|
|
3422
|
+
requiresTypeChecking: false,
|
|
3423
|
+
url: createRuleDocsUrl("require-skill-md-filename")
|
|
3557
3424
|
},
|
|
3558
3425
|
messages: {
|
|
3559
3426
|
invalidSkillDefinitionFilename: "Skill-definition markdown files should be named `SKILL.md`, not `{{basename}}`."
|
|
@@ -3566,6 +3433,7 @@ var requireSkillMdFilenameRule = createCopilotRule({
|
|
|
3566
3433
|
var require_skill_md_filename_default = requireSkillMdFilenameRule;
|
|
3567
3434
|
|
|
3568
3435
|
// dist/rules/require-skill-name-match-directory.js
|
|
3436
|
+
var import_ts_extras30 = require("ts-extras");
|
|
3569
3437
|
var requireSkillNameMatchDirectoryRule = createCopilotRule({
|
|
3570
3438
|
create(context) {
|
|
3571
3439
|
return createMarkdownDocumentListener(() => {
|
|
@@ -3574,7 +3442,7 @@ var requireSkillNameMatchDirectoryRule = createCopilotRule({
|
|
|
3574
3442
|
}
|
|
3575
3443
|
const frontmatter = extractFrontmatter(context.sourceCode.text);
|
|
3576
3444
|
const explicitSkillName = frontmatter === null ? void 0 : getFrontmatterScalar(frontmatter, "name");
|
|
3577
|
-
if (
|
|
3445
|
+
if (!(0, import_ts_extras30.isDefined)(explicitSkillName)) {
|
|
3578
3446
|
return;
|
|
3579
3447
|
}
|
|
3580
3448
|
const skillName = getSkillName(context.filename, frontmatter);
|
|
@@ -3601,7 +3469,8 @@ var requireSkillNameMatchDirectoryRule = createCopilotRule({
|
|
|
3601
3469
|
description: "require Copilot skill `name` metadata to match the skill directory name.",
|
|
3602
3470
|
frozen: false,
|
|
3603
3471
|
recommended: false,
|
|
3604
|
-
requiresTypeChecking: false
|
|
3472
|
+
requiresTypeChecking: false,
|
|
3473
|
+
url: createRuleDocsUrl("require-skill-name-match-directory")
|
|
3605
3474
|
},
|
|
3606
3475
|
messages: {
|
|
3607
3476
|
skillNameDoesNotMatchDirectory: "Copilot skill `name` value `{{name}}` should match its directory name `{{directoryName}}`."
|
|
@@ -3614,6 +3483,7 @@ var requireSkillNameMatchDirectoryRule = createCopilotRule({
|
|
|
3614
3483
|
var require_skill_name_match_directory_default = requireSkillNameMatchDirectoryRule;
|
|
3615
3484
|
|
|
3616
3485
|
// dist/rules/require-string-repository-hook-env-values.js
|
|
3486
|
+
var import_ts_extras31 = require("ts-extras");
|
|
3617
3487
|
var requireStringRepositoryHookEnvValuesRule = createCopilotRule({
|
|
3618
3488
|
create(context) {
|
|
3619
3489
|
return {
|
|
@@ -3624,9 +3494,9 @@ var requireStringRepositoryHookEnvValuesRule = createCopilotRule({
|
|
|
3624
3494
|
const root = parseJsonText(context.sourceCode.text);
|
|
3625
3495
|
const invalidHook = getRepositoryHookObjects(root).find(({ hook }) => {
|
|
3626
3496
|
const env2 = hook["env"];
|
|
3627
|
-
return isJsonObject(env2) &&
|
|
3497
|
+
return isJsonObject(env2) && (0, import_ts_extras31.objectValues)(env2).some((value) => !isJsonString(value));
|
|
3628
3498
|
});
|
|
3629
|
-
if (
|
|
3499
|
+
if (!(0, import_ts_extras31.isDefined)(invalidHook)) {
|
|
3630
3500
|
return;
|
|
3631
3501
|
}
|
|
3632
3502
|
const env = invalidHook.hook["env"];
|
|
@@ -3651,7 +3521,8 @@ var requireStringRepositoryHookEnvValuesRule = createCopilotRule({
|
|
|
3651
3521
|
description: "require repository hook `env` objects to use string values.",
|
|
3652
3522
|
frozen: false,
|
|
3653
3523
|
recommended: true,
|
|
3654
|
-
requiresTypeChecking: false
|
|
3524
|
+
requiresTypeChecking: false,
|
|
3525
|
+
url: createRuleDocsUrl("require-string-repository-hook-env-values")
|
|
3655
3526
|
},
|
|
3656
3527
|
messages: {
|
|
3657
3528
|
nonStringRepositoryHookEnvValue: "Repository hook `env` for `{{eventName}}` must use string values only (current value: `{{env}}`)."
|
|
@@ -3664,6 +3535,7 @@ var requireStringRepositoryHookEnvValuesRule = createCopilotRule({
|
|
|
3664
3535
|
var require_string_repository_hook_env_values_default = requireStringRepositoryHookEnvValuesRule;
|
|
3665
3536
|
|
|
3666
3537
|
// dist/rules/require-valid-agent-argument-hint.js
|
|
3538
|
+
var import_ts_extras32 = require("ts-extras");
|
|
3667
3539
|
var requireValidAgentArgumentHintRule = createCopilotRule({
|
|
3668
3540
|
create(context) {
|
|
3669
3541
|
return createMarkdownDocumentListener(() => {
|
|
@@ -3674,7 +3546,7 @@ var requireValidAgentArgumentHintRule = createCopilotRule({
|
|
|
3674
3546
|
if (frontmatter === null || !hasFrontmatterField(frontmatter, "argument-hint")) {
|
|
3675
3547
|
return;
|
|
3676
3548
|
}
|
|
3677
|
-
if (getFrontmatterScalar(frontmatter, "argument-hint")
|
|
3549
|
+
if ((0, import_ts_extras32.isDefined)(getFrontmatterScalar(frontmatter, "argument-hint"))) {
|
|
3678
3550
|
return;
|
|
3679
3551
|
}
|
|
3680
3552
|
reportAtDocumentStart(context, {
|
|
@@ -3693,7 +3565,8 @@ var requireValidAgentArgumentHintRule = createCopilotRule({
|
|
|
3693
3565
|
description: "require Copilot custom-agent `argument-hint` metadata to be a non-empty scalar when present.",
|
|
3694
3566
|
frozen: false,
|
|
3695
3567
|
recommended: true,
|
|
3696
|
-
requiresTypeChecking: false
|
|
3568
|
+
requiresTypeChecking: false,
|
|
3569
|
+
url: createRuleDocsUrl("require-valid-agent-argument-hint")
|
|
3697
3570
|
},
|
|
3698
3571
|
messages: {
|
|
3699
3572
|
invalidAgentArgumentHint: "Copilot custom-agent `argument-hint` metadata must be a non-empty scalar when present."
|
|
@@ -3706,6 +3579,7 @@ var requireValidAgentArgumentHintRule = createCopilotRule({
|
|
|
3706
3579
|
var require_valid_agent_argument_hint_default = requireValidAgentArgumentHintRule;
|
|
3707
3580
|
|
|
3708
3581
|
// dist/rules/require-valid-agent-handoff-send.js
|
|
3582
|
+
var import_ts_extras33 = require("ts-extras");
|
|
3709
3583
|
var VALID_BOOLEAN_FIELD_VALUES = /* @__PURE__ */ new Set(["false", "true"]);
|
|
3710
3584
|
var requireValidAgentHandoffSendRule = createCopilotRule({
|
|
3711
3585
|
create(context) {
|
|
@@ -3718,16 +3592,16 @@ var requireValidAgentHandoffSendRule = createCopilotRule({
|
|
|
3718
3592
|
return;
|
|
3719
3593
|
}
|
|
3720
3594
|
const handoffs = getFrontmatterObjectList(frontmatter, "handoffs");
|
|
3721
|
-
if (handoffs
|
|
3595
|
+
if (!(0, import_ts_extras33.isDefined)(handoffs) || (0, import_ts_extras33.isEmpty)(handoffs)) {
|
|
3722
3596
|
return;
|
|
3723
3597
|
}
|
|
3724
3598
|
for (const [index, handoff] of handoffs.entries()) {
|
|
3725
3599
|
const rawSend = handoff["send"];
|
|
3726
|
-
if (
|
|
3600
|
+
if (!(0, import_ts_extras33.isDefined)(rawSend)) {
|
|
3727
3601
|
continue;
|
|
3728
3602
|
}
|
|
3729
3603
|
const normalizedSend = rawSend.trim().toLowerCase();
|
|
3730
|
-
if (
|
|
3604
|
+
if ((0, import_ts_extras33.setHas)(VALID_BOOLEAN_FIELD_VALUES, normalizedSend)) {
|
|
3731
3605
|
continue;
|
|
3732
3606
|
}
|
|
3733
3607
|
reportAtDocumentStart(context, {
|
|
@@ -3752,7 +3626,8 @@ var requireValidAgentHandoffSendRule = createCopilotRule({
|
|
|
3752
3626
|
description: "require Copilot custom-agent handoff `send` values to use documented boolean metadata when present.",
|
|
3753
3627
|
frozen: false,
|
|
3754
3628
|
recommended: true,
|
|
3755
|
-
requiresTypeChecking: false
|
|
3629
|
+
requiresTypeChecking: false,
|
|
3630
|
+
url: createRuleDocsUrl("require-valid-agent-handoff-send")
|
|
3756
3631
|
},
|
|
3757
3632
|
messages: {
|
|
3758
3633
|
invalidHandoffSend: "Copilot custom agent handoff #{{handoffNumber}} must use a boolean `send` value (`true` or `false`), not `{{sendValue}}`."
|
|
@@ -3765,6 +3640,7 @@ var requireValidAgentHandoffSendRule = createCopilotRule({
|
|
|
3765
3640
|
var require_valid_agent_handoff_send_default = requireValidAgentHandoffSendRule;
|
|
3766
3641
|
|
|
3767
3642
|
// dist/rules/require-valid-agent-handoffs.js
|
|
3643
|
+
var import_ts_extras34 = require("ts-extras");
|
|
3768
3644
|
var requireValidAgentHandoffsRule = createCopilotRule({
|
|
3769
3645
|
create(context) {
|
|
3770
3646
|
return createMarkdownDocumentListener(() => {
|
|
@@ -3776,7 +3652,7 @@ var requireValidAgentHandoffsRule = createCopilotRule({
|
|
|
3776
3652
|
return;
|
|
3777
3653
|
}
|
|
3778
3654
|
const handoffs = getFrontmatterObjectList(frontmatter, "handoffs");
|
|
3779
|
-
if (handoffs
|
|
3655
|
+
if (!(0, import_ts_extras34.isDefined)(handoffs) || (0, import_ts_extras34.isEmpty)(handoffs)) {
|
|
3780
3656
|
return;
|
|
3781
3657
|
}
|
|
3782
3658
|
for (const [index, handoff] of handoffs.entries()) {
|
|
@@ -3820,7 +3696,8 @@ var requireValidAgentHandoffsRule = createCopilotRule({
|
|
|
3820
3696
|
description: "require Copilot custom-agent handoffs to define the metadata needed for usable guided transitions.",
|
|
3821
3697
|
frozen: false,
|
|
3822
3698
|
recommended: true,
|
|
3823
|
-
requiresTypeChecking: false
|
|
3699
|
+
requiresTypeChecking: false,
|
|
3700
|
+
url: createRuleDocsUrl("require-valid-agent-handoffs")
|
|
3824
3701
|
},
|
|
3825
3702
|
messages: {
|
|
3826
3703
|
missingAgent: "Copilot custom agent handoff #{{handoffNumber}} must define a non-empty `agent` target.",
|
|
@@ -3835,6 +3712,7 @@ var requireValidAgentHandoffsRule = createCopilotRule({
|
|
|
3835
3712
|
var require_valid_agent_handoffs_default = requireValidAgentHandoffsRule;
|
|
3836
3713
|
|
|
3837
3714
|
// dist/rules/require-valid-agent-hook-events.js
|
|
3715
|
+
var import_ts_extras35 = require("ts-extras");
|
|
3838
3716
|
var VALID_HOOK_EVENT_NAMES = /* @__PURE__ */ new Set([
|
|
3839
3717
|
"PostToolUse",
|
|
3840
3718
|
"PreCompact",
|
|
@@ -3856,11 +3734,11 @@ var requireValidAgentHookEventsRule = createCopilotRule({
|
|
|
3856
3734
|
return;
|
|
3857
3735
|
}
|
|
3858
3736
|
const hookGroups = getFrontmatterObjectListGroups(frontmatter, "hooks");
|
|
3859
|
-
if (hookGroups
|
|
3737
|
+
if (!(0, import_ts_extras35.isDefined)(hookGroups) || hookGroups.size === 0) {
|
|
3860
3738
|
return;
|
|
3861
3739
|
}
|
|
3862
3740
|
for (const eventName of hookGroups.keys()) {
|
|
3863
|
-
if (
|
|
3741
|
+
if ((0, import_ts_extras35.setHas)(VALID_HOOK_EVENT_NAMES, eventName)) {
|
|
3864
3742
|
continue;
|
|
3865
3743
|
}
|
|
3866
3744
|
reportAtDocumentStart(context, {
|
|
@@ -3882,7 +3760,8 @@ var requireValidAgentHookEventsRule = createCopilotRule({
|
|
|
3882
3760
|
description: "require Copilot custom-agent hooks to use supported VS Code hook event names.",
|
|
3883
3761
|
frozen: false,
|
|
3884
3762
|
recommended: true,
|
|
3885
|
-
requiresTypeChecking: false
|
|
3763
|
+
requiresTypeChecking: false,
|
|
3764
|
+
url: createRuleDocsUrl("require-valid-agent-hook-events")
|
|
3886
3765
|
},
|
|
3887
3766
|
messages: {
|
|
3888
3767
|
invalidHookEvent: "Copilot custom agent hooks should use a supported event name, not `{{eventName}}`."
|
|
@@ -3895,6 +3774,7 @@ var requireValidAgentHookEventsRule = createCopilotRule({
|
|
|
3895
3774
|
var require_valid_agent_hook_events_default = requireValidAgentHookEventsRule;
|
|
3896
3775
|
|
|
3897
3776
|
// dist/rules/require-valid-agent-hook-timeouts.js
|
|
3777
|
+
var import_ts_extras36 = require("ts-extras");
|
|
3898
3778
|
var isNumericTimeoutValue = (value) => {
|
|
3899
3779
|
let decimalPointCount = 0;
|
|
3900
3780
|
for (const character of value) {
|
|
@@ -3922,13 +3802,13 @@ var requireValidAgentHookTimeoutsRule = createCopilotRule({
|
|
|
3922
3802
|
return;
|
|
3923
3803
|
}
|
|
3924
3804
|
const hookGroups = getFrontmatterObjectListGroups(frontmatter, "hooks");
|
|
3925
|
-
if (hookGroups
|
|
3805
|
+
if (!(0, import_ts_extras36.isDefined)(hookGroups) || hookGroups.size === 0) {
|
|
3926
3806
|
return;
|
|
3927
3807
|
}
|
|
3928
3808
|
for (const [eventName, hooks] of hookGroups) {
|
|
3929
3809
|
for (const [index, hook] of hooks.entries()) {
|
|
3930
3810
|
const timeout = hook["timeout"]?.trim();
|
|
3931
|
-
if (timeout
|
|
3811
|
+
if (!(0, import_ts_extras36.isDefined)(timeout) || timeout.length === 0 || isNumericTimeoutValue(timeout)) {
|
|
3932
3812
|
continue;
|
|
3933
3813
|
}
|
|
3934
3814
|
reportAtDocumentStart(context, {
|
|
@@ -3955,7 +3835,8 @@ var requireValidAgentHookTimeoutsRule = createCopilotRule({
|
|
|
3955
3835
|
description: "require Copilot custom-agent hook `timeout` values to be numeric seconds when present.",
|
|
3956
3836
|
frozen: false,
|
|
3957
3837
|
recommended: true,
|
|
3958
|
-
requiresTypeChecking: false
|
|
3838
|
+
requiresTypeChecking: false,
|
|
3839
|
+
url: createRuleDocsUrl("require-valid-agent-hook-timeouts")
|
|
3959
3840
|
},
|
|
3960
3841
|
messages: {
|
|
3961
3842
|
invalidHookTimeout: "Copilot custom agent hook #{{hookNumber}} in `{{eventName}}` should use a numeric `timeout` value in seconds, not `{{timeout}}`."
|
|
@@ -3968,6 +3849,7 @@ var requireValidAgentHookTimeoutsRule = createCopilotRule({
|
|
|
3968
3849
|
var require_valid_agent_hook_timeouts_default = requireValidAgentHookTimeoutsRule;
|
|
3969
3850
|
|
|
3970
3851
|
// dist/rules/require-valid-agent-hooks.js
|
|
3852
|
+
var import_ts_extras37 = require("ts-extras");
|
|
3971
3853
|
var hasAnyHookCommand = (hook) => [
|
|
3972
3854
|
"command",
|
|
3973
3855
|
"windows",
|
|
@@ -3977,6 +3859,29 @@ var hasAnyHookCommand = (hook) => [
|
|
|
3977
3859
|
const value = hook[key];
|
|
3978
3860
|
return typeof value === "string" && value.trim().length > 0;
|
|
3979
3861
|
});
|
|
3862
|
+
var getInvalidHookReport = (eventName, hook, hookNumber) => {
|
|
3863
|
+
const type = hook["type"]?.trim() ?? "";
|
|
3864
|
+
if (type !== "command") {
|
|
3865
|
+
return {
|
|
3866
|
+
data: {
|
|
3867
|
+
eventName,
|
|
3868
|
+
hookNumber,
|
|
3869
|
+
type: type.length === 0 ? "(missing)" : type
|
|
3870
|
+
},
|
|
3871
|
+
messageId: "invalidHookType"
|
|
3872
|
+
};
|
|
3873
|
+
}
|
|
3874
|
+
if (hasAnyHookCommand(hook)) {
|
|
3875
|
+
return void 0;
|
|
3876
|
+
}
|
|
3877
|
+
return {
|
|
3878
|
+
data: {
|
|
3879
|
+
eventName,
|
|
3880
|
+
hookNumber
|
|
3881
|
+
},
|
|
3882
|
+
messageId: "missingHookCommand"
|
|
3883
|
+
};
|
|
3884
|
+
};
|
|
3980
3885
|
var requireValidAgentHooksRule = createCopilotRule({
|
|
3981
3886
|
create(context) {
|
|
3982
3887
|
return createMarkdownDocumentListener(() => {
|
|
@@ -3988,34 +3893,17 @@ var requireValidAgentHooksRule = createCopilotRule({
|
|
|
3988
3893
|
return;
|
|
3989
3894
|
}
|
|
3990
3895
|
const hookGroups = getFrontmatterObjectListGroups(frontmatter, "hooks");
|
|
3991
|
-
if (hookGroups
|
|
3896
|
+
if (!(0, import_ts_extras37.isDefined)(hookGroups) || hookGroups.size === 0) {
|
|
3992
3897
|
return;
|
|
3993
3898
|
}
|
|
3994
3899
|
for (const [eventName, hooks] of hookGroups) {
|
|
3995
3900
|
for (const [index, hook] of hooks.entries()) {
|
|
3996
3901
|
const hookNumber = String(index + 1);
|
|
3997
|
-
const
|
|
3998
|
-
if (
|
|
3999
|
-
reportAtDocumentStart(context, {
|
|
4000
|
-
data: {
|
|
4001
|
-
eventName,
|
|
4002
|
-
hookNumber,
|
|
4003
|
-
type: type.length === 0 ? "(missing)" : type
|
|
4004
|
-
},
|
|
4005
|
-
messageId: "invalidHookType"
|
|
4006
|
-
});
|
|
4007
|
-
return;
|
|
4008
|
-
}
|
|
4009
|
-
if (hasAnyHookCommand(hook)) {
|
|
3902
|
+
const invalidHookReport = getInvalidHookReport(eventName, hook, hookNumber);
|
|
3903
|
+
if (!(0, import_ts_extras37.isDefined)(invalidHookReport)) {
|
|
4010
3904
|
continue;
|
|
4011
3905
|
}
|
|
4012
|
-
reportAtDocumentStart(context,
|
|
4013
|
-
data: {
|
|
4014
|
-
eventName,
|
|
4015
|
-
hookNumber
|
|
4016
|
-
},
|
|
4017
|
-
messageId: "missingHookCommand"
|
|
4018
|
-
});
|
|
3906
|
+
reportAtDocumentStart(context, invalidHookReport);
|
|
4019
3907
|
return;
|
|
4020
3908
|
}
|
|
4021
3909
|
}
|
|
@@ -4032,7 +3920,8 @@ var requireValidAgentHooksRule = createCopilotRule({
|
|
|
4032
3920
|
description: "require Copilot custom-agent hooks to use `type: command` and define at least one command property.",
|
|
4033
3921
|
frozen: false,
|
|
4034
3922
|
recommended: true,
|
|
4035
|
-
requiresTypeChecking: false
|
|
3923
|
+
requiresTypeChecking: false,
|
|
3924
|
+
url: createRuleDocsUrl("require-valid-agent-hooks")
|
|
4036
3925
|
},
|
|
4037
3926
|
messages: {
|
|
4038
3927
|
invalidHookType: "Copilot custom agent hook #{{hookNumber}} in `{{eventName}}` must use `type: command` (current value: `{{type}}`).",
|
|
@@ -4046,6 +3935,7 @@ var requireValidAgentHooksRule = createCopilotRule({
|
|
|
4046
3935
|
var require_valid_agent_hooks_default = requireValidAgentHooksRule;
|
|
4047
3936
|
|
|
4048
3937
|
// dist/rules/require-valid-agent-invocation-controls.js
|
|
3938
|
+
var import_ts_extras38 = require("ts-extras");
|
|
4049
3939
|
var VALID_BOOLEAN_FIELD_VALUES2 = /* @__PURE__ */ new Set(["false", "true"]);
|
|
4050
3940
|
var INVOCATION_CONTROL_FIELDS = [
|
|
4051
3941
|
"disable-model-invocation",
|
|
@@ -4067,12 +3957,12 @@ var requireValidAgentInvocationControlsRule = createCopilotRule({
|
|
|
4067
3957
|
}
|
|
4068
3958
|
const fieldValue = getFrontmatterScalar(frontmatter, fieldName);
|
|
4069
3959
|
const normalizedValue = fieldValue?.trim().toLowerCase();
|
|
4070
|
-
if (normalizedValue
|
|
3960
|
+
if ((0, import_ts_extras38.isDefined)(normalizedValue) && (0, import_ts_extras38.setHas)(VALID_BOOLEAN_FIELD_VALUES2, normalizedValue)) {
|
|
4071
3961
|
continue;
|
|
4072
3962
|
}
|
|
4073
3963
|
reportAtDocumentStart(context, {
|
|
4074
3964
|
data: {
|
|
4075
|
-
currentValue: fieldValue
|
|
3965
|
+
currentValue: !(0, import_ts_extras38.isDefined)(fieldValue) || fieldValue.trim().length === 0 ? "(empty)" : fieldValue,
|
|
4076
3966
|
fieldName
|
|
4077
3967
|
},
|
|
4078
3968
|
messageId: "invalidInvocationControl"
|
|
@@ -4092,7 +3982,8 @@ var requireValidAgentInvocationControlsRule = createCopilotRule({
|
|
|
4092
3982
|
description: "require Copilot custom-agent invocation-control flags to use documented boolean values when present.",
|
|
4093
3983
|
frozen: false,
|
|
4094
3984
|
recommended: true,
|
|
4095
|
-
requiresTypeChecking: false
|
|
3985
|
+
requiresTypeChecking: false,
|
|
3986
|
+
url: createRuleDocsUrl("require-valid-agent-invocation-controls")
|
|
4096
3987
|
},
|
|
4097
3988
|
messages: {
|
|
4098
3989
|
invalidInvocationControl: "Copilot custom agent `{{fieldName}}` must use a boolean `true` or `false` value (current value: `{{currentValue}}`)."
|
|
@@ -4105,12 +3996,13 @@ var requireValidAgentInvocationControlsRule = createCopilotRule({
|
|
|
4105
3996
|
var require_valid_agent_invocation_controls_default = requireValidAgentInvocationControlsRule;
|
|
4106
3997
|
|
|
4107
3998
|
// dist/rules/require-valid-agent-mcp-servers.js
|
|
3999
|
+
var import_ts_extras39 = require("ts-extras");
|
|
4108
4000
|
var formatMcpServersValue = (scalarValue, listValue) => {
|
|
4109
|
-
if (
|
|
4001
|
+
if ((0, import_ts_extras39.isDefined)(scalarValue)) {
|
|
4110
4002
|
return scalarValue;
|
|
4111
4003
|
}
|
|
4112
|
-
if (
|
|
4113
|
-
return `[${
|
|
4004
|
+
if ((0, import_ts_extras39.isDefined)(listValue)) {
|
|
4005
|
+
return `[${(0, import_ts_extras39.arrayJoin)(listValue, ", ")}]`;
|
|
4114
4006
|
}
|
|
4115
4007
|
return "(empty)";
|
|
4116
4008
|
};
|
|
@@ -4125,7 +4017,7 @@ var requireValidAgentMcpServersRule = createCopilotRule({
|
|
|
4125
4017
|
return;
|
|
4126
4018
|
}
|
|
4127
4019
|
const mcpServers = getFrontmatterList(frontmatter, "mcp-servers");
|
|
4128
|
-
if (mcpServers
|
|
4020
|
+
if ((0, import_ts_extras39.isDefined)(mcpServers) && mcpServers.length > 0) {
|
|
4129
4021
|
return;
|
|
4130
4022
|
}
|
|
4131
4023
|
reportAtDocumentStart(context, {
|
|
@@ -4147,7 +4039,8 @@ var requireValidAgentMcpServersRule = createCopilotRule({
|
|
|
4147
4039
|
description: "require Copilot custom-agent `mcp-servers` metadata to be a non-empty list when present.",
|
|
4148
4040
|
frozen: false,
|
|
4149
4041
|
recommended: true,
|
|
4150
|
-
requiresTypeChecking: false
|
|
4042
|
+
requiresTypeChecking: false,
|
|
4043
|
+
url: createRuleDocsUrl("require-valid-agent-mcp-servers")
|
|
4151
4044
|
},
|
|
4152
4045
|
messages: {
|
|
4153
4046
|
invalidMcpServersField: "Copilot custom agent `mcp-servers` metadata must be a non-empty list of MCP server config names (current value: `{{mcpServersValue}}`)."
|
|
@@ -4160,6 +4053,7 @@ var requireValidAgentMcpServersRule = createCopilotRule({
|
|
|
4160
4053
|
var require_valid_agent_mcp_servers_default = requireValidAgentMcpServersRule;
|
|
4161
4054
|
|
|
4162
4055
|
// dist/rules/require-valid-agent-model.js
|
|
4056
|
+
var import_ts_extras40 = require("ts-extras");
|
|
4163
4057
|
var INLINE_LIST_LITERAL_PATTERN = /^\s*\[.*\]\s*$/u;
|
|
4164
4058
|
var requireValidAgentModelRule = createCopilotRule({
|
|
4165
4059
|
create(context) {
|
|
@@ -4172,16 +4066,16 @@ var requireValidAgentModelRule = createCopilotRule({
|
|
|
4172
4066
|
return;
|
|
4173
4067
|
}
|
|
4174
4068
|
const modelList = getFrontmatterList(frontmatter, "model");
|
|
4175
|
-
if (modelList
|
|
4069
|
+
if ((0, import_ts_extras40.isDefined)(modelList) && modelList.length > 0) {
|
|
4176
4070
|
return;
|
|
4177
4071
|
}
|
|
4178
4072
|
const model = getFrontmatterScalar(frontmatter, "model");
|
|
4179
|
-
if (model
|
|
4073
|
+
if ((0, import_ts_extras40.isDefined)(model) && model.length > 0 && !INLINE_LIST_LITERAL_PATTERN.test(model)) {
|
|
4180
4074
|
return;
|
|
4181
4075
|
}
|
|
4182
4076
|
reportAtDocumentStart(context, {
|
|
4183
4077
|
data: {
|
|
4184
|
-
modelValue: model
|
|
4078
|
+
modelValue: !(0, import_ts_extras40.isDefined)(model) || model.trim().length === 0 ? "(empty)" : model
|
|
4185
4079
|
},
|
|
4186
4080
|
messageId: "invalidAgentModel"
|
|
4187
4081
|
});
|
|
@@ -4198,7 +4092,8 @@ var requireValidAgentModelRule = createCopilotRule({
|
|
|
4198
4092
|
description: "require Copilot custom-agent `model` metadata to be a non-empty model name or non-empty prioritized model list when present.",
|
|
4199
4093
|
frozen: false,
|
|
4200
4094
|
recommended: true,
|
|
4201
|
-
requiresTypeChecking: false
|
|
4095
|
+
requiresTypeChecking: false,
|
|
4096
|
+
url: createRuleDocsUrl("require-valid-agent-model")
|
|
4202
4097
|
},
|
|
4203
4098
|
messages: {
|
|
4204
4099
|
invalidAgentModel: "Copilot custom agent `model` must be a non-empty model name or non-empty prioritized list of model names (current value: `{{modelValue}}`)."
|
|
@@ -4211,6 +4106,7 @@ var requireValidAgentModelRule = createCopilotRule({
|
|
|
4211
4106
|
var require_valid_agent_model_default = requireValidAgentModelRule;
|
|
4212
4107
|
|
|
4213
4108
|
// dist/rules/require-valid-agent-name.js
|
|
4109
|
+
var import_ts_extras41 = require("ts-extras");
|
|
4214
4110
|
var requireValidAgentNameRule = createCopilotRule({
|
|
4215
4111
|
create(context) {
|
|
4216
4112
|
return createMarkdownDocumentListener(() => {
|
|
@@ -4221,7 +4117,7 @@ var requireValidAgentNameRule = createCopilotRule({
|
|
|
4221
4117
|
if (frontmatter === null || !hasFrontmatterField(frontmatter, "name")) {
|
|
4222
4118
|
return;
|
|
4223
4119
|
}
|
|
4224
|
-
if (getFrontmatterScalar(frontmatter, "name")
|
|
4120
|
+
if ((0, import_ts_extras41.isDefined)(getFrontmatterScalar(frontmatter, "name"))) {
|
|
4225
4121
|
return;
|
|
4226
4122
|
}
|
|
4227
4123
|
reportAtDocumentStart(context, {
|
|
@@ -4240,7 +4136,8 @@ var requireValidAgentNameRule = createCopilotRule({
|
|
|
4240
4136
|
description: "require Copilot custom-agent `name` metadata to be a non-empty scalar when present.",
|
|
4241
4137
|
frozen: false,
|
|
4242
4138
|
recommended: true,
|
|
4243
|
-
requiresTypeChecking: false
|
|
4139
|
+
requiresTypeChecking: false,
|
|
4140
|
+
url: createRuleDocsUrl("require-valid-agent-name")
|
|
4244
4141
|
},
|
|
4245
4142
|
messages: {
|
|
4246
4143
|
invalidAgentName: "Copilot custom-agent `name` metadata must be a non-empty scalar when present."
|
|
@@ -4253,6 +4150,7 @@ var requireValidAgentNameRule = createCopilotRule({
|
|
|
4253
4150
|
var require_valid_agent_name_default = requireValidAgentNameRule;
|
|
4254
4151
|
|
|
4255
4152
|
// dist/rules/require-valid-agent-subagents.js
|
|
4153
|
+
var import_ts_extras42 = require("ts-extras");
|
|
4256
4154
|
var EMPTY_ARRAY_LITERAL = "[]";
|
|
4257
4155
|
var WILDCARD_AGENTS_LITERAL = "*";
|
|
4258
4156
|
var isValidExplicitAgentName = (value) => {
|
|
@@ -4260,11 +4158,11 @@ var isValidExplicitAgentName = (value) => {
|
|
|
4260
4158
|
return trimmedValue.length > 0 && trimmedValue !== EMPTY_ARRAY_LITERAL && trimmedValue !== WILDCARD_AGENTS_LITERAL;
|
|
4261
4159
|
};
|
|
4262
4160
|
var formatAgentsValue = (scalarValue, listValue) => {
|
|
4263
|
-
if (
|
|
4161
|
+
if ((0, import_ts_extras42.isDefined)(scalarValue)) {
|
|
4264
4162
|
return scalarValue;
|
|
4265
4163
|
}
|
|
4266
|
-
if (
|
|
4267
|
-
return `[${
|
|
4164
|
+
if ((0, import_ts_extras42.isDefined)(listValue)) {
|
|
4165
|
+
return `[${(0, import_ts_extras42.arrayJoin)(listValue, ", ")}]`;
|
|
4268
4166
|
}
|
|
4269
4167
|
return "(empty)";
|
|
4270
4168
|
};
|
|
@@ -4283,7 +4181,7 @@ var requireValidAgentSubagentsRule = createCopilotRule({
|
|
|
4283
4181
|
if (agentsScalar === WILDCARD_AGENTS_LITERAL || agentsScalar === EMPTY_ARRAY_LITERAL) {
|
|
4284
4182
|
return;
|
|
4285
4183
|
}
|
|
4286
|
-
if (allowedAgents
|
|
4184
|
+
if ((0, import_ts_extras42.isDefined)(allowedAgents) && allowedAgents.length > 0 && allowedAgents.every((agentName) => isValidExplicitAgentName(agentName))) {
|
|
4287
4185
|
return;
|
|
4288
4186
|
}
|
|
4289
4187
|
reportAtDocumentStart(context, {
|
|
@@ -4305,7 +4203,8 @@ var requireValidAgentSubagentsRule = createCopilotRule({
|
|
|
4305
4203
|
description: "require Copilot custom-agent `agents` metadata to be `*`, `[]`, or a non-empty list of explicit agent names.",
|
|
4306
4204
|
frozen: false,
|
|
4307
4205
|
recommended: true,
|
|
4308
|
-
requiresTypeChecking: false
|
|
4206
|
+
requiresTypeChecking: false,
|
|
4207
|
+
url: createRuleDocsUrl("require-valid-agent-subagents")
|
|
4309
4208
|
},
|
|
4310
4209
|
messages: {
|
|
4311
4210
|
invalidAgentsField: "Copilot custom agent `agents` metadata must be `*`, `[]`, or a non-empty list of agent names (current value: `{{agentsValue}}`)."
|
|
@@ -4318,6 +4217,7 @@ var requireValidAgentSubagentsRule = createCopilotRule({
|
|
|
4318
4217
|
var require_valid_agent_subagents_default = requireValidAgentSubagentsRule;
|
|
4319
4218
|
|
|
4320
4219
|
// dist/rules/require-valid-agent-target.js
|
|
4220
|
+
var import_ts_extras43 = require("ts-extras");
|
|
4321
4221
|
var VALID_AGENT_TARGETS = /* @__PURE__ */ new Set(["github-copilot", "vscode"]);
|
|
4322
4222
|
var requireValidAgentTargetRule = createCopilotRule({
|
|
4323
4223
|
create(context) {
|
|
@@ -4330,13 +4230,13 @@ var requireValidAgentTargetRule = createCopilotRule({
|
|
|
4330
4230
|
return;
|
|
4331
4231
|
}
|
|
4332
4232
|
const target = getFrontmatterScalar(frontmatter, "target");
|
|
4333
|
-
if (
|
|
4233
|
+
if (!(0, import_ts_extras43.isDefined)(target)) {
|
|
4334
4234
|
reportAtDocumentStart(context, {
|
|
4335
4235
|
messageId: "emptyTarget"
|
|
4336
4236
|
});
|
|
4337
4237
|
return;
|
|
4338
4238
|
}
|
|
4339
|
-
if (
|
|
4239
|
+
if ((0, import_ts_extras43.setHas)(VALID_AGENT_TARGETS, target)) {
|
|
4340
4240
|
return;
|
|
4341
4241
|
}
|
|
4342
4242
|
reportAtDocumentStart(context, {
|
|
@@ -4356,7 +4256,8 @@ var requireValidAgentTargetRule = createCopilotRule({
|
|
|
4356
4256
|
description: "require Copilot custom-agent `target` metadata to use a documented target value when present.",
|
|
4357
4257
|
frozen: false,
|
|
4358
4258
|
recommended: true,
|
|
4359
|
-
requiresTypeChecking: false
|
|
4259
|
+
requiresTypeChecking: false,
|
|
4260
|
+
url: createRuleDocsUrl("require-valid-agent-target")
|
|
4360
4261
|
},
|
|
4361
4262
|
messages: {
|
|
4362
4263
|
emptyTarget: "Copilot custom agent files that declare `target` must use a non-empty documented value (`vscode` or `github-copilot`).",
|
|
@@ -4370,12 +4271,13 @@ var requireValidAgentTargetRule = createCopilotRule({
|
|
|
4370
4271
|
var require_valid_agent_target_default = requireValidAgentTargetRule;
|
|
4371
4272
|
|
|
4372
4273
|
// dist/rules/require-valid-agent-tools.js
|
|
4274
|
+
var import_ts_extras44 = require("ts-extras");
|
|
4373
4275
|
var formatToolsValue = (scalarValue, listValue) => {
|
|
4374
|
-
if (
|
|
4276
|
+
if ((0, import_ts_extras44.isDefined)(scalarValue)) {
|
|
4375
4277
|
return scalarValue;
|
|
4376
4278
|
}
|
|
4377
|
-
if (
|
|
4378
|
-
return `[${
|
|
4279
|
+
if ((0, import_ts_extras44.isDefined)(listValue)) {
|
|
4280
|
+
return `[${(0, import_ts_extras44.arrayJoin)(listValue, ", ")}]`;
|
|
4379
4281
|
}
|
|
4380
4282
|
return "(empty)";
|
|
4381
4283
|
};
|
|
@@ -4390,7 +4292,7 @@ var requireValidAgentToolsRule = createCopilotRule({
|
|
|
4390
4292
|
return;
|
|
4391
4293
|
}
|
|
4392
4294
|
const tools = getFrontmatterList(frontmatter, "tools");
|
|
4393
|
-
if (tools
|
|
4295
|
+
if ((0, import_ts_extras44.isDefined)(tools) && tools.length > 0) {
|
|
4394
4296
|
return;
|
|
4395
4297
|
}
|
|
4396
4298
|
reportAtDocumentStart(context, {
|
|
@@ -4412,7 +4314,8 @@ var requireValidAgentToolsRule = createCopilotRule({
|
|
|
4412
4314
|
description: "require Copilot custom-agent `tools` metadata to be a non-empty list of tool or tool-set names when present.",
|
|
4413
4315
|
frozen: false,
|
|
4414
4316
|
recommended: true,
|
|
4415
|
-
requiresTypeChecking: false
|
|
4317
|
+
requiresTypeChecking: false,
|
|
4318
|
+
url: createRuleDocsUrl("require-valid-agent-tools")
|
|
4416
4319
|
},
|
|
4417
4320
|
messages: {
|
|
4418
4321
|
invalidAgentTools: "Copilot custom agent `tools` metadata must be a non-empty list of tool or tool-set names when present (current value: `{{toolsValue}}`)."
|
|
@@ -4425,6 +4328,7 @@ var requireValidAgentToolsRule = createCopilotRule({
|
|
|
4425
4328
|
var require_valid_agent_tools_default = requireValidAgentToolsRule;
|
|
4426
4329
|
|
|
4427
4330
|
// dist/rules/require-valid-instructions-apply-to-globs.js
|
|
4331
|
+
var import_ts_extras45 = require("ts-extras");
|
|
4428
4332
|
var isValidApplyToGlob = (value) => {
|
|
4429
4333
|
const trimmedValue = value.trim();
|
|
4430
4334
|
const lowercaseValue = trimmedValue.toLowerCase();
|
|
@@ -4444,11 +4348,11 @@ var requireValidInstructionsApplyToGlobsRule = createCopilotRule({
|
|
|
4444
4348
|
...getFrontmatterList(frontmatter, "applyTo") ?? []
|
|
4445
4349
|
];
|
|
4446
4350
|
const applyToScalar = getFrontmatterScalar(frontmatter, "applyTo");
|
|
4447
|
-
if (
|
|
4351
|
+
if ((0, import_ts_extras45.isDefined)(applyToScalar)) {
|
|
4448
4352
|
applyToValues.push(applyToScalar);
|
|
4449
4353
|
}
|
|
4450
|
-
const invalidValue = applyToValues.find((value) => !isValidApplyToGlob(value));
|
|
4451
|
-
if (invalidValue ===
|
|
4354
|
+
const invalidValue = applyToValues.find((value) => !isValidApplyToGlob(value)) ?? null;
|
|
4355
|
+
if (invalidValue === null) {
|
|
4452
4356
|
return;
|
|
4453
4357
|
}
|
|
4454
4358
|
reportAtDocumentStart(context, {
|
|
@@ -4470,7 +4374,8 @@ var requireValidInstructionsApplyToGlobsRule = createCopilotRule({
|
|
|
4470
4374
|
description: "require path-specific Copilot instructions `applyTo` metadata to use repository-relative glob patterns.",
|
|
4471
4375
|
frozen: false,
|
|
4472
4376
|
recommended: true,
|
|
4473
|
-
requiresTypeChecking: false
|
|
4377
|
+
requiresTypeChecking: false,
|
|
4378
|
+
url: createRuleDocsUrl("require-valid-instructions-apply-to-globs")
|
|
4474
4379
|
},
|
|
4475
4380
|
messages: {
|
|
4476
4381
|
invalidApplyToGlob: "Copilot instructions `applyTo` metadata should use repository-relative glob patterns, not `{{applyTo}}`."
|
|
@@ -4483,6 +4388,7 @@ var requireValidInstructionsApplyToGlobsRule = createCopilotRule({
|
|
|
4483
4388
|
var require_valid_instructions_apply_to_globs_default = requireValidInstructionsApplyToGlobsRule;
|
|
4484
4389
|
|
|
4485
4390
|
// dist/rules/require-valid-prompt-argument-hint.js
|
|
4391
|
+
var import_ts_extras46 = require("ts-extras");
|
|
4486
4392
|
var requireValidPromptArgumentHintRule = createCopilotRule({
|
|
4487
4393
|
create(context) {
|
|
4488
4394
|
return createMarkdownDocumentListener(() => {
|
|
@@ -4493,7 +4399,7 @@ var requireValidPromptArgumentHintRule = createCopilotRule({
|
|
|
4493
4399
|
if (frontmatter === null || !hasFrontmatterField(frontmatter, "argument-hint")) {
|
|
4494
4400
|
return;
|
|
4495
4401
|
}
|
|
4496
|
-
if (getFrontmatterScalar(frontmatter, "argument-hint")
|
|
4402
|
+
if ((0, import_ts_extras46.isDefined)(getFrontmatterScalar(frontmatter, "argument-hint"))) {
|
|
4497
4403
|
return;
|
|
4498
4404
|
}
|
|
4499
4405
|
reportAtDocumentStart(context, {
|
|
@@ -4512,7 +4418,8 @@ var requireValidPromptArgumentHintRule = createCopilotRule({
|
|
|
4512
4418
|
description: "require Copilot prompt-file `argument-hint` metadata to be a non-empty scalar when present.",
|
|
4513
4419
|
frozen: false,
|
|
4514
4420
|
recommended: true,
|
|
4515
|
-
requiresTypeChecking: false
|
|
4421
|
+
requiresTypeChecking: false,
|
|
4422
|
+
url: createRuleDocsUrl("require-valid-prompt-argument-hint")
|
|
4516
4423
|
},
|
|
4517
4424
|
messages: {
|
|
4518
4425
|
invalidPromptArgumentHint: "Copilot prompt-file `argument-hint` metadata must be a non-empty scalar when present."
|
|
@@ -4525,13 +4432,14 @@ var requireValidPromptArgumentHintRule = createCopilotRule({
|
|
|
4525
4432
|
var require_valid_prompt_argument_hint_default = requireValidPromptArgumentHintRule;
|
|
4526
4433
|
|
|
4527
4434
|
// dist/rules/require-valid-prompt-model.js
|
|
4435
|
+
var import_ts_extras47 = require("ts-extras");
|
|
4528
4436
|
var INLINE_LIST_LITERAL_PATTERN2 = /^\s*\[.*\]\s*$/u;
|
|
4529
4437
|
var formatPromptModelValue = (scalarValue, listValue) => {
|
|
4530
|
-
if (
|
|
4438
|
+
if ((0, import_ts_extras47.isDefined)(scalarValue)) {
|
|
4531
4439
|
return scalarValue;
|
|
4532
4440
|
}
|
|
4533
|
-
if (
|
|
4534
|
-
return `[${
|
|
4441
|
+
if ((0, import_ts_extras47.isDefined)(listValue)) {
|
|
4442
|
+
return `[${(0, import_ts_extras47.arrayJoin)(listValue, ", ")}]`;
|
|
4535
4443
|
}
|
|
4536
4444
|
return "(empty)";
|
|
4537
4445
|
};
|
|
@@ -4546,7 +4454,7 @@ var requireValidPromptModelRule = createCopilotRule({
|
|
|
4546
4454
|
return;
|
|
4547
4455
|
}
|
|
4548
4456
|
const modelList = getFrontmatterList(frontmatter, "model");
|
|
4549
|
-
if (
|
|
4457
|
+
if ((0, import_ts_extras47.isDefined)(modelList)) {
|
|
4550
4458
|
reportAtDocumentStart(context, {
|
|
4551
4459
|
data: {
|
|
4552
4460
|
modelValue: formatPromptModelValue(void 0, modelList)
|
|
@@ -4556,7 +4464,7 @@ var requireValidPromptModelRule = createCopilotRule({
|
|
|
4556
4464
|
return;
|
|
4557
4465
|
}
|
|
4558
4466
|
const model = getFrontmatterScalar(frontmatter, "model");
|
|
4559
|
-
if (model
|
|
4467
|
+
if ((0, import_ts_extras47.isDefined)(model) && model.length > 0 && !INLINE_LIST_LITERAL_PATTERN2.test(model)) {
|
|
4560
4468
|
return;
|
|
4561
4469
|
}
|
|
4562
4470
|
reportAtDocumentStart(context, {
|
|
@@ -4578,7 +4486,8 @@ var requireValidPromptModelRule = createCopilotRule({
|
|
|
4578
4486
|
description: "require Copilot prompt-file `model` metadata to be a non-empty single model name when present.",
|
|
4579
4487
|
frozen: false,
|
|
4580
4488
|
recommended: true,
|
|
4581
|
-
requiresTypeChecking: false
|
|
4489
|
+
requiresTypeChecking: false,
|
|
4490
|
+
url: createRuleDocsUrl("require-valid-prompt-model")
|
|
4582
4491
|
},
|
|
4583
4492
|
messages: {
|
|
4584
4493
|
invalidPromptModel: "Copilot prompt-file `model` metadata must be a non-empty single model name when present (current value: `{{modelValue}}`)."
|
|
@@ -4591,6 +4500,7 @@ var requireValidPromptModelRule = createCopilotRule({
|
|
|
4591
4500
|
var require_valid_prompt_model_default = requireValidPromptModelRule;
|
|
4592
4501
|
|
|
4593
4502
|
// dist/rules/require-valid-prompt-name.js
|
|
4503
|
+
var import_ts_extras48 = require("ts-extras");
|
|
4594
4504
|
var requireValidPromptNameRule = createCopilotRule({
|
|
4595
4505
|
create(context) {
|
|
4596
4506
|
return createMarkdownDocumentListener(() => {
|
|
@@ -4601,7 +4511,7 @@ var requireValidPromptNameRule = createCopilotRule({
|
|
|
4601
4511
|
if (frontmatter === null || !hasFrontmatterField(frontmatter, "name")) {
|
|
4602
4512
|
return;
|
|
4603
4513
|
}
|
|
4604
|
-
if (getFrontmatterScalar(frontmatter, "name")
|
|
4514
|
+
if ((0, import_ts_extras48.isDefined)(getFrontmatterScalar(frontmatter, "name"))) {
|
|
4605
4515
|
return;
|
|
4606
4516
|
}
|
|
4607
4517
|
reportAtDocumentStart(context, {
|
|
@@ -4620,7 +4530,8 @@ var requireValidPromptNameRule = createCopilotRule({
|
|
|
4620
4530
|
description: "require Copilot prompt-file `name` metadata to be a non-empty scalar when present.",
|
|
4621
4531
|
frozen: false,
|
|
4622
4532
|
recommended: true,
|
|
4623
|
-
requiresTypeChecking: false
|
|
4533
|
+
requiresTypeChecking: false,
|
|
4534
|
+
url: createRuleDocsUrl("require-valid-prompt-name")
|
|
4624
4535
|
},
|
|
4625
4536
|
messages: {
|
|
4626
4537
|
invalidPromptName: "Copilot prompt-file `name` metadata must be a non-empty scalar when present."
|
|
@@ -4633,12 +4544,13 @@ var requireValidPromptNameRule = createCopilotRule({
|
|
|
4633
4544
|
var require_valid_prompt_name_default = requireValidPromptNameRule;
|
|
4634
4545
|
|
|
4635
4546
|
// dist/rules/require-valid-prompt-tools.js
|
|
4547
|
+
var import_ts_extras49 = require("ts-extras");
|
|
4636
4548
|
var formatToolsValue2 = (scalarValue, listValue) => {
|
|
4637
|
-
if (
|
|
4549
|
+
if ((0, import_ts_extras49.isDefined)(scalarValue)) {
|
|
4638
4550
|
return scalarValue;
|
|
4639
4551
|
}
|
|
4640
|
-
if (
|
|
4641
|
-
return `[${
|
|
4552
|
+
if ((0, import_ts_extras49.isDefined)(listValue)) {
|
|
4553
|
+
return `[${(0, import_ts_extras49.arrayJoin)(listValue, ", ")}]`;
|
|
4642
4554
|
}
|
|
4643
4555
|
return "(empty)";
|
|
4644
4556
|
};
|
|
@@ -4653,7 +4565,7 @@ var requireValidPromptToolsRule = createCopilotRule({
|
|
|
4653
4565
|
return;
|
|
4654
4566
|
}
|
|
4655
4567
|
const tools = getFrontmatterList(frontmatter, "tools");
|
|
4656
|
-
if (tools
|
|
4568
|
+
if ((0, import_ts_extras49.isDefined)(tools) && tools.length > 0) {
|
|
4657
4569
|
return;
|
|
4658
4570
|
}
|
|
4659
4571
|
reportAtDocumentStart(context, {
|
|
@@ -4675,7 +4587,8 @@ var requireValidPromptToolsRule = createCopilotRule({
|
|
|
4675
4587
|
description: "require Copilot prompt-file `tools` metadata to be a non-empty list of tool or tool-set names when present.",
|
|
4676
4588
|
frozen: false,
|
|
4677
4589
|
recommended: true,
|
|
4678
|
-
requiresTypeChecking: false
|
|
4590
|
+
requiresTypeChecking: false,
|
|
4591
|
+
url: createRuleDocsUrl("require-valid-prompt-tools")
|
|
4679
4592
|
},
|
|
4680
4593
|
messages: {
|
|
4681
4594
|
invalidPromptTools: "Copilot prompt-file `tools` metadata must be a non-empty list of tool or tool-set names when present (current value: `{{toolsValue}}`)."
|
|
@@ -4688,6 +4601,7 @@ var requireValidPromptToolsRule = createCopilotRule({
|
|
|
4688
4601
|
var require_valid_prompt_tools_default = requireValidPromptToolsRule;
|
|
4689
4602
|
|
|
4690
4603
|
// dist/rules/require-valid-repository-hook-command-type.js
|
|
4604
|
+
var import_ts_extras50 = require("ts-extras");
|
|
4691
4605
|
var requireValidRepositoryHookCommandTypeRule = createCopilotRule({
|
|
4692
4606
|
create(context) {
|
|
4693
4607
|
return {
|
|
@@ -4700,7 +4614,7 @@ var requireValidRepositoryHookCommandTypeRule = createCopilotRule({
|
|
|
4700
4614
|
const typeValue = hook["type"];
|
|
4701
4615
|
return !isJsonString(typeValue) || !isRepositoryHookType(typeValue);
|
|
4702
4616
|
});
|
|
4703
|
-
if (
|
|
4617
|
+
if (!(0, import_ts_extras50.isDefined)(invalidHook)) {
|
|
4704
4618
|
return;
|
|
4705
4619
|
}
|
|
4706
4620
|
reportAtDocumentStart(context, {
|
|
@@ -4724,7 +4638,8 @@ var requireValidRepositoryHookCommandTypeRule = createCopilotRule({
|
|
|
4724
4638
|
description: "require repository hook definitions to declare a supported `type` value such as `command` or `prompt`.",
|
|
4725
4639
|
frozen: false,
|
|
4726
4640
|
recommended: true,
|
|
4727
|
-
requiresTypeChecking: false
|
|
4641
|
+
requiresTypeChecking: false,
|
|
4642
|
+
url: createRuleDocsUrl("require-valid-repository-hook-command-type")
|
|
4728
4643
|
},
|
|
4729
4644
|
messages: {
|
|
4730
4645
|
invalidRepositoryHookType: "Repository hook definitions for `{{eventName}}` must declare a supported `type` such as `command` or `prompt` (current value: `{{type}}`)."
|
|
@@ -4737,6 +4652,7 @@ var requireValidRepositoryHookCommandTypeRule = createCopilotRule({
|
|
|
4737
4652
|
var require_valid_repository_hook_command_type_default = requireValidRepositoryHookCommandTypeRule;
|
|
4738
4653
|
|
|
4739
4654
|
// dist/rules/require-valid-repository-hook-env.js
|
|
4655
|
+
var import_ts_extras51 = require("ts-extras");
|
|
4740
4656
|
var requireValidRepositoryHookEnvRule = createCopilotRule({
|
|
4741
4657
|
create(context) {
|
|
4742
4658
|
return {
|
|
@@ -4747,9 +4663,9 @@ var requireValidRepositoryHookEnvRule = createCopilotRule({
|
|
|
4747
4663
|
const root = parseJsonText(context.sourceCode.text);
|
|
4748
4664
|
const invalidHook = getRepositoryHookObjects(root).find(({ hook }) => {
|
|
4749
4665
|
const env = hook["env"];
|
|
4750
|
-
return env
|
|
4666
|
+
return (0, import_ts_extras51.isDefined)(env) && !isJsonObject(env);
|
|
4751
4667
|
});
|
|
4752
|
-
if (
|
|
4668
|
+
if (!(0, import_ts_extras51.isDefined)(invalidHook)) {
|
|
4753
4669
|
return;
|
|
4754
4670
|
}
|
|
4755
4671
|
reportAtDocumentStart(context, {
|
|
@@ -4773,7 +4689,8 @@ var requireValidRepositoryHookEnvRule = createCopilotRule({
|
|
|
4773
4689
|
description: "require repository hook `env` values to be JSON objects when present.",
|
|
4774
4690
|
frozen: false,
|
|
4775
4691
|
recommended: true,
|
|
4776
|
-
requiresTypeChecking: false
|
|
4692
|
+
requiresTypeChecking: false,
|
|
4693
|
+
url: createRuleDocsUrl("require-valid-repository-hook-env")
|
|
4777
4694
|
},
|
|
4778
4695
|
messages: {
|
|
4779
4696
|
invalidRepositoryHookEnv: "Repository hook `env` for `{{eventName}}` must be a JSON object when present (current value: `{{env}}`)."
|
|
@@ -4786,6 +4703,7 @@ var requireValidRepositoryHookEnvRule = createCopilotRule({
|
|
|
4786
4703
|
var require_valid_repository_hook_env_default = requireValidRepositoryHookEnvRule;
|
|
4787
4704
|
|
|
4788
4705
|
// dist/rules/require-valid-repository-hook-events.js
|
|
4706
|
+
var import_ts_extras52 = require("ts-extras");
|
|
4789
4707
|
var requireValidRepositoryHookEventsRule = createCopilotRule({
|
|
4790
4708
|
create(context) {
|
|
4791
4709
|
return {
|
|
@@ -4795,7 +4713,7 @@ var requireValidRepositoryHookEventsRule = createCopilotRule({
|
|
|
4795
4713
|
}
|
|
4796
4714
|
const root = parseJsonText(context.sourceCode.text);
|
|
4797
4715
|
const invalidEventName = getRepositoryHookEventEntries(root).map(([eventName]) => eventName).find((eventName) => !isRepositoryHookEventName(eventName));
|
|
4798
|
-
if (
|
|
4716
|
+
if (!(0, import_ts_extras52.isDefined)(invalidEventName)) {
|
|
4799
4717
|
return;
|
|
4800
4718
|
}
|
|
4801
4719
|
reportAtDocumentStart(context, {
|
|
@@ -4818,7 +4736,8 @@ var requireValidRepositoryHookEventsRule = createCopilotRule({
|
|
|
4818
4736
|
description: "require repository hook configuration files to use supported hook event names.",
|
|
4819
4737
|
frozen: false,
|
|
4820
4738
|
recommended: true,
|
|
4821
|
-
requiresTypeChecking: false
|
|
4739
|
+
requiresTypeChecking: false,
|
|
4740
|
+
url: createRuleDocsUrl("require-valid-repository-hook-events")
|
|
4822
4741
|
},
|
|
4823
4742
|
messages: {
|
|
4824
4743
|
invalidRepositoryHookEvent: "Repository hook configuration files should use a supported hook event name, not `{{eventName}}`."
|
|
@@ -4831,7 +4750,8 @@ var requireValidRepositoryHookEventsRule = createCopilotRule({
|
|
|
4831
4750
|
var require_valid_repository_hook_events_default = requireValidRepositoryHookEventsRule;
|
|
4832
4751
|
|
|
4833
4752
|
// dist/rules/require-valid-repository-hook-timeouts.js
|
|
4834
|
-
var
|
|
4753
|
+
var import_ts_extras53 = require("ts-extras");
|
|
4754
|
+
var isValidTimeoutSeconds = (value) => typeof value === "number" && (0, import_ts_extras53.isInteger)(value) && value > 0;
|
|
4835
4755
|
var requireValidRepositoryHookTimeoutsRule = createCopilotRule({
|
|
4836
4756
|
create(context) {
|
|
4837
4757
|
return {
|
|
@@ -4842,9 +4762,9 @@ var requireValidRepositoryHookTimeoutsRule = createCopilotRule({
|
|
|
4842
4762
|
const root = parseJsonText(context.sourceCode.text);
|
|
4843
4763
|
const invalidHook = getRepositoryHookObjects(root).find(({ hook }) => {
|
|
4844
4764
|
const timeout = hook["timeoutSec"];
|
|
4845
|
-
return timeout
|
|
4765
|
+
return (0, import_ts_extras53.isDefined)(timeout) && !isValidTimeoutSeconds(timeout);
|
|
4846
4766
|
});
|
|
4847
|
-
if (
|
|
4767
|
+
if (!(0, import_ts_extras53.isDefined)(invalidHook)) {
|
|
4848
4768
|
return;
|
|
4849
4769
|
}
|
|
4850
4770
|
reportAtDocumentStart(context, {
|
|
@@ -4868,7 +4788,8 @@ var requireValidRepositoryHookTimeoutsRule = createCopilotRule({
|
|
|
4868
4788
|
description: "require repository hook `timeoutSec` values to be positive integers when present.",
|
|
4869
4789
|
frozen: false,
|
|
4870
4790
|
recommended: true,
|
|
4871
|
-
requiresTypeChecking: false
|
|
4791
|
+
requiresTypeChecking: false,
|
|
4792
|
+
url: createRuleDocsUrl("require-valid-repository-hook-timeouts")
|
|
4872
4793
|
},
|
|
4873
4794
|
messages: {
|
|
4874
4795
|
invalidRepositoryHookTimeout: "Repository hook `timeoutSec` for `{{eventName}}` must be a positive integer when present (current value: `{{timeout}}`)."
|
|
@@ -4913,7 +4834,8 @@ var requireValidRepositoryHookVersionRule = createCopilotRule({
|
|
|
4913
4834
|
description: "require repository hook configuration files to declare `version: 1`.",
|
|
4914
4835
|
frozen: false,
|
|
4915
4836
|
recommended: true,
|
|
4916
|
-
requiresTypeChecking: false
|
|
4837
|
+
requiresTypeChecking: false,
|
|
4838
|
+
url: createRuleDocsUrl("require-valid-repository-hook-version")
|
|
4917
4839
|
},
|
|
4918
4840
|
messages: {
|
|
4919
4841
|
invalidRepositoryHookVersion: "Repository hook configuration files must declare `version: 1` (current value: `{{version}}`)."
|
|
@@ -4955,7 +4877,8 @@ var requireValidSkillDirectoryNameRule = createCopilotRule({
|
|
|
4955
4877
|
description: "require Copilot skill directory names to use the documented lowercase-hyphen form.",
|
|
4956
4878
|
frozen: false,
|
|
4957
4879
|
recommended: true,
|
|
4958
|
-
requiresTypeChecking: false
|
|
4880
|
+
requiresTypeChecking: false,
|
|
4881
|
+
url: createRuleDocsUrl("require-valid-skill-directory-name")
|
|
4959
4882
|
},
|
|
4960
4883
|
messages: {
|
|
4961
4884
|
invalidSkillDirectoryName: "Copilot skill directory names must use lowercase letters, digits, and hyphens only (current directory: `{{directoryName}}`)."
|
|
@@ -4968,6 +4891,7 @@ var requireValidSkillDirectoryNameRule = createCopilotRule({
|
|
|
4968
4891
|
var require_valid_skill_directory_name_default = requireValidSkillDirectoryNameRule;
|
|
4969
4892
|
|
|
4970
4893
|
// dist/rules/require-valid-skill-license.js
|
|
4894
|
+
var import_ts_extras54 = require("ts-extras");
|
|
4971
4895
|
var requireValidSkillLicenseRule = createCopilotRule({
|
|
4972
4896
|
create(context) {
|
|
4973
4897
|
return createMarkdownDocumentListener(() => {
|
|
@@ -4978,7 +4902,7 @@ var requireValidSkillLicenseRule = createCopilotRule({
|
|
|
4978
4902
|
if (frontmatter === null || !hasFrontmatterField(frontmatter, "license")) {
|
|
4979
4903
|
return;
|
|
4980
4904
|
}
|
|
4981
|
-
if (getFrontmatterScalar(frontmatter, "license")
|
|
4905
|
+
if ((0, import_ts_extras54.isDefined)(getFrontmatterScalar(frontmatter, "license"))) {
|
|
4982
4906
|
return;
|
|
4983
4907
|
}
|
|
4984
4908
|
reportAtDocumentStart(context, {
|
|
@@ -4993,7 +4917,8 @@ var requireValidSkillLicenseRule = createCopilotRule({
|
|
|
4993
4917
|
description: "require optional Copilot skill `license` metadata to be a non-empty scalar when present.",
|
|
4994
4918
|
frozen: false,
|
|
4995
4919
|
recommended: false,
|
|
4996
|
-
requiresTypeChecking: false
|
|
4920
|
+
requiresTypeChecking: false,
|
|
4921
|
+
url: createRuleDocsUrl("require-valid-skill-license")
|
|
4997
4922
|
},
|
|
4998
4923
|
messages: {
|
|
4999
4924
|
invalidSkillLicense: "Copilot skill `license` metadata must be a non-empty scalar when present."
|
|
@@ -5006,6 +4931,7 @@ var requireValidSkillLicenseRule = createCopilotRule({
|
|
|
5006
4931
|
var require_valid_skill_license_default = requireValidSkillLicenseRule;
|
|
5007
4932
|
|
|
5008
4933
|
// dist/rules/require-valid-skill-name.js
|
|
4934
|
+
var import_ts_extras55 = require("ts-extras");
|
|
5009
4935
|
var requireValidSkillNameRule = createCopilotRule({
|
|
5010
4936
|
create(context) {
|
|
5011
4937
|
return createMarkdownDocumentListener(() => {
|
|
@@ -5017,7 +4943,7 @@ var requireValidSkillNameRule = createCopilotRule({
|
|
|
5017
4943
|
return;
|
|
5018
4944
|
}
|
|
5019
4945
|
const skillName = getFrontmatterScalar(frontmatter, "name");
|
|
5020
|
-
if (skillName
|
|
4946
|
+
if ((0, import_ts_extras55.isDefined)(skillName) && isValidSkillIdentifier(getSkillName(context.filename, frontmatter))) {
|
|
5021
4947
|
return;
|
|
5022
4948
|
}
|
|
5023
4949
|
reportAtDocumentStart(context, {
|
|
@@ -5039,7 +4965,8 @@ var requireValidSkillNameRule = createCopilotRule({
|
|
|
5039
4965
|
description: "require Copilot skill `name` metadata to use the documented lowercase-hyphen identifier form.",
|
|
5040
4966
|
frozen: false,
|
|
5041
4967
|
recommended: true,
|
|
5042
|
-
requiresTypeChecking: false
|
|
4968
|
+
requiresTypeChecking: false,
|
|
4969
|
+
url: createRuleDocsUrl("require-valid-skill-name")
|
|
5043
4970
|
},
|
|
5044
4971
|
messages: {
|
|
5045
4972
|
invalidSkillName: "Copilot skill `name` values must use lowercase letters, digits, and hyphens only (current value: `{{name}}`)."
|
|
@@ -5167,7 +5094,7 @@ var getPackageVersion = (pkg) => {
|
|
|
5167
5094
|
var eslintRules = copilotRules;
|
|
5168
5095
|
var markdownPlugin = import_markdown.default;
|
|
5169
5096
|
var jsonPlugin = import_json.default;
|
|
5170
|
-
var copilotRuleEntries =
|
|
5097
|
+
var copilotRuleEntries = (0, import_ts_extras56.safeCastTo)((0, import_ts_extras56.objectEntries)(copilotRules).toSorted(([left], [right]) => left.localeCompare(right)));
|
|
5171
5098
|
var createEmptyPresetRuleMap = () => ({
|
|
5172
5099
|
all: [],
|
|
5173
5100
|
minimal: [],
|
|
@@ -5200,8 +5127,8 @@ var errorRulesFor = (ruleNames) => {
|
|
|
5200
5127
|
};
|
|
5201
5128
|
var presetRuleNamesByConfig = derivePresetRuleNamesByConfig();
|
|
5202
5129
|
var partitionRuleNamesByPresetLayer = (ruleNames) => ({
|
|
5203
|
-
jsonRuleNames: ruleNames.filter((ruleName) =>
|
|
5204
|
-
markdownRuleNames: ruleNames.filter((ruleName) =>
|
|
5130
|
+
jsonRuleNames: ruleNames.filter((ruleName) => (0, import_ts_extras56.setHas)(REPOSITORY_HOOK_JSON_RULE_NAMES, ruleName)),
|
|
5131
|
+
markdownRuleNames: ruleNames.filter((0, import_ts_extras56.not)((ruleName) => (0, import_ts_extras56.setHas)(REPOSITORY_HOOK_JSON_RULE_NAMES, ruleName)))
|
|
5205
5132
|
});
|
|
5206
5133
|
var createPresetConfig = (configName, plugin2) => {
|
|
5207
5134
|
const presetName = copilotConfigMetadataByName[configName].presetName;
|