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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plugin removed spaces after the comma while running autofix #108

Closed
ansidev opened this issue Jul 13, 2022 · 2 comments
Closed

Plugin removed spaces after the comma while running autofix #108

ansidev opened this issue Jul 13, 2022 · 2 comments

Comments

@ansidev
Copy link

ansidev commented Jul 13, 2022

Reproduce steps

  1. Clone the repository: https://github.com/ansidev/nextjs-starter
  2. Switch to the branch issue/eslint-plugin-simple-import-sort-issue.
  3. Run yarn install.
  4. Open the file pages/api/hello.ts, the second line is
import type { NextApiResponse, NextApiRequest } from 'next'
  1. Run yarn lint --fix.

Actual behavior

The error was fixed but the above line was changed to

import type { NextApiRequest,NextApiResponse } from 'next'

Expected behavior

import type { NextApiRequest, NextApiResponse } from 'next'

(There is a space after the comma).

@ansidev ansidev changed the title Plugin removed spaces after the colon while running autofix Plugin removed spaces after the comma while running autofix Jul 13, 2022
@lydell
Copy link
Owner

lydell commented Jul 13, 2022

@ansidev
Copy link
Author

ansidev commented Jul 14, 2022

Hi! Have you read this? lydell/eslint-plugin-simple-import-sort#the-sorting-autofix-causes-some-odd-whitespace

@lydell Thank you, I got it, and now it worked perfectly.

@ansidev ansidev closed this as completed Jul 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants