-
-
Notifications
You must be signed in to change notification settings - Fork 221
chore: introduce prettier
#723
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
base: main
Are you sure you want to change the base?
Conversation
| **/tests/fixtures/ | ||
| **/dist/ | ||
| **/coverage/ | ||
| packages/espree/tools/create-test-example.js |
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.
This ignore pattern follows the same pattern used in eslint.config.js:
Lines 10 to 15 in 80033b8
| globalIgnores([ | |
| "**/tests/fixtures/", | |
| "**/dist/", | |
| "**/coverage/", | |
| "packages/espree/tools/create-test-example.js" | |
| ]), |
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 introduces Prettier for consistent code formatting across the ESLint JS monorepo. The configuration follows the standard setup used in other ESLint organization repositories.
Changes:
- Added Prettier configuration and tooling
- Formatted all source files with tabs, 4-space tab width, and arrow function parentheses avoidance
- Updated CI workflow to enforce formatting checks
- Removed
eslint-config-eslint/formattingsince Prettier now handles formatting
Reviewed changes
Copilot reviewed 89 out of 110 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| prettier.config.js | Adds Prettier configuration matching ESLint org standards |
| package.json | Adds Prettier dependency and formatting scripts |
| .prettierignore | Configures files to exclude from Prettier |
| eslint.config.js | Removes formatting ESLint config (delegated to Prettier) |
| .github/workflows/ci.yml | Adds formatting check to CI pipeline |
| packages/**/*.js | Applies consistent formatting with tabs and proper indentation |
| packages/**/*.{md,json,html,css} | Applies Prettier formatting to documentation and config files |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Prerequisites checklist
What is the purpose of this pull request?
In this PR, I've added Prettier to keep formatting consistent.
The
prettier.config.jsfile follows the common setup used across the ESLint organization:I plan to add a
.git-blame-ignore-revsfile if preserving a clean git blame history is important.What changes did you make? (Give an overview)
In this PR, I've added Prettier to keep formatting consistent.
Related Issues
Ref: #671
Is there anything you'd like reviewers to focus on?
The git diff is quite large, but I haven't changed any logic. Occasionally
eslint-disableor@ts-ignorecomment directives were moved to the wrong position, I only adjusted them where necessary.