TheOdinProject / curriculum

The open curriculum for learning web development
https://www.theodinproject.com/
Other
9.87k stars 13.21k forks source link

Fixed Issue #28747 Rendering Techniques React Course: Update eslint.config.js configuaration instructions #28808

Closed 1Amal closed 1 week ago

1Amal commented 1 week ago

Changed the name of the file in the note box from .eslintrc.cjs to eslint.config.js, and removed the double quotes from "rules" so it just says rules.

Because

It is incorrectly suggested that .eslintrc.cjs should be updated to turn off error" missing in props validation". I tried creating .eslintrc.cjs file in the project root folder and added the suggested rule. But it did nothing, so I researched online and found that it needs to be added to the eslint.config.js under rules as 'react/prop-types': 'off' this worked.

This PR

Issue

Closes #28747

Additional Information

MaoShizhong commented (https://github.com/TheOdinProject/curriculum/issues/28747#issuecomment-2334208327) • Thanks @1Amal. eslint-plugin-react only recently added support for ESLint's flat config format (Vite still shipped with .eslintrc until very recently).

All we need to do is change the name of the file in the note box from .eslintrc.cjs to eslint.config.js, and remove the double quotes from "rules" so it just says rules. Since you ticked the assignment box, I'll assign this to you to PR.

Pull Request Requirements