Commit Graph

3 Commits

Author SHA1 Message Date
Darren Ethier f9d05163f9 Add "you don't need lodash/underscore" eslint rule (https://github.com/woocommerce/woocommerce-blocks/pull/3634)
* add you don’t need lodash eslint plugin

* handle lodash.omit eslint errors

- storybook and webpack config implementations were just ignored.
- shared/validation/index.js was converted to use ES6 destructuring to eliminate usage.

* remove lodash assign usage

* convert lodash isNan to Number.isNan

* ignore lodash.flatten lint error for now

* remove usage of lodash.isNil

* add exclusions for lodash rules in main eslintrc file rather than per file.
2021-01-05 08:58:18 -05:00
Mike Jolley 5a1bbbefb9 Update NPM dependencies and script dependency handling (https://github.com/woocommerce/woocommerce-blocks/pull/1337)
* Update NPM packages

* Switch JSON dependencies to new PHP files

* include->require

* include->require

* Remove from package and run audit fix

* Update wp-prettier

* Use version from asset file

* Fix eslint issues and test failures

* Update OriginalComponent docblocks

* Props are objects, not arrays

* Array to Object

* fix tests throwing unhandled rejection errors in node.

These tests were all testing Promise.rejects but then not properly catching the reject in the assertions.

* exclude rule for no short array syntax allowed

This is a WordPress core standard that we choose to ignore because it’s silly in our context to follow that rule (and we’re being consistent with WooCommerce Admin).
2019-12-10 12:17:46 -05:00
Albert Juhé Lluveras 01412e6af0 Update ProductControl to use HOCs (https://github.com/woocommerce/woocommerce-blocks/pull/974)
* Update ProductControl to use HOCs

* Only show variations in certain ProductControls

* Cleanup

* Refactor withSingleSelected selected prop logic

* Fix selected values not being respected

* Fix wrong propTypes notation

* Set parent: 0 in getProducts util func

* Use static properties in withProductVariations

* Move messages outside of the functional component

* Check that variations is an array

* Fix debounced search

* Fix broken tests

* Rename withSingleSelected to withTransformSingleSelectToMultipleSelect
2019-09-25 16:22:36 +02:00