Top "Eslint" questions

The pluggable linting utility for JavaScript and related frameworks.

Eslint does not allow static class properties

I'm current developing an API on Node 12.14.1 and using Eslint to help me write the code. Unfortunately it does not …

javascript node.js eslint class-fields
@typescript-eslint/no-unused-vars false positive in type declarations

There is one problem with @typescript-eslint/no-unused-vars. So, we have type type SomeType = (name: string) => void; And we have @…

javascript reactjs typescript eslint typescript-eslint
ESLint configuration for JSX

I want configure ESLint for check my JSX files but my configuration doesn't work. What is the correct way? .eslintrc.…

reactjs jsx eslint
How to handle eslint no-param-reassign rule in Array.prototype.reduce() functions

I've recently added the eslint rule no-param-reassign. However, when I use reduce to build out an object (empty object as …

javascript ecmascript-6 eslint
How to support ES7 in ESLint

I have a project setup with WebPack to use ESLint and I'm wanting to use ES7 for the inline bind …

webpack eslint ecmascript-7
ESLint Disallow Use of Alert (no-alert)

how can i turn the following alert into an acceptable alert for ESLint? svg.onerror = function() { alert("File cannot be …

javascript html alert onerror eslint
Error while loading rule '@typescript-eslint/dot-notation'

Today I run eslint,two script "lint-staged": "lint-staged", "eslint": "eslint --ext .tsx,.ts --fix ./src -c .eslintrc.js", When I …

javascript eslint husky lint-staged
ionic - `slot` attributes are deprecated - eslint-plugin-vue

I am getting following error in VS Code: [vue/no-deprecated-slot-attribute] `slot` attributes are deprecated. eslint-plugin-vue I have these two plugin …

javascript vue.js ionic-framework eslint vetur
@typescript-eslint/eslint-plugin error: 'Route' is defined but never used (no-unused-vars)

After eslint adds typescript check, there will be an error when the attribute variable in the class definition is Array. …

javascript typescript eslint tslint
Prettier react/jsx-max-props-per-line format with VSCode

I use Prettier in JavaScript project with React. All my component props is formated in 1 line : <Icon icon="arrow-left" …

javascript reactjs eslint prettier