amatiasq / vsc-sort-imports

Sort ES6 imports automatically.
ISC License
57 stars 24 forks source link

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

Open deeyonn opened 11 months ago

deeyonn commented 11 months ago

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 commented 2 months ago

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

Mydayyy commented 1 month ago

Greetings,

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

Best Regards Mydayyy