feat: integrate prettier and enforce code formatting#192
feat: integrate prettier and enforce code formatting#192Rahul-R79 wants to merge 6 commits intoaccordproject:mainfrom
Conversation
|
As we discussed in today's call, I've implemented Prettier for consistent formatting and added a CI check to enforce it. I’ve also run the tests, linting, and Prettier locally, and everything passed successfully with no issues. Note: To keep |
Signed-off-by: Rahul-R79 <rahul.devworks@gmail.com>
dc1c6a9 to
a11a36e
Compare
Signed-off-by: Rahul R <158848606+Rahul-R79@users.noreply.github.com>
Signed-off-by: Rahul-R79 <rahul.devworks@gmail.com>
Signed-off-by: Rahul-R79 <rahul.devworks@gmail.com>
There was a problem hiding this comment.
Pull request overview
Integrates Prettier-based formatting into the repo, aiming to separate formatting concerns from ESLint and (per PR description) enforce formatting in CI.
Changes:
- Add Prettier + eslint-config-prettier, and introduce
format/format:checknpm scripts. - Add Prettier configuration and ignore rules.
- Update ESLint config to extend
prettierand remove formatting-related rules; add VS Code workspace settings to default to Prettier.
Reviewed changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| package.json | Adds Prettier scripts and devDependencies; reformats JSON. |
| package-lock.json | Locks new Prettier and eslint-config-prettier dependencies. |
| .vscode/settings.json | Configures VS Code to format on save with Prettier and run ESLint fixes. |
| .prettierrc | Introduces Prettier configuration (tab width, quotes, etc.). |
| .prettierignore | Excludes build/artifact directories from Prettier runs. |
| .eslintrc.yml | Extends prettier and removes ESLint formatting rules. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
mttrbrts
left a comment
There was a problem hiding this comment.
Let's keep the 4 space indenting to remain consistent with other projects in this org, e.g. https://github.com/accordproject/concerto/blob/main/.eslintrc.yml
9ea416e to
0091cc1
Compare
…t tabWidth to 4 Signed-off-by: Rahul-R79 <rahul.devworks@gmail.com>
0091cc1 to
9f325c9
Compare
|
@copilot why is the build failing? |
Closes #191
This PR integrates Prettier into the project to handle code formatting, separating stylistic concerns from code quality checks (ESLint). It also adds a mandatory formatting check in the CI pipeline.
Changes
prettierandeslint-config-prettier.npm run format(write) andnpm run format:check(verify) to package.json.prettier, disabling conflicting formatting rules.npm run format:checkstep to .github/workflows/build.yml to fail builds on formatting errors.Flags
.git-blame-ignore-revs(in a follow-up PR) to preservegit blameusability.Screenshots or Video
N/A (Formatting changes only)
Related Issues
Author Checklist
--signoffoption of git commit.mainfromfork:feat/add-prettier