Top "Eslint" questions

The pluggable linting utility for JavaScript and related frameworks.

Turning off eslint rule for a specific line

In order to turn off linting rule for a particular line in JSHint we use the following rule: /* jshint ignore:…

javascript jshint eslint
Turning off eslint rule for a specific file

Is it possible to turn off the eslint rule for the whole file? Something such as: // eslint-disable-file no-use-before-define (Analogous to …

javascript configuration lint eslint
How to fix missing dependency warning when using useEffect React Hook?

With React 16.8.6 (it was good on previous version 16.8.3), I get this error when I attempt to prevent an infinite loop …

reactjs eslint create-react-app react-hooks
ESLint Parsing error: Unexpected token

With this code: import React from 'react'; import { Link } from 'react-router'; import { View, NavBar } from 'amazeui-touch'; import * as Pages from …

javascript reactjs eslint
Eslint: How to disable "unexpected console statement" in Node.js?

I'm using eslint with Sublime Text 3 and I am writing gulpfile.js. /*eslint-env node*/ var gulp = require('gulp'); gulp.task(…

javascript node.js sublimetext3 sublime-text-plugin eslint
Expected linebreaks to be 'LF' but found 'CRLF' linebreak-style

When using eslint in the gulp project i have encountered a problem with error like this Expected linebreaks to be …

javascript gulp eslint line-endings
React eslint error missing in props validation

I have the next code, eslint throw: react/prop-types onClickOut; is missing in props validation react/prop-types children; is missing …

javascript reactjs eslint flowtype
Disable eslint rules for folder

Is there a way to disable specific rules for a folder? For example, I don't want to have required JSDoc …

eslint
ESLint not working in VS Code?

ESLint is not working for me in VS Code. I have the plugin installed in VS Code, and ESLint itself …

javascript visual-studio-code eslint
ESLint - "window" is not defined. How to allow global variables in package.json

I am assigning a property to the global window object, but when I run eslint, I get this: "window" is …

eslint