Skip to main content

Questions tagged [eslint]

The pluggable linting utility for JavaScript and related frameworks.

0 votes
0 answers
18 views

ESLint 'no-unused-vars' error with Vite and React

I am working on a React project using Vite as my development server. Recently, I encountered an internal server error related to ESLint when trying to run my project. The error messages are pointing ...
Mostafa Mohamed Taha's user avatar
0 votes
0 answers
35 views

Include Files is not working in ESLint 9+

I'm using ESLint 9.7.0 and I want to implement ESLint on a specific folder in my React app. But it's not working on the folder I'm giving the path of that folder in my eslint.config.mjs. Here is my ...
HAIDER KHALIL's user avatar
1 vote
0 answers
27 views

ESLint: @stylistic/type-annotation-spacing and @stylistic/key-spacing conflict

This is my current eslint config. I am currently using the latest version of ESLint. I would like to be able to use these two rules in combination but they conflict. I also tried to write a custom ...
Mqx's user avatar
  • 337
0 votes
1 answer
41 views

ESLint is not reading the rules specified in the eslintrc.json in my Angular v17 Project

ESLint is not reading the rules written in the eslintrc.json file. It is displaying all the problems as errors even though I have set values of some rules as warn. Moreover, it is displaying errors ...
T. B. - Tantiya Bichchu's user avatar
2 votes
2 answers
81 views

Prettier is removing typescript generic annotation from react class component

I'm trying to make an ErrorBoundary using a class component like this class ErrorBoundary extends Component<ErrorBoundaryProps,ErrorBoundaryState> But every time I format it with prettier, the ...
E C I N's user avatar
  • 101
1 vote
0 answers
44 views

error 'console' is not defined no-undef with eslint 9 jest

This question isn't a duplicate. I have read through this question: ERROR: 'console is not defined. [no-undef] - Brackets and most of the answers are for ESLint 8 and below. Some have talked about the ...
Stanley Ulili's user avatar
0 votes
0 answers
9 views

NX automatically adds undesidered eslint plugin causing performance issues

It happened several times already that somehow NX added this: "plugins": [ { "plugin": "@nx/eslint/plugin", "options": { "...
Francesco Borzi's user avatar
0 votes
0 answers
13 views

[ERR_MODULE_NOT_FOUND]: Cannot find package 'eslint-plugin-react' imported

I am trying to create a pre-commit hook Git for ESlint and I get an error when using console with npx lint-staged. I've installed eslint-plugin-react, but I still can't find it. My eslint.config.mjs ...
crabgame's user avatar
0 votes
0 answers
20 views

How Can I Display All Lint Errors and Warnings in VS Code Without Opening Each File?

When I run nx run-many -t lint --all, I get a lot of warnings and errors in the terminal. Is there a way to display all these errors and warnings in the Problems section of VS Code? Currently, they ...
Jon's user avatar
  • 183
0 votes
2 answers
33 views

Media elements such as <audio> and <video> must have a <track> for captions eslint error

When I try to add <video controls> <source src="content.mp4" type="video/mp4" /> <source src="content.webm" type="video/webm" /> Your ...
Sreekuttan's user avatar
0 votes
0 answers
19 views

When using ESLint in a Vue component, do I need to set the lint rules for the <script> and <template> separately?

I have a Nuxt 3 app that uses the new Nuxt ESLint module for linting and formatting (using ESLint Stylistic). The relevant bit of my ESLint config looks like this: import withNuxt from './.nuxt/eslint....
Nicolas D's user avatar
  • 193
0 votes
0 answers
31 views

Migrating ESLint9 Older Config to new Flat Config using @angular-eslint/template-parser as template parser not working

Using the tool @eslint/migrate-config to migrate to the new ESlint (version 9) flat config is not working. Cannot integrate @angular-eslint/template-parser properly. .eslintrc.json { "root&...
neukoellnjenny's user avatar
-3 votes
1 answer
46 views

Adding ignores to the typescript-eslint recommended configuration?

I'm trying to add an ignores object to the typescript-eslint configuration I figured this would do the trick: import eslint from "@eslint/js"; import tseslint from "typescript-eslint&...
Ole's user avatar
  • 45.3k
-3 votes
2 answers
47 views

Why 'eslint' + 'typescript-eslint' used for TypeScript linting when 'tsc' appears to work better? [duplicate]

Goal: To create a strict TypeScript linter script eslint checks for poor JavaScript code patterns. The docs suggests initialising eslint with npm init @eslint/config@latest This also installs ...
menglinmaker's user avatar
0 votes
0 answers
12 views

Disable eslint `require-jsdoc` for nested functions

I'm trying to disable jsdoc warnings for nested functions. For example, in this file it spits a warning on the commented line. // Notifications.ts import * as Device from "expo-device"; ...
reactive's user avatar

15 30 50 per page
1
2 3 4 5
463