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

This experimental syntax requires enabling the parser plugin 'importAssertions'. #113

Open
deeyonn opened this issue Aug 11, 2023 · 2 comments

Comments

@deeyonn
Copy link

deeyonn commented Aug 11, 2023

Hi, I searched the repo for matching keywords regarding my request and can't find any matches so I'm posting this issue here.

I'm trying to run this statement in my nodejs project:

import config from "./config.js" assert { type: "json" };

and I'm getting an error with sort-imports, the error is:

This experimental syntax requires enabling the parser plugin 'importAssertions'

May i know how to resolve this?

I've tried adding this to my package.json but it does not resolve the issue.

"importSort": {
  ".js, .jsx, .es6, .es": {
    "parser": "babylon",
    "style": "eslint",
    "options": {}
  },
  ".ts, .tsx": {
    "parser": "typescript",
    "style": "eslint",
    "options": {}
  }
}
@annsch
Copy link

annsch commented May 14, 2024

I do have the same problem, has anyone a solution for this?

@Mydayyy
Copy link

Mydayyy commented Jun 5, 2024

Greetings,

we are running into the same issue. Did you manage to find a solution for this?

Best Regards
Mydayyy

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

3 participants