ipatalas / vscode-postfix-ts

Postfix notation for TypeScript/Javascript - extension for VS Code
MIT License
159 stars 43 forks source link

TS files should not be parsed as JSX #100

Closed zardoy closed 1 year ago

zardoy commented 1 year ago

fixes #99

zardoy commented 1 year ago

TODO add missing test

ipatalas commented 1 year ago

Once you fix linter errors I'll approve and merge this.

For some reason VSCode is messing with formatting on my end too. I'm just adding extra settings for that to .vscode/settings.json because it doesn't seem to respect .editorconfig.

zardoy commented 1 year ago

I'm just adding extra settings for that to .vscode/settings.json

What setting? I have editorconfig extension installed, which just configures tab size, which seems to be fine. This is a problem with typescript formatter fighting with eslint

ipatalas commented 1 year ago

I'm just adding extra settings for that to .vscode/settings.json

What setting? I have editorconfig extension installed, which just configures tab size, which seems to be fine. This is a problem with typescript formatter fighting with eslint

Omg, for some reason I was 100% sure VSCode is one of those which don't need a plugin for editor config to work 🤦🏻‍♂️

You're right, after installing it works just fine so I reverted the change and added editorconfig for recommended extensions: https://github.com/ipatalas/vscode-postfix-ts/commit/17faaa8db339866749c6bdf4369a9c504f012e57

ipatalas commented 1 year ago

Two tests are broken and it doesn't seem random because they are both for inside JSX scenario. Can you check that?

codecov[bot] commented 1 year ago

Codecov Report

Base: 93.31% // Head: 92.86% // Decreases project coverage by -0.46% :warning:

Coverage data is based on head (4b85a37) compared to base (3a9c27a). Patch coverage: 65.21% of modified lines in pull request are covered.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## develop #100 +/- ## =========================================== - Coverage 93.31% 92.86% -0.46% =========================================== Files 24 24 Lines 1392 1416 +24 Branches 245 253 +8 =========================================== + Hits 1299 1315 +16 - Misses 90 98 +8 Partials 3 3 ``` | [Impacted Files](https://codecov.io/gh/ipatalas/vscode-postfix-ts/pull/100?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Ireneusz+Patalas) | Coverage Δ | | |---|---|---| | [src/postfixCompletionProvider.ts](https://codecov.io/gh/ipatalas/vscode-postfix-ts/pull/100?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Ireneusz+Patalas#diff-c3JjL3Bvc3RmaXhDb21wbGV0aW9uUHJvdmlkZXIudHM=) | `89.50% <65.21%> (-3.24%)` | :arrow_down: | | [src/utils/templates.ts](https://codecov.io/gh/ipatalas/vscode-postfix-ts/pull/100?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Ireneusz+Patalas#diff-c3JjL3V0aWxzL3RlbXBsYXRlcy50cw==) | `95.52% <0.00%> (+0.20%)` | :arrow_up: | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Ireneusz+Patalas). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Ireneusz+Patalas)

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

zardoy commented 1 year ago

@ipatalas IMO a better way to fix switch-case formatting issue is to { SwitchCase: 1 } in options of indent eslint rule. Because for now if someone ctrl+s or format that file eslint error will popup

ipatalas commented 1 year ago

@ipatalas IMO a better way to fix switch-case formatting issue is to { SwitchCase: 1 } in options of indent eslint rule. Because for now if someone ctrl+s or format that file eslint error will popup

Totally agree, wasn't aware of that.

zardoy commented 1 year ago

@ipatalas fixed gh ci