Skip to content
This repository was archived by the owner on Aug 22, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -224,8 +224,8 @@ export class Plugin implements IPlugin {
}
this._debug(`loading IDs from ${this.commandsDir}`)
const patterns = [
'**/*.+(js|ts)',
'!**/*.+(d.ts|test.ts|test.js|spec.ts|spec.js)',
'**/*.+(js|ts|tsx)',
'!**/*.+(d.ts|test.ts|test.js|spec.ts|spec.js)?(x)',
]
const ids = globby.sync(patterns, {cwd: this.commandsDir})
.map(file => {
Expand Down
1 change: 1 addition & 0 deletions src/ts-node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ function registerTSNode(root: string) {
sourceMap: true,
rootDirs,
typeRoots,
jsx: 'react',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

jsx: tsconfig.compilerOptions.jsx || 'react' Is anyone going to want to use preserve mode?

https://www.typescriptlang.org/docs/handbook/jsx.html#basic-usage

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

preserve mode would typically be used if

  • Your JS environment has native support for JSX syntax
  • You're going to pass it through another transpile step

Since oclif is managing the transpilation here, I don't think it's something that we have to worry about. Anyone who would currently be using JSX with Oclif would have had to put their own transpilation process in front of it anyways, and so would be unaffected.

},
})
} finally {
Expand Down