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
Hi, thanks for your work!
I have an error with one of my TypeScript project. I've made a simple project reproducing the issue: bbenoist/prettier-plugin-import-sort-arg-decorator-bug (branch import-sort-cli)
import-sort-cli
The following valid TypeScript code:
function ArgDecorator(_target: Record<string, any>, _propertyKey: string | symbol, _parameterIndex: number): void { console.log(_target, _propertyKey, _parameterIndex) } class MyClass { myFunction(@ArgDecorator myArg: string){ console.log(myArg); } } const foo = new MyClass; foo.myFunction("hello");
Gives this error (full log - branch import-sort-cli):
$ npm run-script import-sort-cli > import-sort-cli ... src/index.ts: SyntaxError: Stage 2 decorators cannot be used to decorate parameters (10:13) ...
The text was updated successfully, but these errors were encountered:
Fixed with adding "parser": "typescript" in my package.json config:
"parser": "typescript"
"importSort": { ".js, .jsx, .ts, .tsx": { "style": "module", "parser": "typescript" } }
Sorry, something went wrong.
Setup import-sort configs for VS Code
69c0cd4
Fix found in renke/import-sort#101. Note that a global typescript module has to be available for this extension.
No branches or pull requests
Hi, thanks for your work!
I have an error with one of my TypeScript project.
I've made a simple project reproducing the issue: bbenoist/prettier-plugin-import-sort-arg-decorator-bug (branch
import-sort-cli
)The following valid TypeScript code:
Gives this error (full log - branch
import-sort-cli
):$ npm run-script import-sort-cli > import-sort-cli ... src/index.ts: SyntaxError: Stage 2 decorators cannot be used to decorate parameters (10:13) ...
The text was updated successfully, but these errors were encountered: