jsx-eslint / eslint-plugin-react

React-specific linting rules for ESLint
MIT License
8.86k stars 2.75k forks source link

[Bug]: Endless listing cycle #3744

Closed root9464 closed 2 months ago

root9464 commented 2 months ago

Is there an existing issue for this?

Description Overview

I am using eslint v8.56.0. And I have a problem when I press ctrl+s the string import {use Callback, use Effect, use Ref } form 'react';formatted without spaces => import {use Callback, use Effect, use Ref} form 'react'; and then immediately returns to the initial state of import { use Callback, use Effect, use Ref } form 'react'; and eslint swears again. I tried to specify

"object-curly-spacing": "off",
"@typescript-eslint/object-curly-spacing": "error"

Video

https://disk.yandex.ru/i/V5W2pv8wQbq4Ng

but it doesn't help.

Expected Behavior

help me please

eslint-plugin-react version

eslint-plugin-react@7.34.1

eslint version

8.56.0

node version

v20.11.1

ljharb commented 2 months ago

do you mean useEffect etc, and from not form?

This wouldn't be controlled by the react plugin. Perhaps you're using vscode autoformatting (turn that off) or prettier, and it's conflicting?

root9464 commented 2 months ago

do you mean useEffect etc, and from not form?

This wouldn't be controlled by the react plugin. Perhaps you're using vscode autoformatting (turn that off) or prettier, and it's conflicting?

That's how eslint complains about the fact that there are gaps import { useCallback, useEffect, useRef } from 'react'; I'm pressing ctrl+s import { useCallback, useEffect, useRef } from 'react'; ==> import {useCallback, useEffect, useRef} from 'react'; after that, everything goes back again and the error comes out import { useCallback, useEffect, useRef } from 'react'; ==> import {useCallback, useEffect, useRef} from 'react'; ==> import { useCallback, useEffect, useRef } from 'react';

root9464 commented 2 months ago

do you mean useEffect etc, and from not form?

This wouldn't be controlled by the react plugin. Perhaps you're using vscode autoformatting (turn that off) or prettier, and it's conflicting?

I have updated the issue and added a video there so that you can understand what my problem is.

ljharb commented 2 months ago

@root9464 as i said, this has nothing to do with this repo, and please do not file duplicate issues.