-
Notifications
You must be signed in to change notification settings - Fork 199
chore(deps-dev): bump some lint dependencies #628
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
Conversation
Bump all lint dependencies to their latest available versions except for the followings which will be updated later: - typescript plugin: use the latest version of the 7.x line. 8.x introduces new rules in the recommended configuration - eslint: use the latest version of the 8.x line. 9.x requires configuration changes (switch to flat config) Lint the code according to the new rules.
WalkthroughThis pull request involves a series of modifications across multiple files in the Changes
Possibly related PRs
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms (4)
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 using PR comments)
Other keywords and placeholders
CodeRabbit Configuration 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
🧹 Nitpick comments (1)
packages/core/src/view/mixins/CellsMixin.ts (1)
336-336: Simplify the boolean expression.The current expression can be simplified by using the logical NOT operator instead of a ternary with boolean literals.
Apply this diff to simplify the code:
- value = (style[key] ?? defaultValue) ? false : true; + value = !(style[key] ?? defaultValue);🧰 Tools
🪛 Biome (1.9.4)
[error] 336-336: Unnecessary use of boolean literals in conditional expression.
Simplify your code by directly assigning the result without using a ternary operator.
If your goal is negation, you may use the logical NOT (!) or double NOT (!!) operator for clearer and concise code.
Check for more details about NOT operator.
Unsafe fix: Remove the conditional expression with(lint/complexity/noUselessTernary)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
package-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (8)
package.json(1 hunks)packages/core/src/serialization/ModelXmlSerializer.ts(1 hunks)packages/core/src/view/GraphView.ts(2 hunks)packages/core/src/view/cell/CellRenderer.ts(1 hunks)packages/core/src/view/geometry/Shape.ts(1 hunks)packages/core/src/view/handler/ConstraintHandler.ts(1 hunks)packages/core/src/view/mixins/CellsMixin.ts(1 hunks)packages/core/src/view/mixins/TooltipMixin.ts(1 hunks)
✅ Files skipped from review due to trivial changes (5)
- packages/core/src/view/cell/CellRenderer.ts
- packages/core/src/serialization/ModelXmlSerializer.ts
- packages/core/src/view/geometry/Shape.ts
- packages/core/src/view/mixins/TooltipMixin.ts
- packages/core/src/view/GraphView.ts
🧰 Additional context used
🪛 Biome (1.9.4)
packages/core/src/view/mixins/CellsMixin.ts
[error] 336-336: Unnecessary use of boolean literals in conditional expression.
Simplify your code by directly assigning the result without using a ternary operator.
If your goal is negation, you may use the logical NOT (!) or double NOT (!!) operator for clearer and concise code.
Check for more details about NOT operator.
Unsafe fix: Remove the conditional expression with
(lint/complexity/noUselessTernary)
⏰ Context from checks skipped due to timeout of 90000ms (4)
- GitHub Check: build (windows-2022)
- GitHub Check: build
- GitHub Check: build (macos-14)
- GitHub Check: build (ubuntu-22.04)
🔇 Additional comments (4)
packages/core/src/view/handler/ConstraintHandler.ts (1)
392-392: LGTM! Improved operator precedence clarity.The addition of parentheses around the nullish coalescing operation
(this.graph.getAllConnectionConstraints(state, source) ?? [])enhances code readability by making the operator precedence explicit.package.json (3)
24-25: LGTM! TypeScript ESLint packages are in syncThe update to v7.18.0 for both
@typescript-eslint/eslint-pluginand@typescript-eslint/parsermaintains version parity and adheres to the constraint of staying on the 7.x line to avoid new recommended rules.
26-26: Verify ESLint compatibility matrixThe ESLint update to 8.57.1 maintains compatibility with 8.x as required. Let's verify the compatibility of the updated plugins with this version.
Also applies to: 28-29
✅ Verification successful
✓ ESLint and plugin versions are compatible and up-to-date
- ESLint 8.57.1 is the latest available 8.x version
- Both eslint-plugin-import 2.31.0 and eslint-plugin-prettier 5.2.1 are compatible with ESLint 8.x
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Check latest versions and peer dependencies # Check latest versions within constraints echo "Latest ESLint 8.x version:" curl -s https://registry.npmjs.org/eslint | jq -r '[.versions[] | select(startswith("8."))] | max_by(.)' echo "\nESLint Plugin Import peer dependencies:" curl -s https://registry.npmjs.org/eslint-plugin-import/2.31.0 | jq '.peerDependencies' echo "\nESLint Plugin Prettier peer dependencies:" curl -s https://registry.npmjs.org/eslint-plugin-prettier/5.2.1 | jq '.peerDependencies'Length of output: 779
Script:
#!/bin/bash # Description: Check if ESLint 8.57.1 is the latest 8.x version echo "Latest ESLint 8.x versions:" curl -s https://registry.npmjs.org/eslint | jq -r '.versions | keys[] | select(startswith("8."))' | sort -V | tail -n 5Length of output: 221
30-30: Verify Prettier compatibility and breaking changesThe update to Prettier 3.4.2 is a significant jump. Let's verify compatibility and check for breaking changes.
✅ Verification successful
Prettier update is compatible
The update to Prettier 3.4.2 is safe with the current eslint-plugin-prettier version (~5.2.1). Both versions are up-to-date and compatible.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Check Prettier compatibility and changelog # Check latest versions and release notes echo "Latest Prettier versions:" curl -s https://registry.npmjs.org/prettier | jq -r '[.versions[] | select(startswith("3."))] | max_by(.)' # Check compatibility with eslint-plugin-prettier echo "\nPrettier peer dependencies:" curl -s https://registry.npmjs.org/prettier/3.4.2 | jq '.peerDependencies' # Look for CHANGELOG.md to check breaking changes fd -t f "CHANGELOG.md" | xargs rg -A 5 "3\.4\.0"Length of output: 897
Script:
#!/bin/bash # Description: Retry compatibility check with corrected commands # Check Prettier versions correctly echo "Latest Prettier version:" curl -s https://registry.npmjs.org/prettier | jq -r '."dist-tags".latest' # Check local eslint-plugin-prettier version echo "\nLocal ESLint Prettier plugin version:" cat package.json | jq -r '.dependencies["eslint-plugin-prettier"] // .devDependencies["eslint-plugin-prettier"] // "not found"' # Try to find breaking changes in release notes echo "\nPrettier 3.4.0 release notes:" curl -s "https://api.github.com/repos/prettier/prettier/releases/tags/3.4.0" | jq -r '.body'Length of output: 666
Bump all lint dependencies to their latest available versions except for the followings which will be updated later:
Lint the code according to the new rules.
Summary by CodeRabbit
Chores
Refactor
toggleCellStylesmethod