All Questions
Tagged with eslint eslint-config-airbnb
250
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, ...
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 ...
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-...
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,
...
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 = (...
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-...
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 ( ...
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-...
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 ...
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/...
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: [
'...
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="...
-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 ...
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 ...
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-...