Most voted "eslint" questions
Use this tag when the question is related to the static source code analyzer Eslint (usually used to perform Javascript or Typescript code lint).
Learn more…19 questions
Sort by count of
-
11
votes3
answers3987
viewsWhat does it mean to run lint in the code?
I saw that expression "lint code" in some places, in the IDE of Visual Studio and also when executing the NG CLI, the client of Angular. What does that mean? What exactly "lint code" ago?…
-
2
votes1
answer71
viewsEslint suggestion in React import
On the line import React, { Component } from 'react'; Eslint marks import and brings the following message: [eslint] Definition for rule 'react/require-extension' was not found…
-
2
votes1
answer339
viewsDoes the Eslint option of "enforce code style" add any behavior when we are already using Prettier?
When we perform eslint --init, we first come across the following question: I performed two tests, one selecting "To check syntax and find problems" and other using "To check syntax, find problems,…
-
1
votes3
answers6815
viewsEslint captured an error, Parsing error: Unexpected token =
Hello, I installed Eslint to capture the errors and check the code, but the same is picking up this error on line 28 "updateDay = () => {" where the problem is in this syntax with = before (),…
-
1
votes1
answer15
viewsGulp watch shows a lot of Eslint errors. Which dependencies are missing?
I made git clone of an app Ionic 1 done with the Generator-M-Ionic I have taken the following steps to install the dependencies: npm install bower install npm install --global gulp-cli And the…
-
1
votes1
answer64
viewsError message when using ESLINT settings on two different Ides
Hello people for some time I am facing the following problem: I have a certain ESLINT configuration, however, I work with a team and only I like to use intellij, and with the ESLINT settings they…
-
1
votes1
answer85
viewsShould I avoid using "optional chaining" within the dependencies of a Hook?
Today I noticed that I use the optional chaining (?.) within the dependencies of a hook: useEffect(() => { // ... }, [route.params?.addedProduct]); It seems to work as expected, at least for now…
-
1
votes1
answer146
viewsImport inline SVG from Absolute path in Next.JS
I’m having trouble setting up Next.Js to make imports on absolute camino. I set up the tsconfig.json using the baseUrl as "src" and even works except in inline SVG files. I am using the…
-
1
votes1
answer266
viewsFloating promise check in Typescript Eslint (no floating Promises)
I have the following method: async sync({model, event, data}: {model: string, event: string, data: Category}) { if (model === 'category') { switch (event) { case 'created': await…
-
1
votes1
answer104
viewsHow to Force Prettier to Always Put a Multilevel Ternary
I am creating an application using Vscode as IDE and, to do the lint of the code, I’m using the Eslint and the GTS (Google Typescript Style) where in a code location I have something similar to…
-
0
votes1
answer28
viewsForce class in React to use Arrow Function with Eslint
How do I make an error pro Eslint when someone in the project uses functions within a class that need bind instead of an Arrow Function
-
0
votes2
answers3405
viewsWhat does this error mean? (Assign Arrow Function to a variable before exporting as module default import/no-Anonymous-default-export)
Assign Arrow Function to a variable before exporting as module default import/no-Anonymous-default-export export default () => <header className="header"> <img src="" alt="" />…
-
0
votes1
answer796
viewsEslint error: "Must use destructuring state assignment"
Could someone please let me know what I’m doing wrong? The mistake "Must use destructuring state assignment" is in the {this.state.time}. import React from 'react'; class App extends React.Component…
-
0
votes1
answer92
viewsUsing Eslint in VS Code
Hello! I’m a new Javascript student and am discovering the world of code standardization. In short, well my situation, I am using the Eslinter + Prettier combo in VS Code and my question is: Every…
-
-1
votes1
answer381
viewsConfiguring Eslint with adonisjs
I’m trying to configure Eslint in a project that uses Adonisjs but he asks me what kind of modules the project uses, Javascript Modules, Commonjs or none of these. Could someone tell me what kind of…
-
-1
votes1
answer190
viewsHow to instruct Eslint to solve absolute paths with Babel-plugin-root-import in monorepos
I own a repository monorepo done with Yarn and in this I have a project frontend created with the command create-react-app. I installed the libs React-app-rewired and customize-Cra to inject the…
-
-1
votes0
answers23
viewsNewline required at end of file but not found
I started a React project using Eslint. However, it is giving this error: Failed to compile. src/index.jsx Line 5:59: Newline required at end of file but not found eol-last Search for the keywords…
-
-1
votes2
answers65
viewsProblem with Next, Typescript and Eslint
I’m starting a project with Next, Typescript, Eslint and Prettier. After starting the project, adding Typescript, Eslint and Prettier started getting an error that I can’t find a solution to, I…
-
-2
votes1
answer38
viewsProblem with typescript paths
Hello, I am using the Airbnb Eslint configuration and it is giving an error in typescript paths.…