-
Notifications
You must be signed in to change notification settings - Fork 118
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
test: use oxlint instead of eslint #519
Conversation
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the WalkthroughThe recent changes involve a significant update to the project's linting setup and dependency management. The Changes
Poem
Tip Early access features
Note:
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 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 (
|
Removed dependencies detected. Learn more about Socket for GitHub ↗︎ 🚮 Removed packages: npm/@tsconfig/node18@18.2.4, npm/@tsconfig/strictest@2.0.5, npm/eslint-config-egg@13.1.0, npm/eslint@8.57.0 |
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)
- package.json (3 hunks)
- src/utils.ts (1 hunks)
- test/mts/tsconfig.json (1 hunks)
- test/options.dataType.test.ts (1 hunks)
- test/options.fixJSONCtlChars.test.ts (1 hunks)
- test/user-agent.test.ts (1 hunks)
Files skipped from review due to trivial changes (4)
- test/mts/tsconfig.json
- test/options.dataType.test.ts
- test/options.fixJSONCtlChars.test.ts
- test/user-agent.test.ts
Additional context used
Biome
src/utils.ts
[error] 15-15: Unexpected control character(s) in regular expression: \u0000, \u001F
Control characters are unusual and potentially incorrect inputs, so they are disallowed.
(lint/suspicious/noControlCharactersInRegex)
[error] 125-125: Use the '**' operator instead of 'Math.pow'.
Unsafe fix: Use the '**' operator instead of 'Math.pow'.
(lint/style/useExponentiationOperator)
Additional comments not posted (3)
package.json (1)
26-26
: Verify the new lint configuration.The lint script has been updated to use
oxlint
. Ensure thatoxlint
is configured correctly to cover all the checks previously handled byeslint
.src/utils.ts (2)
15-15
: Refactor to use the exponentiation operator.The use of
Math.pow
can be modernized to use the exponentiation operator for better readability and performance.- const MAX_ID_VALUE = Math.pow(2, 31) - 10; + const MAX_ID_VALUE = (2 ** 31) - 10;Likely invalid or redundant comment.
Tools
Biome
[error] 15-15: Unexpected control character(s) in regular expression: \u0000, \u001F
Control characters are unusual and potentially incorrect inputs, so they are disallowed.
(lint/suspicious/noControlCharactersInRegex)
15-15
: Confirm removal of ESLint directive.Ensure that the removal of the ESLint directive
no-control-regex: "off"
does not lead to linting issues withoxlint
, especially concerning control characters in regular expressions.Tools
Biome
[error] 15-15: Unexpected control character(s) in regular expression: \u0000, \u001F
Control characters are unusual and potentially incorrect inputs, so they are disallowed.
(lint/suspicious/noControlCharactersInRegex)
"iconv-lite": "^0.6.3", | ||
"oxlint": "^0.5.0", |
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.
Tip
Codebase Verification
Remove residual eslint references.
Ensure that all references to eslint
are removed or updated in the following files to avoid conflicts with the new oxlint
setup:
src/HttpAgent.ts
src/HttpClient.ts
test/cjs/index.js
Analysis chain
Check for residual eslint references.
Ensure that all references to eslint
and related configurations are removed from the project to avoid conflicts with the new oxlint
setup.
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Search for residual eslint references.
# Test: Search for eslint references. Expect: No occurrences.
rg --type json --type js --type ts 'eslint'
Length of output: 260
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #519 +/- ##
==========================================
- Coverage 97.86% 97.75% -0.12%
==========================================
Files 10 10
Lines 1596 1601 +5
Branches 256 257 +1
==========================================
+ Hits 1562 1565 +3
- Misses 30 32 +2
Partials 4 4 ☔ View full report in Codecov by Sentry. |
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
oxlint 目前规则太弱。。。估计搞不定。还是先保持目前的 eslint 8 |
eggjs/egg#5329
Summary by CodeRabbit
Chores
eslint
tooxlint
for improved code quality checks.@tsconfig/node18
and@tsconfig/strictest
.eslint
andeslint-config-egg
, and addingoxlint
.Style
Tests