-
Notifications
You must be signed in to change notification settings - Fork 49.6k
Description
The sample eslint.config.js in the eprh readme doesn't work out of the box. It errors with
Parsing error: Unexpected token ...
either due to not recognising jsx syntax (in a js project) or not recognising typescript syntax (ts project)
I realise that providing a fully functional eslint setup is outside the scope of react, and much will depend on framework/bundler. But I think having an absolutely minimal example which works if you copy-paste would be helpful, both for people not yet using eslint who want to start using the linter, and also for folks having problems updating to the latest version.
eslint-plugin-react-hooks version: 6.1.1
update: version 7.0.0 also has a problem, see comment below
Steps To Reproduce
- clone repros / open sandboxes
- try running
npm run lint
Link to code example:
- js: https://github.com/mdj-uk/vite-react-no-ts (sandbox)
- ts: https://github.com/mdj-uk/vite-react-ts (sandbox)
The current behavior
Parsing error when trying to lint
The expected behavior
Linting should work if you copy-paste example configs from readme