ESLint: “error Parsing error: The keyword ‘const’ is reserved”

ESLint defaults to ES5 syntax-checking. You’ll want to override to the latest well-supported version of JavaScript. Try adding a .eslintrc.json file to your project. Inside it: { “parserOptions”: { “ecmaVersion”: “latest” }, “env”: { “es6”: true } } Hopefully this helps. EDIT: I also found this example .eslintrc.json which might help.

ESLint Must use destructuring state assignment

That’s called: Enforce consistent usage of destructuring assignment of props, state, and context (react/destructuring-assignment) More details are available here: destructuring-assignment In order to make that warning/error disappear, you could do like this: … const { items }= this.state; … { items.map(item => ( <div key={item}> { item.links.map(thing => ( <NavLink key={thing.link.id} exact to={thing.link.url} > {thing.link.text} … Read more

Disable ESLint that create-react-app provides

As of react-scripts v4.0.2, you can now opt out of ESLint with an environment variable. You can do this by adding it to your .env file, or by prefixing your scripts in your package.json file. For example in .env: DISABLE_ESLINT_PLUGIN=true Or in your package.json: { “scripts”: { “start”: “DISABLE_ESLINT_PLUGIN=true react-scripts start”, “build”: “DISABLE_ESLINT_PLUGIN=true react-scripts build”, … Read more

ESLint dollar($) is not defined. (no-undef)

You are missing “env”: { “browser”: true, “commonjs”: true, “es6”: true, “jquery”: true }, $ is not declared as a global without jquery environment enabled. Because of that, you are getting a no-undef error, saying that you are using variable that haven’t been declared.