-
Notifications
You must be signed in to change notification settings - Fork 1.4k
chore: auto fix code using eslint #6728
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: develop
Are you sure you want to change the base?
Conversation
WalkthroughAdds an ESLint --fix step and related commit/push to the Prettier GitHub Actions workflow; standardizes arrow-function parameter syntax (adds parentheses) across several sagas and tests; fixes a test string escape; minor script log/format tweaks. No behavioral logic changes. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor Runner as GitHub Actions Runner
participant Repo as Repository
participant Prettier
participant ESLint
participant Git as Git
Runner->>Repo: checkout
Runner->>Prettier: run Prettier --write
Runner->>Runner: detect Prettier changes (steps.changes)
alt Prettier changes
Runner->>Git: commit & push Prettier changes
else no Prettier changes
note right of Runner: skip commit
end
Runner->>ESLint: run ESLint --fix
Runner->>Runner: detect ESLint changes (steps.changes.outputs.changes)
alt ESLint changes
Runner->>Git: commit & push eslint changes
else no ESLint changes
note right of Runner: skip commit
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Suggested reviewers
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
Actionable comments posted: 0
🧹 Nitpick comments (2)
.github/workflows/prettier.yml (2)
29-31
: Use repo-pinned ESLint (yarn) and run ESLint before Prettier for determinism.Avoid npx (network fetch, version drift). Run ESLint from devDeps and place Prettier last.
Apply this diff:
- - name: Run Prettier - run: yarn prettier --write . - - - name: Run ESLint - run: npx eslint . --fix + - name: Run ESLint + run: yarn eslint . --fix + + - name: Run Prettier + run: yarn prettier --write .
43-50
: Rename commit step and confirm skip CI behavior
- Rename step name to “Commit and push formatting/lint changes” to cover both Prettier + ESLint.
- GitHub Actions skips push-triggered workflow runs when commit messages include
[skip ci]
,[ci skip]
, or[no ci]
(https://docs.github.com/en/actions/how-tos/manage-workflow-runs/skip-workflow-runs).
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Disabled knowledge base sources:
- Jira integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (1)
.github/workflows/prettier.yml
(2 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: ESLint and Test / run-eslint-and-test
- GitHub Check: format
🔇 Additional comments (1)
.github/workflows/prettier.yml (1)
33-33
: Id rename is consistent.
id: changes
matches the later conditional usage. LGTM.
Proposed changes
This PR updates the existing prettier workflow by adding an ESLint auto-fix step. The workflow now also automatically lints the code and commits the changes made by ESLint. This ensures consistent linting across the codebase, reducing manual formatting and review effort.
Issue(s)
https://rocketchat.atlassian.net/browse/COMM-37
How to test or reproduce
Screenshots
Types of changes
Checklist
Further comments
Summary by CodeRabbit