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

Use .jsx file extension for JS components #1218

Merged
merged 1 commit into from
Feb 27, 2023

Conversation

mszabo-wikia
Copy link
Contributor

Which problem is this PR solving?

Short description of the changes

This is to ease an eventual migration to Vite, since Vite by default only supports JSX in files with the .jsx or .tsx extensions, and this is surprisingly hard to override. Update the Prettier and ESLint configurations accordingly.

This is to ease an eventual migration to Vite, since Vite by default
only supports JSX in files with the .jsx or .tsx extensions, and this is
surprisingly hard to override. Update the Prettier and ESLint
configurations accordingly.

Signed-off-by: Máté Szabó <mszabo@fandom.com>
@yurishkuro yurishkuro enabled auto-merge (squash) February 27, 2023 21:22
@yurishkuro yurishkuro merged commit ec3e089 into jaegertracing:main Feb 27, 2023
@mszabo-wikia mszabo-wikia deleted the rename-js-components branch February 27, 2023 21:28
mszabo-wikia added a commit to mszabo-wikia/jaeger-ui that referenced this pull request Feb 27, 2023
As with jaegertracing#1218, convert
SearchResults and the root index component to use TS and the .tsx file
extension rather than plain .js. TS was chosen here since SearchResults
was already using Flow types, and index is trivially convertible.

Adding `@types/react-form` as a new dev dependency to provide typings
for `redux-form` in `SearchResults` in turn revealed type errors in the
usage of `redux-form` in the `ServicesView` component, so update that
component accordingly. Likewise, the conversion from Flow to TS revealed
some typing errors in child components.

Also update the list of JS files to be included in the TS linting
process - since we now have two new TS files to be built and linted, the
JS files that these import in turn need to be explicitly listed in
tsconfig.lint.json, otherwise `tsc` complains that they are not included
in the build.
mszabo-wikia added a commit to mszabo-wikia/jaeger-ui that referenced this pull request Feb 27, 2023
As with jaegertracing#1218, convert
SearchResults and the root index component to use TS and the .tsx file
extension rather than plain .js. TS was chosen here since SearchResults
was already using Flow types, and index is trivially convertible.

Adding `@types/react-form` as a new dev dependency to provide typings
for `redux-form` in `SearchResults` in turn revealed type errors in the
usage of `redux-form` in the `ServicesView` component, so update that
component accordingly. Likewise, the conversion from Flow to TS revealed
some typing errors in child components.

Also update the list of JS files to be included in the TS linting
process - since we now have two new TS files to be built and linted, the
JS files that these import in turn need to be explicitly listed in
tsconfig.lint.json, otherwise `tsc` complains that they are not included
in the build.

Signed-off-by: Máté Szabó <mszabo@fandom.com>
mszabo-wikia added a commit to mszabo-wikia/jaeger-ui that referenced this pull request Feb 27, 2023
As with jaegertracing#1218, convert
SearchResults and the root index component to use TS and the .tsx file
extension rather than plain .js. TS was chosen here since SearchResults
was already using Flow types, and index is trivially convertible.

Adding `@types/react-form` as a new dev dependency to provide typings
for `redux-form` in `SearchResults` in turn revealed type errors in the
usage of `redux-form` in the `ServicesView` component, so update that
component accordingly. Likewise, the conversion from Flow to TS revealed
some typing errors in child components.

Also update the list of JS files to be included in the TS linting
process - since we now have two new TS files to be built and linted, the
JS files that these import in turn need to be explicitly listed in
tsconfig.lint.json, otherwise `tsc` complains that they are not included
in the build.

Signed-off-by: Máté Szabó <mszabo@fandom.com>
mszabo-wikia added a commit to mszabo-wikia/jaeger-ui that referenced this pull request Feb 27, 2023
As with jaegertracing#1218, convert
SearchResults and the root index component to use TS and the .tsx file
extension rather than plain .js. TS was chosen here since SearchResults
was already using Flow types, and index is trivially convertible.

Adding `@types/react-form` as a new dev dependency to provide typings
for `redux-form` in `SearchResults` in turn revealed type errors in the
usage of `redux-form` in the `ServicesView` component, so update that
component accordingly. Likewise, the conversion from Flow to TS revealed
some typing errors in child components.

Also update the list of JS files to be included in the TS linting
process - since we now have two new TS files to be built and linted, the
JS files that these import in turn need to be explicitly listed in
tsconfig.lint.json, otherwise `tsc` complains that they are not included
in the build.

Signed-off-by: Máté Szabó <mszabo@fandom.com>
yurishkuro pushed a commit that referenced this pull request Feb 27, 2023
## Which problem is this PR solving?
- Split from #1212

## Short description of the changes
As with #1218, convert
SearchResults and the root index component to use TS and the .tsx file
extension rather than plain .js. TS was chosen here since SearchResults
was already using Flow types, and index is trivially convertible.

Adding `@types/react-form` as a new dev dependency to provide typings
for `redux-form` in `SearchResults` in turn revealed type errors in the
usage of `redux-form` in the `ServicesView` component, so update that
component accordingly. Likewise, the conversion from Flow to TS revealed
some typing errors in child components.

Also update the list of JS files to be included in the TS linting
process - since we now have two new TS files to be built and linted, the
JS files that these import in turn need to be explicitly listed in
tsconfig.lint.json, otherwise `tsc` complains that they are not included
in the build.

Signed-off-by: Máté Szabó <mszabo@fandom.com>
Binrix pushed a commit to Binrix/jaeger-ui that referenced this pull request Apr 18, 2023
* Split from jaegertracing#1212

This is to ease an eventual migration to Vite, since Vite by default
only supports JSX in files with the .jsx or .tsx extensions, and this is
surprisingly hard to override. Update the Prettier and ESLint
configurations accordingly.

Signed-off-by: Máté Szabó <mszabo@fandom.com>
Binrix pushed a commit to Binrix/jaeger-ui that referenced this pull request Apr 18, 2023
- Split from jaegertracing#1212

As with jaegertracing#1218, convert
SearchResults and the root index component to use TS and the .tsx file
extension rather than plain .js. TS was chosen here since SearchResults
was already using Flow types, and index is trivially convertible.

Adding `@types/react-form` as a new dev dependency to provide typings
for `redux-form` in `SearchResults` in turn revealed type errors in the
usage of `redux-form` in the `ServicesView` component, so update that
component accordingly. Likewise, the conversion from Flow to TS revealed
some typing errors in child components.

Also update the list of JS files to be included in the TS linting
process - since we now have two new TS files to be built and linted, the
JS files that these import in turn need to be explicitly listed in
tsconfig.lint.json, otherwise `tsc` complains that they are not included
in the build.

Signed-off-by: Máté Szabó <mszabo@fandom.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants