Skip to content

prop value shape deprecation lint rule #1094

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

Merged
merged 18 commits into from
Feb 16, 2021

Conversation

lidord-wix
Copy link
Contributor

Description

I tried to make the rule readable as possible,
I also adjusted the schema, not sure it's the right way because when I set additionalProps: false the test is failing.

Changelog

Set new lint rule for deprecation of prop value shape

@lidord-wix lidord-wix requested a review from ethanshar December 21, 2020 17:22
@ethanshar ethanshar requested a review from M-i-k-e-l December 27, 2020 12:28
@ethanshar ethanshar assigned M-i-k-e-l and unassigned ethanshar Dec 27, 2020
@ethanshar ethanshar removed their request for review December 27, 2020 12:28
Copy link
Collaborator

@M-i-k-e-l M-i-k-e-l left a comment

Choose a reason for hiding this comment

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

A few comments, but generally nice work!
I think it's a hard place to get in to.

@lidord-wix lidord-wix requested a review from M-i-k-e-l January 7, 2021 10:34
lidord-wix and others added 5 commits January 7, 2021 12:35
* master: (41 commits)
  Remove animatable from FloatingButton component (#1134)
  Stop using AnimatableManager in Hint (#1125)
  Change setTimeout's time from 50 to 100
  Update generated types
  push expo stuff
  Update wiki links
  Fix/dialog swiping does not trigger on dialog dismissed (#1093)
  remove github token
  Create colors.md
  CardsScreen - fix backgrounds and remove obsolete examples (#1124)
  trigger build
  Add missing functionality for Incubator.TextField (#1121)
  Update all app icons sizes for iOS project
  Adding 'defaultSource' for image source in case of an error (#1116)
  DateTimePicker - adding 'headerStyle' prop to adjust iOS dialog header style (#1117)
  add prepush script
  Infra/use did update (#1119)
  SettingsScreen - rename to UNSAFE (#1118)
  Create a middleware TextField migrator to migrate people to the new TextField implementation (#1113)
  Fix lint error
  ...
Copy link
Collaborator

@M-i-k-e-l M-i-k-e-l left a comment

Choose a reason for hiding this comment

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

Good job!
I've added a few tests, only one of which failed (it's commented out; I suggest that you'll fix it once we'll merge my utils change, we might consider adding a source then, since it'll be easier and perhaps necessary).

@M-i-k-e-l
Copy link
Collaborator

Oh, almost forgot...
You'll need to change the version in the package.json, but please do it after this PR is merged so there are no conflicts (I'm guessing it'll be merged by the time you look at it since you are not working tomorrow as far as I know :) ).

@lidord-wix lidord-wix requested a review from M-i-k-e-l February 4, 2021 11:52
@lidord-wix
Copy link
Contributor Author

I fixed the issue with the last test case.
As part of the solution, I added a getComponentName function to the utils.

@lidord-wix lidord-wix requested a review from M-i-k-e-l February 15, 2021 11:32
@lidord-wix lidord-wix requested a review from M-i-k-e-l February 16, 2021 09:01
@M-i-k-e-l M-i-k-e-l merged commit f5bbad7 into master Feb 16, 2021
M-i-k-e-l added a commit that referenced this pull request Feb 17, 2021
* master: (30 commits)
  Button - refactor into smaller files (#1168)
  replace @react-native-community/picker with @react-native-picker/picker (#1063)
  Update generate types
  fix: catch undefined StatusBarManager (#1189)
  prop value shape deprecation lint rule (#1094)
  Infra/expo app fixes (#1166)
  Safe require blur-view dependency in Card (#1179)
  Update our stars count
  Update expo snack link with only supported platforms
  Export TabBarProps and fix BadgeScreen typescript errors
  Disable flipper
  Avoid passing overlayContent in CardSecion (#1187)
  Fix Carousel typings
  updating published version
  no-direct-import eslint rule - adding `applyAutofix` flag (#1183)
  Feat/image demo broken (#1173)
  Remove addItems from screen with fewItems
  Add vertical scroll to Carousel component (#1175)
  Fix Carousel gif
  Update Carousel gifs
  ...

# Conflicts:
#	demo/src/screens/componentScreens/BadgesScreen.tsx
#	generatedTypes/components/button/index.d.ts
#	markdowns/getting-started/setup.md
#	src/components/button/index.tsx
#	src/components/card/CardSection.tsx
#	src/components/card/index.tsx
#	src/components/loaderScreen/index.js
#	src/components/modal/index.tsx
#	typings/components/Toast.d.ts
#	uilib-docs/src/templates/markdown.scss
M-i-k-e-l added a commit that referenced this pull request Feb 18, 2021
* Add customLoader and remove animatable (#1152)

* Add customLoader and remove animatable

* remove redundent view

Co-authored-by: Ethan Sharabi <[email protected]>

* Fix/responsive docs pages (#1174)

* Support showing navbar in mobile

* More minor responsive fixes

* Fix margin top in navbar on mobile

* Fix/tab controller center android with rtl (#1178)

* Update generate types

* Update uilib-docs version to 1.0.11

* Fix order of markdown pages in docs site

* Fix issue with duplicate props appearing in docs site

* Fix issue with Carousel props not being included in docs

* Update PageControl docs with a gif

* Fix and improve search using fuzzysearch

* Update Carousel gifs

* Fix Carousel gif

* Add vertical scroll to Carousel component (#1175)

* Add vertical scroll to Carousel component

* cr fixes

Co-authored-by: Ethan Sharabi <[email protected]>

* Remove addItems from screen with fewItems

* Feat/image demo broken (#1173)

* no-direct-import eslint rule - adding `applyAutofix` flag (#1183)

* no-direct-import eslint rule - adding `applyAutofix` flag to control autofix option

* bumping version to 1.1.00

* version number fix

* Update eslint-rules/package.json

Co-authored-by: Ethan Sharabi <[email protected]>

Co-authored-by: Ethan Sharabi <[email protected]>

* updating published version

* Fix Carousel typings

* Avoid passing overlayContent in CardSecion (#1187)

* Disable flipper

* Export TabBarProps and fix BadgeScreen typescript errors

* Update expo snack link with only supported platforms

* Update our stars count

* Safe require blur-view dependency in Card (#1179)

* safe require blur-view dependency in card and warn user if missing

* Add optional require for blur-view package in Modal component

* Update generate types

* Infra/expo app fixes (#1166)

* Load assets for demo app

* expo settings stuff

* Update UI for main screen

* use useCallback for renderItem and renderSectionHeader

* register ChipScreen so it will be accessible in expo demo app

* Update README

* remove .expo files from git

* Update .gitignore to exclude .expo files

* Use Incubator.TextField

* Update our expo demo icon with the new one

* Update expoDemo/.gitignore

Co-authored-by: Mendy Edri <[email protected]>

* code review fixes and search improvements

* refactor item onPress and use useCallback

Co-authored-by: Mendy Edri <[email protected]>

* prop value shape deprecation lint rule (#1094)

* set new lint rule for prop value

* fix schema

* add cases to prop-value-shape lint rule

* refactor propShapeValueDeprecation

* Adding two (failing) tests

* Fix test and add two more big tests

* More tests

* add getComponentName to utils

* Renaming

* update message when there's no fix

* fix deprecation message

* update version

Co-authored-by: Miki Leib <[email protected]>

* fix: catch undefined StatusBarManager (#1189)

* Update generate types

* replace @react-native-community/picker with @react-native-picker/picker (#1063)

* replace @react-native-community/picker with @react-native-picker/picker

* Safely require Picker package

* Use optional require only for iOS

* Update expo dependncy to use @react-native-picker/picker

* Button - refactor into smaller files (#1168)

* Button - refactor into smaller files (reanimated 2 part 1)

* Oops

Co-authored-by: Ethan Sharabi <[email protected]>

Co-authored-by: Lidor Dafna <[email protected]>
Co-authored-by: Ethan Sharabi <[email protected]>
Co-authored-by: Daniel Kochavi <[email protected]>
Co-authored-by: Inbal Tish <[email protected]>
Co-authored-by: Inbal Tish <[email protected]>
Co-authored-by: Mendy Edri <[email protected]>
Co-authored-by: Julian Hundeloh <[email protected]>
M-i-k-e-l added a commit that referenced this pull request Feb 18, 2021
* master: (77 commits)
  Button - refactor into smaller files (#1168)
  replace @react-native-community/picker with @react-native-picker/picker (#1063)
  Update generate types
  fix: catch undefined StatusBarManager (#1189)
  prop value shape deprecation lint rule (#1094)
  Infra/expo app fixes (#1166)
  Safe require blur-view dependency in Card (#1179)
  Update our stars count
  Update expo snack link with only supported platforms
  Export TabBarProps and fix BadgeScreen typescript errors
  Disable flipper
  Avoid passing overlayContent in CardSecion (#1187)
  Fix Carousel typings
  updating published version
  no-direct-import eslint rule - adding `applyAutofix` flag (#1183)
  Feat/image demo broken (#1173)
  Remove addItems from screen with fewItems
  Add vertical scroll to Carousel component (#1175)
  Fix Carousel gif
  Update Carousel gifs
  ...

# Conflicts:
#	eslint-rules/lib/rules/typography-deprecation.js
#	eslint-rules/package.json
#	eslint-rules/tests/lib/rules/typography-deprecation.js
#	eslint-rules/tests/typography_deprecation.json
@lidord-wix lidord-wix deleted the Infra/prop-value-shape-deprecation branch March 8, 2021 09:15
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.

3 participants