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

Add support for ESLint v9 #204

Merged
merged 1 commit into from
Oct 15, 2024
Merged

Add support for ESLint v9 #204

merged 1 commit into from
Oct 15, 2024

Conversation

frantic1048
Copy link
Contributor

@frantic1048 frantic1048 commented Oct 9, 2024

Goal

  1. A new @rightcapital/eslint-config package will target ESLint v9, provide various configurations for different usages, and receive future updates.
  2. The existing @rightcapital/eslint-config-* packages will continue to support ESLint v8, but we may deprecate them in favor of the new @rightcapital/eslint-config.

Changes

  1. Packages:

    1. @rightcapital/eslint-config(new package), targets ESLint v9, almost have the same rules with @rightcapital/eslint-config-*, with following differences:

      1. Migrated deprecated rule no-new-symbol to no-new-native-nonconstructor
      2. Added sensible preset for files (likes overrides in ESLint v8) in recommended config, this would hugely reduce users config to apply different rules for different files. (It already makes the ESLint config in this repo clearer.)
    2. Removed legacy packages (we may deprecate them on npm later):

      • @rightcapital/eslint-config-base
      • @rightcapital/eslint-config-javascript
      • @rightcapital/eslint-config-typescript
      • @rightcapital/eslint-config-typescript-react
  2. E2E tests:

    • specs/eslint-configs-legacy: renamed from specs/eslint-configs, target ESLint v8, test configs for @rightcapital/eslint-config-*.
    • specs/eslint-configs: target ESLint v9, test the new @rightcapital/eslint-config.
  3. Docs:

    • Updated usage instruction. (preview)
  4. As 1.i.b. mentioned, the ESLint config in this repo has been migrated to the new @rightcapital/eslint-config and ESLint v9.


This resolves #128.

@frantic1048 frantic1048 added the enhancement New feature or request label Oct 9, 2024
@frantic1048 frantic1048 self-assigned this Oct 9, 2024
@frantic1048 frantic1048 force-pushed the feature/eslint-v9 branch 13 times, most recently from 765af4a to 614f250 Compare October 11, 2024 09:28
@frantic1048 frantic1048 marked this pull request as ready for review October 11, 2024 09:32
@frantic1048 frantic1048 requested review from lixiaoyan and liby October 11, 2024 09:33
@frantic1048 frantic1048 force-pushed the feature/eslint-v9 branch 3 times, most recently from 57a7808 to 8676cd8 Compare October 12, 2024 03:27
deprecates legacy packages:

- `@rightcapital/eslint-config-base`
- `@rightcapital/eslint-config-javascript`
- `@rightcapital/eslint-config-typescript`
- `@rightcapital/eslint-config-typescript-react`

resolves #128
Copy link
Contributor

@lixiaoyan lixiaoyan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider adding support for .gitignore or .eslintignore?

@frantic1048
Copy link
Contributor Author

Consider adding support for .gitignore or .eslintignore?

We may add this in later versions. This PR aims to bring ESLint v9 support with least changes to features as possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

Successfully merging this pull request may close these issues.

ESLint v9 support
3 participants