-
-
Notifications
You must be signed in to change notification settings - Fork 1
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
bump eslint v9.5.0 #1268
bump eslint v9.5.0 #1268
Conversation
WalkthroughThe recent updates brought essential enhancements and fixes to the project. The primary focuses were updating TypeScript-related ESLint packages for better code quality, introducing a robust ESLint configuration with TypeScript checking in Changes
Sequence Diagram(s)sequenceDiagram
participant Developer
participant ESLint
participant TypeScript
Developer->>ESLint: Run linting
ESLint->>TypeScript: Parse and check types
TypeScript-->>ESLint: Return type checking results
ESLint-->>Developer: Report linting results
Note over Developer,ESLint: Developer writes code
Note over ESLint,TypeScript: ESLint & TypeScript ensure code quality
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: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files ignored due to path filters (1)
package-lock.json
is excluded by!**/package-lock.json
Files selected for processing (1)
- package.json (1 hunks)
Files skipped from review due to trivial changes (1)
- package.json
923f26c
to
83fde3d
Compare
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 ignored due to path filters (1)
package-lock.json
is excluded by!**/package-lock.json
Files selected for processing (2)
- eslint.config.mjs (1 hunks)
- package.json (1 hunks)
Files skipped from review as they are similar to previous changes (1)
- package.json
Additional comments not posted (3)
eslint.config.mjs (3)
1-1
: Ensure@ts-check
is effectively utilized by confirming TypeScript is enabled in the project settings.
3-4
: Verify that the imports for@eslint/js
andtypescript-eslint
are correctly named and accessible.
6-10
: The configuration syntax for ESLint and TypeScript ESLint seems correct, but ensure that the spread operators are used properly to merge configurations.Verification successful
The configuration syntax for ESLint and TypeScript ESLint appears correct, and the spread operators are used properly to merge configurations. No other ESLint configuration files were found in the repository.
eslint.config.mjs
: Correct usage of spread operators to merge ESLint configurations.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the correct usage of spread operators in ESLint configuration. # Test: Check for other usages of spread operators in ESLint configurations. rg --type js '...config' *.config.mjsLength of output: 167
Script:
#!/bin/bash # Description: Verify the presence of other ESLint configuration files and inspect their contents. # Find all .config.mjs files in the repository. fd --type f --extension mjs --exec cat {} +Length of output: 299
src/create.ts
Outdated
@@ -24,7 +24,7 @@ async function run(): Promise<void> { | |||
const notes_start_tag = core.getInput("notes_start_tag"); | |||
const overwrite = core.getBooleanInput("overwrite"); | |||
|
|||
if (tag_name === "") { | |||
if (tag_name = "") { |
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.
🚫 [eslint] <no-cond-assign> reported by reviewdog 🐶
Expected a conditional expression and instead saw an assignment.
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.
nice catch!
src/create.ts
Outdated
@@ -24,7 +24,7 @@ async function run(): Promise<void> { | |||
const notes_start_tag = core.getInput("notes_start_tag"); | |||
const overwrite = core.getBooleanInput("overwrite"); | |||
|
|||
if (tag_name === "") { | |||
if (tag_name = "") { |
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.
🚫 [eslint] <no-constant-condition> reported by reviewdog 🐶
Unexpected constant condition.
This reverts commit c0587b3.
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 (1)
- src/create.ts (1 hunks)
Additional context used
Biome
src/create.ts
[error] 27-27: The assignment should not be in an expression. (lint/suspicious/noAssignInExpressions)
The use of assignments in expressions is confusing.
Expressions are often considered as side-effect free.
[error] 27-27: Unexpected constant condition. (lint/correctness/noConstantCondition)
src/create.ts
Outdated
@@ -24,7 +24,7 @@ async function run(): Promise<void> { | |||
const notes_start_tag = core.getInput("notes_start_tag"); | |||
const overwrite = core.getBooleanInput("overwrite"); | |||
|
|||
if (tag_name === "") { | |||
if (tag_name = "") { |
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.
Replace the assignment operator with a comparison operator in the if
condition.
- if (tag_name = "") {
+ if (tag_name === "") {
This change fixes the logic error introduced by mistakenly replacing the equality comparison operator (===
) with an assignment operator (=
), which could lead to unintended behavior and is a common source of bugs in JavaScript and TypeScript.
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
if (tag_name = "") { | |
if (tag_name === "") { |
Tools
Biome
[error] 27-27: The assignment should not be in an expression. (lint/suspicious/noAssignInExpressions)
The use of assignments in expressions is confusing.
Expressions are often considered as side-effect free.
[error] 27-27: Unexpected constant condition. (lint/correctness/noConstantCondition)
Summary by CodeRabbit
New Features
Bug Fixes