Top "Eslint" questions

The pluggable linting utility for JavaScript and related frameworks.

How do I access the Object.prototype method in the following logic?

I am using the following logic to get the i18n string of the given key. export function i18n(…

javascript ecmascript-6 eslint
Eslint says all enums in Typescript app are "already declared in the upper scope"

Starting a new application, I installed eslint and configured it with the following configs, but every time I create an …

node.js typescript eslint
Disable typescript-eslint plugin rule (no-explicit-any) with inline comment

I have an eslint error that comes from the @typescript-eslint plugin. Unexpected any. Specify a different type.eslint(@typescript-eslint/no-explicit-any) …

eslint typescript-eslint
Unexpected block statement surrounding arrow body

I'm using "eslint-config-airbnb": "^6.1.0", to keep my JavaScript clean. My linter is unhappy with what seems to be legitimate code: It …

reactjs ecmascript-6 eslint
How to fix Eslint error "prefer-destructuring"?

I wanted to shorten an object literal in ES6 like this: const loc = this.props.local; The reason is loc.…

javascript ecmascript-6 eslint
Component definition is missing display name react/display-name

How do I add a display name to this? export default () => <Switch> <Route path="/login" exact …

reactjs eslint
Must use destructuring props assignment (react/destructuring-assignment)

I've applied eslint airbnb standard to my code, so now this code: handleSubmit = (event) => { event.preventDefault(); this.props.onSearch(…

reactjs eslint eslint-config-airbnb
ESLint ignore specific rule for a specific directory

Is it possible with ESLint to ignore one specific rule for an entire directory? In my case, I would like …

eslint
'Proptypes' is not defined

I'm setting up a new React with the help of: https://github.com/facebookincubator/create-react-app However, I'm running into a …

reactjs eslint
Solving linter error no-undef for document

I am using airbnb extension for linting my React Project. Now, in my index.js I have: import React from …

javascript eslint airbnb