Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃悶: [import/newline-after-import] False positively reports wrong empty line numbers between imports #2913

Open
xsjcTony opened this issue Oct 31, 2023 · 0 comments

Comments

@xsjcTony
Copy link

Something like that:

import './index.scss';

// other imports
import { ErrorBoundary } from 'react-error-boundary';

And my setting is

'import/newline-after-import': [
  'error',
  {
    count: 2,
    exactCount: true,
    considerComments: true
  }
]

It reports like this:
image

But this is not the correct behavior, as in the documentation it clearly says:

Enforces having one or more empty lines after the last top-level import statement or require call.

after the last top-level import statement

Note: the exactCount doesn't matter, as I've tried to remove it but it's still causing issue.

Package version: ALL LATEST

@xsjcTony xsjcTony changed the title [import/newline-after-import] False positively reports wrong empty line numbers between imports 馃悶: [import/newline-after-import] False positively reports wrong empty line numbers between imports Nov 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant