-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use correct parser plugins for TS and Vue (#91)
This fixes a few issues with parser plugins. It fixes #78 by removing the `jsx` parser plugin when the file is named `.ts` (typescript requires the use of `.tsx` extension for jsx). It also applies similar logic for .vue files, ensuring that the correct parser plugins are used, with similar logic to the vue compiler itself.
- Loading branch information
Showing
10 changed files
with
231 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import z from 'z'; | ||
import { isEmpty } from "lodash-es"; | ||
import threeLevelRelativePath from "../../../threeLevelRelativePath"; | ||
import sameLevelRelativePath from "./sameLevelRelativePath"; | ||
import thirdParty from "third-party"; | ||
import oneLevelRelativePath from "../oneLevelRelativePath"; | ||
import otherthing from "@core/otherthing"; | ||
import abc from "@core/abc"; | ||
import twoLevelRelativePath from "../../twoLevelRelativePath"; | ||
import component from "@ui/hello"; | ||
import fourLevelRelativePath from "../../../../fourLevelRelativePath"; | ||
import something from "@server/something"; | ||
import xyz from "@ui/xyz"; | ||
|
||
export const Component = () => { | ||
return <div>Component</div> | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import { b } from "b"; | ||
import { a } from "a"; | ||
|
||
<A>a(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<template> | ||
<router-view /> | ||
</template> | ||
|
||
<script lang="ts"> | ||
// This will crash if we try to use the `jsx` parser plugin | ||
<A>a(); | ||
</script> | ||
|
||
<style lang="less"> | ||
#app { | ||
height: 100%; | ||
background-color: inherit; | ||
} | ||
</style> |