Skip to main content
The 2024 Developer Survey results are live! See the results

All Questions

0 votes
1 answer
155 views

Eslint configuration for padding-line-between-statements

We are trying to achieve a different linting behavior when a const declaration is inside a function and when it is not. In top level scope, we want one line between them. Inside blocks (if statements, ...
Jonatan Kruszewski's user avatar
2 votes
1 answer
117 views

eslint Throwing the error: Do not define components during render

I am trying the render the icons in drawer navigation but eslint Throwing the error: Do not define components during render. Do not define components during render. React will see a new component type ...
msrajwat298's user avatar
0 votes
1 answer
963 views

Flat config file with configs from legacy eslintrc compat error

I am trying to get prettier, typescript, eslint with airbnb typescript syntax working with linting and auto formatting. The minimal node package.json file. { "name": "typescript-...
Rashiq's user avatar
  • 349
0 votes
0 answers
111 views

Usage of @eslint/config tool with airbnb and prettier plugins

Following eslint QuickStart documentation, I run the npm init @eslint/config and got a boilerplate .eslintrc as expected: module.exports = { "env": { "browser": true, ...
cvass's user avatar
  • 33
0 votes
0 answers
129 views

Prettier: Preserve parenthesis around multiline expressions?

Prettier is removing the parenthesis wrapping multiline expressions in our code. Is there any way to convince prettier to ignore these? Input (with parenthesis I want to preserve): const result = (...
jeremy303's user avatar
  • 9,161
0 votes
0 answers
65 views

test-setup.ts is conflicted with eslint config

I have a problem with eslint and jest setup in my nx monorepo. My test-setup.ts looks like in docs: // @ts-expect-error https://thymikee.github.io/jest-preset-angular/docs/getting-started/test-...
mhld's user avatar
  • 288
1 vote
1 answer
106 views

I want to fully override eslint rules on folder level

on my project I have some eslint rules defined inside eslintrc.json . this is for frontend files . but what I am trying to do is that , I need to defined another eslintrc.json for backendfiles ( ...
Beka Lobzhanidze's user avatar
0 votes
1 answer
771 views

Error: Plugin "@typescript-eslint" was conflicted between ".eslintrc.js » plugin:@typescript-eslint/recommended-type-check

Error: Plugin "@typescript-eslint" was conflicted between ".eslintrc.js » plugin:@typescript-eslint/recommended-type-checked » ./configs/base" and ".eslintrc.js » @vue/eslint-...
laterday's user avatar
  • 399
0 votes
1 answer
88 views

error:Must use destructuring props - eslint; i'm using react+typescript

I'm used to work with react in JS, I got the error,Must use destructuring props at line 14, while I'm defining a button to use it in a form This is my code: import React from 'react'; interface ...
mohamed daadaa's user avatar
0 votes
1 answer
169 views

Getting error 404 while installing ESLint in Node JS

I'm trying to install ESLint and configuring it for a NodeJS project. When running npm init @eslint/config from command line, the following error appears: PS C:\notes-app-backend> npm init @eslint/...
Febryan Akhdani's user avatar
1 vote
1 answer
1k views

ESLint not applying rules specified in .prettierrc.cjs

I have setup eslint to enforce airbnb rules alongside prettier for stylist rules. .eslintrc.cjs module.exports = { root: true, parser: '@typescript-eslint/parser', extends: [ '...
Gurpreet Singh's user avatar
0 votes
1 answer
685 views

eslint jsx-a11y label must be associated with a control error

The <label> in this code is being rejected by the eslint jsx-a11y plugin: A form label must be associated with a control. eslint(jsx-a11y/label-has-associated-control) <div className="...
icc97's user avatar
  • 12.3k
-1 votes
1 answer
24 views

How to forbid edition of arguments of a function, expect Array.reduce accumulator

I did not find a documentation in the whole eslint website, and I do not know if there is a plugin to forbid arguments editions. Here is an example of code which should be: Incorrect: const ...
karkael's user avatar
  • 451
2 votes
0 answers
590 views

Plugin "react" was conflicted between ".eslintrc.json » eslint-config-airbnb and "BaseConfig eslint-config-react-app

after upgrading react-scripts to v5.0.1 , I did upgrade to eslint plugins too . when I try to run the app I'm getting this Error message that show conflict between eslinrc file at eslint-config-airbnb ...
Duha Shawareb's user avatar
1 vote
0 answers
608 views

ESLint: 8.35.0 Error: "prettier/react" has been merged into "prettier" in eslint-config-prettier 8.0.0

Oops! Something went wrong! :( ESLint: 8.35.0 Error: Cannot read config file: /home/jenkins/workspace/ Error: "prettier/react" has been merged into "prettier" in eslint-config-...
Duha Shawareb's user avatar

15 30 50 per page
1
2 3 4 5
17