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

[SIP-36] Migrate Link.jsx to Link.tsx #9162

Merged
merged 1 commit into from
Feb 19, 2020

Conversation

etr2460
Copy link
Member

@etr2460 etr2460 commented Feb 18, 2020

CATEGORY

Choose one

  • Bug Fix
  • Enhancement (new features, refinement)
  • Refactor
  • Add tests
  • Build / Development Environment
  • Documentation

SUMMARY

This is an example PR for migrating a React component from JSX to TSX. I performed the following steps:

  1. Rename the component file from Link.jsx => Link.tsx
  2. Install typedefs for imported libraries (ex. npm install @types/react-bootstrap) or add // @ts-ignore if no valid typedefs exist
  3. Replace the propTypes const with an interface Props definition
  4. Move default props into the default arguments within the React component
  5. Resolve any type errors that may have been exposed by the migration
  6. Attach before/after screenshots to the PR to ensure the component functionality remains the same

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

Before:
Screen Shot 2020-02-18 at 10 20 51 AM

After:
Screen Shot 2020-02-18 at 10 15 36 AM

TEST PLAN

CI and unit tests, confirm the Link component in SQL Lab renders as expected

ADDITIONAL INFORMATION

REVIEWERS

to: @graceguo-supercat @nytai @rusackas @kristw

Copy link
Member

@nytai nytai left a comment

Choose a reason for hiding this comment

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

LGTM!

Looks like tslint is causing travis to fail, ++ for deprecating it in favor of eslint

@nytai
Copy link
Member

nytai commented Feb 18, 2020

also, I've noticed that tslint doesn't seem to run as part of lint-fix

./node_modules/.bin/tslint -c ./tslint.json --fix ./{src,spec}/**/*.ts{,x}

is how I've been getting around it.

@etr2460
Copy link
Member Author

etr2460 commented Feb 18, 2020

@nytai is deprecating tslint in favor of eslint something you can take on? I think we're all pretty much in agreement that it's the right move

@nytai
Copy link
Member

nytai commented Feb 18, 2020

@etr2460 sure, I'll give it a try tomorrow

@etr2460 etr2460 merged commit e5e6b53 into apache:master Feb 19, 2020
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 0.36.0 labels Feb 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels size/L 🚢 0.36.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants