eslint-plugin-copilot
July 4, 2026 ยท View on GitHub
ESLint plugin for linting GitHub Copilot repository customization files such as:
.github/copilot-instructions.md.github/instructions/copilot-instructions.md.github/instructions/**/*.instructions.md.github/prompts/**/*.prompt.md.github/agents/**/*.agent.md.github/chatmodes/**/*.chatmode.mdAGENTS.md,CLAUDE.md, andGEMINI.md
The plugin focuses on repository setup quality, metadata correctness, and modern GitHub Copilot customization conventions.
Table of contents
Installation
npm install --save-dev eslint-plugin-copilot eslint @eslint/markdown @eslint/json
Compatibility
- Supported ESLint versions:
9.xand10.x - Config system: Flat Config only (
eslint.config.*) - Node.js runtime:
>=22.0.0
Quick start
For direct use in an application or repository, use the self-contained presets:
import copilot from "eslint-plugin-copilot";
export default [...copilot.configs.recommended];
The shipped presets already configure:
plugins.markdownvia@eslint/markdownplugins.jsonvia@eslint/jsonfor repository hookslanguage: "markdown/gfm"language: "json/json"for.github/hooks/*.json- Copilot customization file globs for repository instructions, path-specific instructions, prompt files, custom agents, legacy chat modes, skills, agent-instructions files, and repository hooks
Shareable configs that already register @eslint/markdown and @eslint/json
should use the no-language-plugin variants after that registration instead:
import copilot from "eslint-plugin-copilot";
import sharedConfig from "your-shared-eslint-config";
export default [
...sharedConfig,
...copilot.configs["recommended-without-language-plugins"],
];
Those variants keep the same files, language, and copilot rule layers, but
they do not register plugins.markdown or plugins.json. Use them only when an
earlier matching flat config entry already registers markdown from
@eslint/markdown and json from @eslint/json; otherwise ESLint cannot
resolve language: "markdown/gfm" or language: "json/json".
What the presets lint
The built-in presets target these Markdown file patterns:
.github/copilot-instructions.md.github/instructions/copilot-instructions.md.github/instructions/**/*.instructions.md.github/prompts/**/*.prompt.md.github/agents/**/*.agent.md.github/chatmodes/**/*.chatmode.md.github/skills/**/*.md.claude/skills/**/*.md**/SKILL.md**/AGENTS.md**/CLAUDE.md**/GEMINI.md
They also target these JSON file patterns:
.github/hooks/**/*.json
Presets
This plugin intentionally exports four presets:
| Self-contained preset | No-language-plugin variant |
|---|---|
๐ข copilot.configs.minimal | copilot.configs["minimal-without-language-plugins"] |
๐ก copilot.configs.recommended | copilot.configs["recommended-without-language-plugins"] |
๐ด copilot.configs.strict | copilot.configs["strict-without-language-plugins"] |
๐ฃ copilot.configs.all | copilot.configs["all-without-language-plugins"] |
Configuration examples by preset
import copilot from "eslint-plugin-copilot";
export default [
...copilot.configs.minimal,
// ...copilot.configs.recommended,
// ...copilot.configs.strict,
// ...copilot.configs.all,
];
Rules
Contributors โจ
Thanks goes to these wonderful people (emoji key):