Skip to content

docs(create-vite): recommend eslint-react for linting#19524

Merged
bluwy merged 1 commit into
mainfrom
eslint-react-setup
Feb 27, 2025
Merged

docs(create-vite): recommend eslint-react for linting#19524
bluwy merged 1 commit into
mainfrom
eslint-react-setup

Conversation

@bluwy

@bluwy bluwy commented Feb 26, 2025

Copy link
Copy Markdown
Member

Description

Followup of #19514.

I made the simplest change possible in this PR, but alternatively we can also:

  1. Use extends: [reactX.configs['recommended-typescript'], reactDom.configs.recommended]
  2. Or simply link to https://eslint-react.xyz/docs/getting-started/typescript but it explains using @eslint-react/eslint-plugin as a whole.

I don't know if there's a best practice here, but personally for me I think it's easiest with no2 and let users setup as documented themselves. We can also link the type-aware setup above to https://typescript-eslint.io/getting-started/typed-linting so we don't have to maintain instructions anymore.

Also, I've tested the setup locally and it works.

@sapphi-red sapphi-red added documentation Improvements or additions to documentation feat: create-vite create-vite package labels Feb 27, 2025

@sapphi-red sapphi-red left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Personally, I feel using extends is better here as I won't come up with questions like "why does one code block uses extends and the other block doesn't". But I think the current state is fine as well 👍

@bluwy bluwy requested a review from ArnaudBarre February 27, 2025 03:30

@ArnaudBarre ArnaudBarre left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I'm fine with both approaches

@bluwy

bluwy commented Feb 27, 2025

Copy link
Copy Markdown
Member Author

Ok let's keep with the current change here for now then and we can see later if people feel it's confusing.

@bluwy bluwy merged commit e912080 into main Feb 27, 2025
@bluwy bluwy deleted the eslint-react-setup branch February 27, 2025 11:50
@Rel1cx

Rel1cx commented Feb 27, 2025

Copy link
Copy Markdown

Here, we can wait for this rfc to land on end user and extends to become a standard in flat config before updating it to extends.

@bluwy bluwy mentioned this pull request Mar 7, 2025
4 tasks
@Mikilll94

Copy link
Copy Markdown

@bluwy But extends is already merged and supported in ESLint.

@bluwy

bluwy commented Mar 7, 2025

Copy link
Copy Markdown
Member Author

Can you show that? I don't see it implemented still. The change to track is at eslint/eslint#19116

@Mikilll94

Copy link
Copy Markdown

Sorry, you are right. It is only implemented in typescript-eslint.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation feat: create-vite create-vite package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants