Skip to content
This repository has been archived by the owner on Dec 13, 2018. It is now read-only.

add codemods #234

Merged
merged 7 commits into from
Jul 22, 2017
Merged

add codemods #234

merged 7 commits into from
Jul 22, 2017

Conversation

kentcdodds
Copy link
Contributor

What: This adds a codemod. It's still a work in progress

Why: To help people upgrade

How: A lot of help and inspiration from @tdeschryver

Checklist:

  • Documentation
  • Tests (more needed)
  • Ready to be merged
  • Added myself to contributors table N/A

We need more test cases! There are definitely code styles that this doesn't handle. We should also probably consider the css prop which can accept dynamic style functions as well.


Where `props` has a `theme` property.

This codemod updates your code to use the `theme` from props and remove the

Choose a reason for hiding this comment

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

A small one, but I think this should be ... and removes the ... ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Works either way. I read it as: "updates your code ... to remove the theme argument"

Choose a reason for hiding this comment

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

Oh, OK! Now I feel stupid, sorry bothering 😅

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You're no bother! You really helped get this going. Thank you!

@codecov-io
Copy link

codecov-io commented Jul 19, 2017

Codecov Report

Merging #234 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@          Coverage Diff          @@
##           master   #234   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files          10     10           
  Lines         142    142           
  Branches       36     36           
=====================================
  Hits          142    142

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ceba198...9ff3dfa. Read the comment docs.

@kentcdodds kentcdodds merged commit 8104229 into master Jul 22, 2017
@kentcdodds kentcdodds deleted the pr/codemod branch July 22, 2017 00:42
@kentcdodds kentcdodds mentioned this pull request Jul 27, 2017
11 tasks
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants