* Fix tslint warnings
* Install @automattic/data-stores to get access to some type generics for use with our data stores.
* improve ts typing of cart-data store.
* fix incorrect rebase conflict resolution.
* Add tsconfig to components directory and include it as project
* Add @types/classnames package
* Migrate Label component to TSX
* Remove unused imports from Label component
* fix package-lock.json
It was generated with npm 7 and we don’t support that yet (and that update should be done in a separate pull)
* Add interface for LabelProps and implement.
Also:
- import `Fragment` from @wordpress/element.
- import `HTMLAttributes` explicitly as a type from react (@types/wordpress__element doesn’t export this interface).
* fix jest configuration
Co-authored-by: Darren Ethier <darren@roughsmootheng.in>
* add typescript support
* Add type declarations for Cart and CartResponse interfaces
* make sure we’re resolving .ts files as well as .js files on imports
* add more types
* type the cart data store
* Apply suggestions from code review (implement .tsx in configs)
Co-authored-by: Jon Surrell <jon.surrell@automattic.com>
* remove global fetchMock declaration and directly import where used.
* rename type
* remove named action types and just infer by returning action creator values as const
* use interface instead of type
* rename
* renames
* create CartAction type as union of action creator returned types and implement in reducer
* remove unused imports
* refresh package-lock after rebase
* Add base TS config that projects will inherit from
* Add tsconfig for assets/js/data project
* Ignore TS error on cart store registration
We will address this in cooldown when we have time to investigate further
* Add tsc to build step to catch TypeScript errors
* add a separate command for tsc and tweak build command to use
* restore checkJs and allowJs values in config and remove ts check from build command
* Add ts:check-all command
* Add TypeScript checking workflows
* Change triggers for TypeScript workflow
* Use npm ci instead of npm install
* Remove ts:check-all from TypeScript workflow
* Remove TS Check GitHub workflow
* Remove type-defs dir from TS include, and remove ts:check-all script
We no longer need the ts:check-all script because ts:check will do this for us, the old ts:check did nothing and did not work.
* fix coupon loading issues
* include .ts files only from type-defs folder
Co-authored-by: Jon Surrell <jon.surrell@automattic.com>
Co-authored-by: Thomas Roberts <thomas.roberts@automattic.com>
* Pass get_country_locale via assets
* Create helper to prepare and merge address fields
* Use new helper in address form
* Only pass field overrides now that fields are merged
* Fixc configs and remove lodash usage
* Prevent formatting of empty postcodes to suppress api error
* prevent memo on rerender
* Conitonal enqueue of locale data
* define index in increments of 10
* remove address-form
* circ deps changes
* Workaround for core data issue
* fix test
* remove prepareAddressFields export
* Remove old comment
* object from.entries polyfil
* Revert "object from.entries polyfil"
This reverts commit ba343adcf5fd2f843b225aebe340cce9b664c851.
* replace fromentries
* fix final fromentries
* enable rules and add exceptions
The `import/no-unresolved` and `import/no-extraneous-dependencies` rules defaults are enabled and configuration for adding exceptions for both webpack config resolution and externals or indirect dependencies are added.
* woops forgot to commit eslint-import-plugin-webpack resolver dependency
* I guess node resolver needs installed too?
* remove default resolve (doesn’t seem to help with the GH action errors)
* change config to lowercase for node
* implement prettier config for importing wordpress/prettier config
* update packages
This updates @wordpress/scripts to latest version so we are using the latest `@wordpress/eslint-plugin` rules.
Also installs a new required dependency due to the above update.
* temporarily convert new rules to warnings to handle in followups.
* fix stylint configuration and temporarily block rule
Latest @wordpress/scripts update requires the `@wordpress/stylelint-config` package instead of the previous builtin configuration. So applies a fix needed from that change.
* update puppeteer dependency version
* package-lock update
* add plugin area
* add invisible errorBoundary
* introduce slot
* change name to OrderMeta
* fix rebase
* wip
* create checkout file
* Import ExperimentalOrderMeta from @woocommerce/checkout
* Rename wc-checkout-packages handle to wc-blocks-checkout
* Only import wc-blocks-checkout in the feature plugin
* Move checkout package to packages folder
* Add @woocommerce/blocks-checkout to tsconfig
* Move TotalsItem to @woocommerce/checkout
* Use Fragment short syntax
* Remove example code
* Honor renderError prop in BlockErrorBoundary
* Rename error boundary
* Add example code
This reverts commit 9b6af7178cbef05589779ef7f5a750d53e7fc8cf.
* Revert "Add example code"
This reverts commit 2f50349692f53c5bb143516365eee7a98d580dfd.
* Add @woocommerce/blocks-checkout to jest config
Co-authored-by: Seghir Nadir <nadir.seghir@gmail.com>