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

Parsing error on typescript files #422

Open
fabio-colella-md opened this issue Jun 2, 2022 · 0 comments
Open

Parsing error on typescript files #422

fabio-colella-md opened this issue Jun 2, 2022 · 0 comments

Comments

@fabio-colella-md
Copy link

fabio-colella-md commented Jun 2, 2022

What version of this package are you using?

  • VS Code Standard Extension version: 2.1.0
  • "ts-standard": "^11.0.0"
  • "typescript": "4.4.4"

What operating system, Node.js, and npm version?

  • Mac OS X 12.4
  • node v12.22.8
  • yarn 1.22.11 (not using npm)

What happened?
Typescript files are not parsed correctly by the extension and I get the following error: Parsing error: Unexpected token :ts-standard.

const thisIsJustATest = (arg: string): boolean => {
  if (arg === "This is a test") {
    return true
  }

  return false
}

export default thisIsJustATest

Screenshot 2022-06-02 at 17 45 16

I have set the extension to "standard.engine": "ts-standard",.

The issue seems to lie in the extension as from command line I cannot see any problem:

$ ./node_modules/.bin/ts-standard --fix src/utils/is-test.ts
✨  Done in 5.40s.

What did you expect to happen?
No error should happen because of typescript syntax.

Are you willing to submit a pull request to fix this bug?
If I understand where the problem lies, I'd be happy to contribute to a fix. I wonder if the setting of the engine is actually being respected, as I've seen similar errors happening with ESLint when not properly configured for supporting typescript.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

No branches or pull requests

1 participant