-
Notifications
You must be signed in to change notification settings - Fork 0
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
feat: added commitlint #222
Conversation
WalkthroughThe recent changes introduce several enhancements to the codebase, primarily focusing on commit message linting and pre-commit build processes. New configuration files for Changes
Sequence Diagram(s)No sequence diagrams are necessary for these changes. Poem
TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
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: 1
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (6)
- .husky/commit-msg (1 hunks)
- .husky/pre-commit (1 hunks)
- commitlint.config.js (1 hunks)
- package.json (2 hunks)
- src/components/message-item/index.tsx (1 hunks)
- src/components/navbar/index.tsx (2 hunks)
Files skipped from review due to trivial changes (3)
- .husky/commit-msg
- .husky/pre-commit
- commitlint.config.js
Additional context used
Biome
src/components/navbar/index.tsx
[error] 223-223: Expected an identifier but instead found '<'. (parse)
Expected an identifier here.
[error] 223-223: expected
,
but instead founddata
(parse)Remove data
[error] 223-223: expected
,
but instead found-
(parse)Remove -
[error] 223-223: expected
,
but instead foundtestid
(parse)Remove testid
[error] 223-223: expected
,
but instead found=
(parse)Remove =
[error] 224-224: expected
...
but instead foundshowRightLogo1
(parse)Remove showRightLogo1
[error] 231-231: expected
...
but instead foundshowRightLogo2
(parse)Remove showRightLogo2
[error] 238-238: expected
...
but instead foundshowRightLogo3
(parse)Remove showRightLogo3
[error] 245-245: expected
>
but instead found<
(parse)Remove <
src/components/message-item/index.tsx
[error] 619-641: Enforce to have the onClick mouse event with the onKeyUp, the onKeyDown, or the onKeyPress keyboard event. (lint/a11y/useKeyWithClickEvents)
Actions triggered using mouse events should have corresponding keyboard events to account for keyboard-only navigation.
[error] 679-692: Enforce to have the onClick mouse event with the onKeyUp, the onKeyDown, or the onKeyPress keyboard event. (lint/a11y/useKeyWithClickEvents)
Actions triggered using mouse events should have corresponding keyboard events to account for keyboard-only navigation.
[error] 713-726: Enforce to have the onClick mouse event with the onKeyUp, the onKeyDown, or the onKeyPress keyboard event. (lint/a11y/useKeyWithClickEvents)
Actions triggered using mouse events should have corresponding keyboard events to account for keyboard-only navigation.
[error] 763-804: Enforce to have the onClick mouse event with the onKeyUp, the onKeyDown, or the onKeyPress keyboard event. (lint/a11y/useKeyWithClickEvents)
Actions triggered using mouse events should have corresponding keyboard events to account for keyboard-only navigation.
[error] 946-953: Provide a title attribute when using iframe elements. (lint/a11y/useIframeTitle)
Screen readers rely on the title set on an iframe to describe the content being displayed.
[error] 1112-1153: Enforce to have the onClick mouse event with the onKeyUp, the onKeyDown, or the onKeyPress keyboard event. (lint/a11y/useKeyWithClickEvents)
Actions triggered using mouse events should have corresponding keyboard events to account for keyboard-only navigation.
[error] 148-148: Don't use 'Boolean' as a type. (lint/complexity/noBannedTypes)
Use lowercase primitives for consistency.
Safe fix: Use 'boolean' instead
[error] 598-603: Provide an explicit type prop for the button element. (lint/a11y/useButtonType)
The default type of a button is submit, which causes the submission of a form when placed inside a
form
element. This is likely not the behaviour that you want inside a React application.
Allowed button types are: submit, button or reset
Additional comments not posted (4)
package.json (2)
15-19
: Ensure proper configuration of Husky hooks for commit messages.The Husky configuration for
commit-msg
usescommitlint -E HUSKY_GIT_PARAMS
. This setup is appropriate for ensuring that commit messages adhere to the configured standards.
71-72
: Correct addition of commitlint dependencies.The
devDependencies
have been correctly updated to include@commitlint/cli
and@commitlint/config-conventional
. This supports the commit message linting functionality.src/components/navbar/index.tsx (1)
18-18
: Validate the import of Image component.The import of
Image
from 'next/image' is appropriate here, as it is used later in the JSX. Ensure that this import does not conflict with any global Image objects.src/components/message-item/index.tsx (1)
1217-1217
: Validate removal of redundant code.The removal of the redundant line in
src/components/message-item/index.tsx
seems appropriate and does not affect the functionality of the component.
src/components/navbar/index.tsx
Outdated
< | ||
<div data-testid="navbar-right-logos"> | ||
{showRightLogo1 && ( | ||
<img | ||
src={rightLogo1Src} | ||
alt={`Right Logo 1`} | ||
style={{ maxHeight: '60px' }} | ||
/> | ||
)} | ||
{showRightLogo2 && ( | ||
<img | ||
src={rightLogo2Src} | ||
alt={`Right Logo 2`} | ||
style={{ maxHeight: '60px' }} | ||
/> | ||
)} | ||
{showRightLogo3 && ( | ||
<img | ||
src={rightLogo3Src} | ||
alt={`Right Logo 3`} | ||
style={{ maxHeight: '60px' }} | ||
/> | ||
)} | ||
</div> |
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.
Syntax error in JSX structure.
There appears to be a syntax error near line 222, where a stray '<' character is found. This needs to be corrected to ensure proper rendering of the component.
- <
+ // Corrected stray character
Committable suggestion was skipped due to low confidence.
Tools
Biome
[error] 223-223: Expected an identifier but instead found '<'. (parse)
Expected an identifier here.
[error] 223-223: expected
,
but instead founddata
(parse)Remove data
[error] 223-223: expected
,
but instead found-
(parse)Remove -
[error] 223-223: expected
,
but instead foundtestid
(parse)Remove testid
[error] 223-223: expected
,
but instead found=
(parse)Remove =
[error] 224-224: expected
...
but instead foundshowRightLogo1
(parse)Remove showRightLogo1
[error] 231-231: expected
...
but instead foundshowRightLogo2
(parse)Remove showRightLogo2
[error] 238-238: expected
...
but instead foundshowRightLogo3
(parse)Remove showRightLogo3
[error] 245-245: expected
>
but instead found<
(parse)Remove <
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
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- src/components/navbar/index.tsx (2 hunks)
Files skipped from review due to trivial changes (1)
- src/components/navbar/index.tsx
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
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- src/components/navbar/index.tsx (1 hunks)
Files skipped from review as they are similar to previous changes (1)
- src/components/navbar/index.tsx
Summary by CodeRabbit
Chores
Refactor