Top "Eslint" questions

The pluggable linting utility for JavaScript and related frameworks.

eslint: error Parsing error: The keyword 'const' is reserved

I am getting this error from ESLint: error Parsing error: The keyword 'const' is reserved from this code: const express = …

javascript node.js ecmascript-6 eslint
How to use ESLint with Jest

I'm attempting to use the ESLint linter with the Jest testing framework. Jest tests run with some globals like jest, …

javascript jestjs eslint
No restricted globals

I am using React and Redux to develop a webapp and when I started up my project I got this: …

javascript reactjs react-router eslint
How to avoid no-param-reassign when setting a property on a DOM object

I have a method which's main purpose is to set a property on a DOM object function (el) { el.expando = {}; } …

javascript dom eslint
How to disable ESLint react/prop-types rule in a file?

I'm using React and ESLint with eslint-plugin-react. I want to disable the prop-types rule in one file. var React = require(…

reactjs eslint
"No ESLint configuration found" error

Recently, we've upgraded to ESLint 3.0.0 and started to receive the following message running the grunt eslint task: > $ grunt eslint …

javascript gruntjs eslint grunt-eslint
Using eslint with typescript - Unable to resolve path to module

I have this import in my file app.spec.ts: import app from './app'; Which causes this Typescript error 2:17 …

typescript eslint
Expected 'this' to be used by class method

In my class, eslint is complaining "Expected 'this' to be used by class method 'getUrlParams' Here is my class: class …

javascript reactjs ecmascript-6 eslint
JSX not allowed in files with extension ' .js' with eslint-config-airbnb

I've installed eslint-config-airbnb that is supposed to pre configure ESLINT for React: Our default export contains all of our ESLint …

javascript reactjs eslint eslint-config-airbnb
How to run eslint --fix from npm script

I am trying to add lint-fix in my package.json. My basic lint is "lint": "eslint --ext .js,.vue src …

javascript npm eslint npm-scripts