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

Questions tagged [eslint-config-airbnb]

Use this tag for the NPM package that provides Airbnb's .eslintrc as an extensible shared config

eslint-config-airbnb
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
2 votes
1 answer
363 views

Install Eslint config airbnb dependencies with 'pnpm' in Astro React project

We are using pnpm as our package manager inside our Astro React project. I need to setup Eslint config Airbnb. In the readme it says use npx install-peerdeps --dev eslint-config-airbnb to install all ...
meez's user avatar
  • 4,530
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
76 views

How to declare multiple prop-types using eslint airbnb in a component arguments?

Function declaration: export default function Labyrinth({ theme = 1 }, { inverted = 0 }) { While declaring proptypes Labyrinth.propTypes = { inverted: PropTypes.bool.isRequired, theme: PropTypes....
Diego Alonzo'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

15 30 50 per page
1
2 3 4 5
20