-
Notifications
You must be signed in to change notification settings - Fork 10
Add comprehensive GitHub Copilot instructions for eslint-plugin-primer-react with Node.js v20 support #378
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
…dated workflows Co-authored-by: joshblack <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds comprehensive GitHub Copilot instructions for the eslint-plugin-primer-react repository to help AI assistants work more effectively with the codebase. The instructions provide detailed guidance on setup, development workflows, testing patterns, and repository structure.
Key changes:
- Added complete development workflow documentation with command execution times
- Included manual rule testing patterns using Node.js and ESLint's RuleTester
- Documented repository structure and common development tasks
|
||
1. Using manual Node.js rule testing (shown above) | ||
2. Running existing test suite which validates all rules | ||
3. Creating test files and using ESLint RuleTester in the **tests** files |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The word 'tests' should not be bolded here as it's not a specific directory name. Consider using 'test files' or referencing the actual directory src/rules/__tests__/
.
3. Creating test files and using ESLint RuleTester in the **tests** files | |
3. Creating test files and using ESLint RuleTester in the test files |
Copilot uses AI. Check for mistakes.
.github/copilot-instructions.md
Outdated
|
||
### Bootstrap and Setup | ||
|
||
- Install Node.js v18+ (currently works with v20+): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot I've just updated the repository to Node.js v20 can you update these docs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated the copilot-instructions.md file to reflect the Node.js v20 upgrade. All references to v18 have been updated to v20 throughout the documentation, including the setup instructions, troubleshooting section, and .nvmrc file reference. The changes have been validated with markdown linting.
Co-authored-by: jonrohan <[email protected]>
Head branch was pushed to by a user without write access
This PR adds a comprehensive
.github/copilot-instructions.md
file that provides GitHub Copilot with detailed instructions on how to work effectively in the eslint-plugin-primer-react codebase, updated to reflect the repository's Node.js v20 upgrade.The instructions cover all essential aspects of working with this ESLint plugin repository:
Key Features
Setup and Bootstrap: Clear instructions for Node.js v20+ setup, dependency installation with
npm ci
, and confirms no build step is required since this is a direct JavaScript project.Development Commands: All npm scripts with measured execution times:
npm test
- 5 seconds (286 tests)npm run lint
- 1.5 secondsnpm run format:check
- 0.5 secondsnpm run lint:md
- under 1 secondValidation Workflows: Step-by-step instructions for validating changes before committing, including the complete sequence: lint → lint:md → format:check → test.
Manual Rule Testing: Working code examples showing how to test individual ESLint rules using Node.js and ESLint's RuleTester, with proper JSX parsing configuration.
Repository Navigation: Complete directory structure explanation covering
src/rules/
,src/rules/__tests__/
,docs/rules/
,src/configs/
, andsrc/utils/
.Common Development Tasks: Detailed workflows for adding new rules and modifying existing ones, including the relationship between rule implementations, tests, and documentation.
Node.js v20 Alignment
All Node.js version references have been updated to reflect the repository's upgrade to v20:
.nvmrc
(v20) and CI workflowsValidation
All commands and patterns in the instructions have been thoroughly tested and validated:
The instructions emphasize that this repository has very fast validation commands (all under 5 seconds except dependency installation), making it efficient for iterative development.
Fixes #377.
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.