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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

eslint-config/eslint-plugin: Support "Flat Config" (ESLint 9) #42996

Open
Tracked by #18093
JoshuaKGoldberg opened this issue Feb 13, 2024 · 12 comments
Open
Tracked by #18093

eslint-config/eslint-plugin: Support "Flat Config" (ESLint 9) #42996

JoshuaKGoldberg opened this issue Feb 13, 2024 · 12 comments
Assignees
Labels
Good first issue Interested in collaborating? Take a stab at fixing one of these issues. Help Wanted :octocat: Issues ideal for external contributors. Never gets stale Prevent those issues and PRs from getting stale

Comments

@JoshuaKGoldberg
Copy link

JoshuaKGoldberg commented Feb 13, 2024

Description

馃憢 Coming over from eslint/eslint#18093: ESLint is migrating to a new "flat config" format that will be the default in ESLint v9.

It doesn't look like @react-native-community/eslint-plugin has support yet. I'm posting this issue here as a reference & cross-linking it to the table in eslint/eslint#18093. If there's anything technical blocking the extension from supporting flat configs, please let us know - we'd be happy to try to help! 馃挏

Additional resources:

(sorry for not using the issue template properly - I wasn't sure how best to report this)

Steps to reproduce

  1. Have an eslint.config.js (flat config)
  2. See setup instructions https://www.npmjs.com/package/@react-native-community/eslint-plugin
  3. Note the missing mention of flat config

React Native Version

n/a

Affected Platforms

Other (please specify)

Output of npx react-native info

n/a

Stacktrace or Logs

n/a

Reproducer

n/a

Screenshots and Videos

No response

Copy link

鈿狅笍 Add or Reformat Version Info
鈩癸笍 We could not find or parse the version number of React Native in your issue report. Please use the template, and report your version including major, minor, and patch numbers - e.g. 0.70.2

@github-actions github-actions bot added Needs: Author Feedback Needs: Repro This issue could be improved with a clear list of steps to reproduce the issue. and removed Needs: Triage 馃攳 labels Feb 13, 2024
Copy link

鈿狅笍 Missing Reproducible Example
鈩癸笍 We could not detect a reproducible example in your issue report. Please provide either:
  • If your bug is UI related: a Snack
  • If your bug is build/update related: use our Reproducer Template. A reproducer needs to be in a GitHub repository under your username.

@cortinico
Copy link
Contributor

It doesn't look like `@react-native-community/eslint-plugin has support yet

Hey @JoshuaKGoldberg, we don't maintain this package anymore. Did you mean @react-native/eslint-plugin?

@JoshuaKGoldberg
Copy link
Author

JoshuaKGoldberg commented Feb 13, 2024

Oh! Maybe I did. Sorry, I haven't written anything in React Native in a few years and I got confused by all the similar names 馃槄.

Just confirming where the packages are now, what package(s) should I be filing this issue on?

I think part of my confusion comes from both https://www.npmjs.com/package/@react-native/eslint-plugin and https://www.npmjs.com/package/@react-native-community/eslint-plugin linking to this repo.

@github-actions github-actions bot added Needs: Attention Issues where the author has responded to feedback. Needs: Author Feedback and removed Needs: Author Feedback labels Feb 13, 2024
@cortinico cortinico added Good first issue Interested in collaborating? Take a stab at fixing one of these issues. Help Wanted :octocat: Issues ideal for external contributors. Never gets stale Prevent those issues and PRs from getting stale and removed Needs: Author Feedback Needs: Repro This issue could be improved with a clear list of steps to reproduce the issue. Needs: Attention Issues where the author has responded to feedback. Needs: Version Info labels Feb 14, 2024
@cortinico
Copy link
Contributor

Just confirming where the packages are now, what package(s) should I be filing this issue on?

Packages that are eslint related and hosted on this repo are:

  • @react-native/eslint-config
  • @react-native/eslint-plugin
  • @react-native/eslint-plugin-specs

I think part of my confusion comes from both npmjs.com/package/@react-native/eslint-plugin and npmjs.com/package/@react-native-community/eslint-plugin linking to this repo.

Yup as historically we were hosting @react-native-community/eslint-plugin inside this repo. We then renamed it to @react-native/eslint-plugin

@Eprince-hub
Copy link

I guess there is no update on this yet

@aeyll-11
Copy link

@JoshuaKGoldberg Hello, I hope you're doing well! I'm currently in the process of migrating to ESLint version 9 using a flat configuration. However, I couldn't find any information regarding the overrides property in the configration files for version 9.
In the version 8 documentation it was mentioned.

Could you please clarify if there have been changes to the overrides property or if it's still applicable in version 9?

Thank you in advance for the answer

@JoshuaKGoldberg
Copy link
Author

馃憢 @aeyll-11 - just to clarify, is this for adding support for React Native's ESLint presets, or for another project?

Answering in general: yes, you can think of the new flat config format as kind of being a list of overrides. From https://eslint.org/docs/head/use/configure/configuration-files#specifying-files-and-ignores (in the page you linked) - you can specify any number of files/ignores entries that apply in order.

If you've got more questions about what's changed that aren't directly on React Native using flat config, I think the ESLint Discord would be a good place to ask more. If your question actually is about specifically React Native & this issue then never mind, apologies. 馃檪

@aeyll-11
Copy link

@JoshuaKGoldberg Its for adding support for React Native's ESLint presets.

@MCanhisares
Copy link
Contributor

@cortinico Can you assign this issue to me? I'd like to take a crack based on some of the other libraries that also added support to the flat config

@cortinico
Copy link
Contributor

@cortinico Can you assign this issue to me? I'd like to take a crack based on some of the other libraries that also added support to the flat config

Sure please go ahead 馃憤

@MCanhisares
Copy link
Contributor

@cortinico opened a PR with the changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Good first issue Interested in collaborating? Take a stab at fixing one of these issues. Help Wanted :octocat: Issues ideal for external contributors. Never gets stale Prevent those issues and PRs from getting stale
Projects
None yet
Development

No branches or pull requests

5 participants