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

feat: enable enforce-node-prefix by default #73

Merged
merged 1 commit into from
Jun 29, 2024
Merged

feat: enable enforce-node-prefix by default #73

merged 1 commit into from
Jun 29, 2024

Conversation

fengmk2
Copy link
Member

@fengmk2 fengmk2 commented Jun 29, 2024

BREAKING CHANGE: drop Node.js < 18.19.0 support

new features:

  • support es2022 by default
  • enable enforce-node-prefix by default

other breaking changes:

  • remove react rules
  • remove babel
  • drop TypeScript < 5 support

Summary by CodeRabbit

  • New Features

    • Introduced ES2022 features: at() method, RegExp match indices, and error.cause support in new test files.
  • Bug Fixes

    • Corrected a typo in test descriptions.
  • Chores

    • Updated Node.js version in CI workflows.
    • Updated Node.js Style Guide for EggJS.
    • Removed obsolete dependencies and updated ESLint configurations.
    • Standardized import statements to use node: prefix for core modules.
  • Tests

    • Added and updated test cases for ES2022 features and Node.js module imports.

BREAKING CHANGE: drop Node.js < 18.19.0 support

new features:

 - support es2022 by default
 - enable enforce-node-prefix by default

other breaking changes:

 - remove react rules
@fengmk2 fengmk2 added the Major label Jun 29, 2024
@fengmk2 fengmk2 self-assigned this Jun 29, 2024
Copy link

coderabbitai bot commented Jun 29, 2024

Warning

Review failed

The pull request is closed.

Walkthrough

The overall changes primarily focus on updating Node.js versions, improving module imports to use the node: prefix, upgrading ESLint configurations for newer JavaScript standards, and refining TypeScript support. The modifications improve compatibility and modernize the codebase, enhancing linting rules and test configurations while removing deprecated or unnecessary rules and dependencies.

Changes

Files/Paths Summary of Changes
.github/workflows/nodejs.yml, .github/workflows/release.yml Updated Node.js versions and removed checkTest: false.
README.md Updated version numbers for eslint-config-egg and typescript, and modified style guide references.
index.js Updated ES version from 2020 to 2022 in parser options.
lib/rules/es2022.js Changed env setting from es2020: true to es2022: true.
lib/rules/style.js Changed require('os') to require('node:os').
lib/rules/typescript.js Updated URLs for rule documentation links from .md to .mdx.
package.json Removed Babel and React dependencies, updated @typescript-eslint versions, and refined description.
test/* Updated require('path') to require('node:path') and improved import statements.
test/fixtures/es2022/* Added new tests and configurations for ES2022 features such as at(), error.cause, and regex.

Poem

🐰✨

In the world of code, we hop along,
With Node.js updates, we grow strong.
From eighteen onward, we take our flight,
With eslint rules, we're shining bright.
Typescript's glory, we now behold,
In the dance of modules, stories unfold.

🌟🐇✨


Tip

Early access features
  • OpenAI gpt-4o model for reviews and chat.

Note:

  • You can disable early access features from the CodeRabbit UI or by setting early_access: false in the CodeRabbit configuration file.
  • Please join our Discord Community to provide feedback and report issues.
  • OSS projects are always opted into early access features.

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>.
    • 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 generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @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 as 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.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration 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.

@fengmk2 fengmk2 merged commit a6802b0 into master Jun 29, 2024
7 checks passed
@fengmk2 fengmk2 deleted the next branch June 29, 2024 03:28
fengmk2 pushed a commit that referenced this pull request Jun 29, 2024
[skip ci]

## [14.0.0](v13.1.0...v14.0.0) (2024-06-29)

### ⚠ BREAKING CHANGES

* drop Node.js < 18.19.0 support

new features:

 - support es2022 by default
 - enable enforce-node-prefix by default

other breaking changes:

 - remove react rules
 - remove babel
 - drop TypeScript < 5 support

### Features

* enable enforce-node-prefix by default ([#73](#73)) ([a6802b0](a6802b0))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

1 participant