Skip to content

Tag: eslint

How to configure ESLint so that it disallows default exports

I’ve been searching the web and StackOverflow for this for quite some time with no success. What I’m trying to do have ESLint mark the following as errors: with default being the key here. So far the best I’ve got is a reference to eslint-plugin-import plugin and some of its rules that can m…

ESLint with React gives `no-unused-vars` errors

I’ve setup eslint & eslint-plugin-react. When I run ESLint, the linter returns no-unused-vars errors for each React component. I’m assuming it’s not recognizing that I’m using JSX or React syntax. Any ideas? Example: app.js Linter Errors: Here is my .eslintrc.json file: Answer Firs…

Inline eslint comment in JSX

I’m getting an error (eslint): Line 199 exceeds maximum line length of 120. (max-len) Why doesn’t this inline comment work? Answer eslint-disable-line and eslint-disable-next-line are only in inline comments. There is currently an open issue for this in eslint So you would have to write it as the …