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
format a file lingui.d.ts
lingui.d.ts
declare module "*.po" { const messages: { [key: string]: string; }; export { messages }; }
To Reproduce yarn prettier --write lingui.d.ts
[error] lingui.d.ts: SyntaxError: Export 'messages' is not defined. (5:11) [error] 1 | declare module "*.po" { [error] 2 | const messages: { [error] 3 | [key: string]: string; [error] 4 | }; [error] 5 | export { messages }; [error] 6 | } [error] 7 | error Command failed with exit code 2.
Using IDEA for formatting, the same error is obtained.
SyntaxError: Export 'messages' is not defined. (5:14) �[0m �[90m 1 |�[39m declare module �[32m"*.po"�[39m {�[0m �[0m �[90m 2 |�[39m �[36mconst�[39m messages�[33m:�[39m {�[0m �[0m �[90m 3 |�[39m [key�[33m:�[39m string]�[33m:�[39m string�[33m;�[39m�[0m �[0m �[90m 4 |�[39m }�[33m;�[39m�[0m �[0m �[90m 5 |�[39m �[36mexport�[39m { messages }�[33m;�[39m�[0m �[0m �[90m 6 |�[39m }�[0m �[0m �[90m 7 |�[39m�[0m at instantiate (xxx/node_modules/@babel/parser/lib/index.js:63:32) at constructor (xxx/node_modules/@babel/parser/lib/index.js:358:12) at TypeScriptParserMixin.raise (xxx/node_modules/@babel/parser/lib/index.js:3255:19) at TypeScriptParserMixin.parseProgram (xxx/node_modules/@babel/parser/lib/index.js:12463:14) at TypeScriptParserMixin.parseTopLevel (xxx/node_modules/@babel/parser/lib/index.js:12450:25) at TypeScriptParserMixin.parse (xxx/node_modules/@babel/parser/lib/index.js:14345:10) at TypeScriptParserMixin.parse (xxx/node_modules/@babel/parser/lib/index.js:10024:18) at parse (xxx/node_modules/@babel/parser/lib/index.js:14386:38) at preprocessor (xxx/node_modules/@trivago/prettier-plugin-sort-imports/lib/src/preprocessors/preprocessor.js:15:34) at Object.defaultPreprocessor [as preprocess] (xxx/node_modules/@trivago/prettier-plugin-sort-imports/lib/src/preprocessors/default-processor.js:9:44)
Expected behavior
Able to format correctly.
Configuration File (cat .prettierrc, prettier.config.js, .prettier.js)
{ "importOrder": [ "^react(\/[^\\/]+)?$", "^react-dom(\/[^\\/]+)?$", "^react-native(\/[^\\/]+)?$", "^next(\/[^\\/]+)?$", "<THIRD_PARTY_MODULES>", "^[./]" ], "importOrderSeparation": true, "importOrderSortSpecifiers": true, "importOrderGroupNamespaceSpecifiers": true, "xmlWhitespaceSensitivity": "ignore" }
The text was updated successfully, but these errors were encountered:
Same as #213
Sorry, something went wrong.
No branches or pull requests
Your Environment
Describe the bug
format a file
lingui.d.ts
To Reproduce
yarn prettier --write lingui.d.ts
Using IDEA for formatting, the same error is obtained.
Expected behavior
Able to format correctly.
Configuration File (cat .prettierrc, prettier.config.js, .prettier.js)
{
"importOrder": [
"^react(\/[^\\/]+)?$",
"^react-dom(\/[^\\/]+)?$",
"^react-native(\/[^\\/]+)?$",
"^next(\/[^\\/]+)?$",
"<THIRD_PARTY_MODULES>",
"^[./]"
],
"importOrderSeparation": true,
"importOrderSortSpecifiers": true,
"importOrderGroupNamespaceSpecifiers": true,
"xmlWhitespaceSensitivity": "ignore"
}
The text was updated successfully, but these errors were encountered: