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(create-vite): add eslint.config.js to React templates #12860

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

smeng9
Copy link
Contributor

@smeng9 smeng9 commented Apr 14, 2023

Description

Hi @ArnaudBarre As a follow up on #12801 I have helped to create an example using the latest eslint.config.js format of config

Additional context


What is the purpose of this pull request?

  • Bug fix
  • New Feature
  • Documentation update
  • Other

Before submitting the PR, please make sure you do the following

  • Read the Contributing Guidelines.
  • Read the Pull Request Guidelines and follow the PR Title Convention.
  • Check that there isn't already a PR that solves the problem the same way to avoid creating a duplicate.
  • Provide a description in this PR that addresses what the PR is solving, or reference the issue that it solves (e.g. fixes #123).
  • Ideally, include relevant tests that fail without this PR but pass with it.

@stackblitz
Copy link

stackblitz bot commented Apr 14, 2023

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@ArnaudBarre
Copy link
Member

ArnaudBarre commented Apr 14, 2023

Thanks for this. I tested it and work as expected. I'm really surprised that we require to install to more packages for this, which is not mentioned in the doc that prefer to explain me what is object shorthand 🤦‍♂️

The documentation on this is so poor that I'm not sure we should push new Vite users that could be people still learning web basics into this. I will see what the react of team think of that. Thanks for the work, in any case this will be useful and merge when this become the official config format

@ArnaudBarre
Copy link
Member

Hi! We decided to wait for eslint to switch the default config format to the new one before adding it to the template.
The PR can be kept open and updated once the announcement is made (and hopefully there is more documentation)

@bluwy bluwy added p2-nice-to-have Not breaking anything but nice to have (priority) on hold labels Sep 19, 2023
@cherewaty
Copy link

The default switched to flat config with today's 9.0.0 release: https://eslint.org/blog/2024/04/eslint-v9.0.0-released/#flat-config-is-now-the-default-and-has-some-changes

@smeng9
Copy link
Contributor Author

smeng9 commented Apr 6, 2024

We still need to wait jsx-eslint/eslint-plugin-react#3699 and facebook/react#28313 to be resolved

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
on hold p2-nice-to-have Not breaking anything but nice to have (priority)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants