Skip to content
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

Update to ESLint 9 #975

Merged
merged 1 commit into from
Nov 5, 2024
Merged

Update to ESLint 9 #975

merged 1 commit into from
Nov 5, 2024

Conversation

tagliala
Copy link
Member

@tagliala tagliala commented Oct 4, 2024

Close #843

Summary by CodeRabbit

  • New Features

    • Introduced a new ESLint configuration utilizing the neostandard style guide.
  • Bug Fixes

    • Removed outdated ESLint configurations that may have caused inconsistencies.
  • Chores

    • Updated ESLint version and dependencies for improved performance and compliance.

Copy link

coderabbitai bot commented Oct 4, 2024

Walkthrough

The changes involve the removal of the ESLint configuration file .eslintrc.cjs and the introduction of a new configuration file eslint.config.mjs. The new configuration adopts the neostandard style guide and specifies ignored file patterns and module resolution settings. Additionally, the package.json file has been updated to reflect changes in the ESLint version and dependencies, including the removal of certain ESLint plugins and the addition of the neostandard package.

Changes

File Change Summary
.eslintrc.cjs Removed ESLint configuration file, which included rules and ignored patterns.
eslint.config.mjs Introduced new ESLint configuration using neostandard, specifying ignored files and module paths.
package.json Updated eslint version to ^9.14.0, removed eslint-plugin-n and eslint-plugin-promise, added neostandard as a dependency.

Assessment against linked issues

Objective Addressed Explanation
Upgrade eslint to v9 (#843)
Upgrade eslint-plugin-import No update to eslint-plugin-import was made.
Upgrade eslint-plugin-n
Upgrade eslint-plugin-promise
Add neostandard

Possibly related PRs

  • Update dependencies #974: This PR updates the eslint-plugin-import version in package.json, which is related to ESLint configurations.
  • Update dependencies #991: This PR updates several dependencies, including @babel/eslint-parser, which is relevant to ESLint usage.
  • Update dependencies #994: This PR updates the @babel/eslint-parser version in package.json, directly related to ESLint configurations.
  • Update dependencies #999: This PR updates the @babel/core and @babel/preset-env versions, which may indirectly relate to ESLint configurations through Babel integration.

🐇 In the code we hop and play,
New rules for linting here to stay.
With neostandard now in sight,
Our JavaScript shines so bright!
Goodbye to plugins, old and gray,
Hello to a cleaner, brighter way! 🌟


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between aa37e2a and 6e56929.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (3)
  • .eslintrc.cjs (0 hunks)
  • eslint.config.mjs (1 hunks)
  • package.json (1 hunks)
💤 Files with no reviewable changes (1)
  • .eslintrc.cjs
✅ Files skipped from review due to trivial changes (1)
  • eslint.config.mjs
🔇 Additional comments (2)
package.json (2)

51-51: LGTM on ESLint upgrade!

The upgrade to ESLint 9 (^9.14.0) looks good. This aligns with the PR objective of upgrading to the latest major version.


52-53: 🛠️ Refactor suggestion

Consider removing redundant ESLint plugins

The eslint-plugin-import might be redundant as it should be bundled with neostandard. Additionally, there are warnings about incorrect peer dependencies with ESLint 9 for these plugins.

I recommend:

  1. Remove eslint-plugin-import as it's included in neostandard
  2. Verify if eslint-webpack-plugin is compatible with ESLint 9

Let's verify the peer dependencies:

Also applies to: 54-54


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?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@coveralls
Copy link

coveralls commented Oct 4, 2024

Pull Request Test Coverage Report for Build 11686611450

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 100.0%

Totals Coverage Status
Change from base Build 11686303075: 0.0%
Covered Lines: 19
Relevant Lines: 19

💛 - Coveralls

package.json Outdated Show resolved Hide resolved
@tagliala tagliala force-pushed the feature/843-eslint-9 branch 3 times, most recently from 8e6ac61 to b63b5f6 Compare October 9, 2024 07:01
@tagliala tagliala changed the title [WIP] Update to eslint 9 Update to ESLint 9 Nov 5, 2024
@tagliala tagliala marked this pull request as ready for review November 5, 2024 17:35
@tagliala tagliala merged commit c0407f0 into main Nov 5, 2024
6 checks passed
@tagliala tagliala deleted the feature/843-eslint-9 branch November 5, 2024 17:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Upgrade eslint to v9
3 participants