We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Your Environment
Describe the bug
Error if using import attribute with:
SyntaxError: Unexpected token, expected "{"
To Reproduce
import something from './something.json' with { type: 'json' };
https://v8.dev/features/import-attributes#deprecation-and-eventual-removal-of-assert
Expected behavior
Formatting works as for assert with importAssertions
importAssertions
import something from './something.json' assert { type: 'json' };
Screenshots, code sample, etc
see above
Configuration File (.prettierrc)
{ "plugins": ["@trivago/prettier-plugin-sort-imports"], "singleQuote": true, "trailingComma": "es5", "importOrder": ["<THIRD_PARTY_MODULES>", "^@company/(.*)$", "^[./]"], "importOrderParserPlugins": ["typescript", "decorators-legacy", "importAttributes"], "importOrderSeparation": true, "importOrderSortSpecifiers": true }
Error log
✖ prettier --write: [error] script.mjs: SyntaxError: Unexpected token, expected "{" (2:58) [error] 1 | import something from './something.json' assert { type: 'json' };
Contribute to @trivago/prettier-plugin-sort-imports
The text was updated successfully, but these errors were encountered:
Probably duplicate of #270
Sorry, something went wrong.
No branches or pull requests
Your Environment
Describe the bug
Error if using import attribute with:
To Reproduce
https://v8.dev/features/import-attributes#deprecation-and-eventual-removal-of-assert
Expected behavior
Formatting works as for assert with
importAssertions
Screenshots, code sample, etc
see above
Configuration File (.prettierrc)
Error log
✖ prettier --write:
[error] script.mjs: SyntaxError: Unexpected token, expected "{" (2:58)
[error] 1 | import something from './something.json' assert { type: 'json' };
Contribute to @trivago/prettier-plugin-sort-imports
The text was updated successfully, but these errors were encountered: