-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
Preact typescript pragma fix #15564
Merged
Merged
Preact typescript pragma fix #15564
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
9e019c5
Fix tsconfig, make preact automatically import jsx functions
KrofDrakula 95138b6
Fix eslint config to account for new configuration
KrofDrakula f7f394d
Include all story types in glob
KrofDrakula 3105a72
Add test case and remove unnecessary eslint overrides
KrofDrakula b694736
No need to override react prop types rule
KrofDrakula 01522da
Merge branch 'next' into preact-typescript-pragma-fix
ndelangen 091a084
Merge remote-tracking branch 'origin/next' into preact-typescript-pra…
KrofDrakula 856b9d5
Fix incorrect jest babel configuration for preact kitchen sink example
KrofDrakula 35f56f8
Add support for importSource in TSX
KrofDrakula ea6fbd4
Apply correct transform on webpack config
KrofDrakula e3115fd
Merge branch 'next' into preact-typescript-pragma-fix
ndelangen File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
/** @jsx React.createElement */ | ||
import React from 'react'; | ||
import PropTypes from 'prop-types'; | ||
|
||
|
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
4 changes: 0 additions & 4 deletions
4
code/examples/preact-kitchen-sink/src/stories/addon-actions.stories.js
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
4 changes: 0 additions & 4 deletions
4
code/examples/preact-kitchen-sink/src/stories/addon-backgrounds.stories.js
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 |
---|---|---|
@@ -1,7 +1,3 @@ | ||
/** @jsx h */ | ||
|
||
import { h } from 'preact'; | ||
|
||
import Button from '../Button'; | ||
|
||
export default { | ||
|
5 changes: 0 additions & 5 deletions
5
code/examples/preact-kitchen-sink/src/stories/addon-links.stories.js
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
4 changes: 0 additions & 4 deletions
4
code/examples/preact-kitchen-sink/src/stories/button.stories.js
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
2 changes: 0 additions & 2 deletions
2
code/examples/preact-kitchen-sink/src/stories/react-compat.stories.js
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
3 changes: 3 additions & 0 deletions
3
...preact-kitchen-sink/src/stories/test-cases/__snapshots__/test-component.stories.storyshot
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,3 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`Storyshots Pragma test Default 1`] = `"<div>This component should render OK.</div>"`; |
3 changes: 3 additions & 0 deletions
3
code/examples/preact-kitchen-sink/src/stories/test-cases/no-pragma.tsx
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,3 @@ | ||
const TestComponent = () => <div>This component should render OK.</div>; | ||
|
||
export default TestComponent; |
7 changes: 7 additions & 0 deletions
7
code/examples/preact-kitchen-sink/src/stories/test-cases/test-component.stories.tsx
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,7 @@ | ||
import TestComponent from './no-pragma'; | ||
|
||
export default { | ||
title: 'Pragma test', | ||
}; | ||
|
||
export const Default = () => <TestComponent />; |
4 changes: 0 additions & 4 deletions
4
code/examples/preact-kitchen-sink/src/stories/welcome.stories.js
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,8 @@ | ||
{ | ||
"compilerOptions": { | ||
"jsx": "react-jsx", | ||
"jsxFactory": "h", | ||
"jsxFragmentFactory": "Fragment", | ||
"jsxImportSource": "preact" | ||
} | ||
} |
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems to give me error/warnings when I open the file: