Answer the question
In order to leave comments, you need to log in
How to set up Eslint in create-react-app?
The goal is to simply add a few rules to the rules and settings that are already in CRA out of the box. As a result:
1. According to the documentation, CRA set the global variable EXTEND_ESLINT = true, and immediately the code fell with an error, saying that in one of the files keyword 'export' is reserved. It seems that there is an expansion, then why does the config break out of the box?
2. I tried to fix it by denoting various settings in package.json, then in .eslintrc, then renamed it to .eslintrc.json. In all these configs, I expanded / did not expand "react-app", played with ecmaVersion and sourceType, changed the environment settings, it didn't really help. All the same error.
I'm setting up Eslint config for the first time, maybe my cant. Three hours of googling gave no ideas.
Is it possible to somehow set up a linter without pain in CRA? No eject and preferably no third party dependencies
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question