* convert eslint config to use @woocommerce/eslint-plugin
- removes unnecessary dependencies
- adds e2e-tests/specs to eslint ignore (they are automatically generated)
- turns off rules that will be handled in subsequent pulls (to avoid a mammoth changeset for review).
- NOTE: prettier config needs left in because of a bug with the existing version of `@wordpress/eslint-plugin` pulled in (fixed in https://github.com/WordPress/gutenberg/pull/25068) so I left the file for now.
* prettier fixes.
* remove obsolete plugin and fixes for eslint update
This branch brings an update to eslint which also changes some syntax with plugins. So this commit:
- fixes featuer-flag plugin syntax.
- removed obsolete dependency-group plugin (which is now in the `@woocommerce/eslint-plugin` configuration.
* add to-do comment
* fixes for test runs
- this also converts our e2e test scripts to use `wp-script test:e2e`, an advantage of this is it will load CHROMIUM on demand for the e2e test run.
* fixes for test runs
- this also converts our e2e test scripts to use `wp-script test:e2e`, an advantage of this is it will load CHROMIUM on demand for the e2e test run.
* include prettier alias as a dependency
This has to be done because prettier is installed with storybook and thus the alias setup in `@wordpress/scripts` is over-ridden by the storybook import.
* another attempt at e2e-test-fix
* add some debugging and temporarily just add one e2e config test for travis
* more debugging
* try installing full puppeteer and see if fixes
* fix package-lock?
* setupSettings separately from other fixture loading
* add debugging of files
* add another console.log (hopefully trigger travis)
* split out blockPage creation to it’s own as well
* fixed! remove debugging and re-enable travis configs for entire test suite
* fix config and rename e2e-tests to e2e
- fixes the failing product-search test
- tests/e2e-tests was redundant, I changed to `tests/e2e` (this follows a file pattern change made in woocommerce core as well).
* add todo for some eslint properties
* remove unnecessary early function execution
* revert earlier commit and remove duplicate call to createBlockPages
* mass-rename js/components => js/editor-components & update webpack
* mass-change import '@woocommerce/editor-components' +
+ jsprettier quotes fix
* more mass-rename @woocommerce/editor-components
* fix up references to js/editor-components in various places:
- docs/readmes
- jest config
- typescritp config
* fix story path to match new folder/alias 'editor-components'
* fix jest tests: use new alias for editor-components
* include renamed `editor-components` in editor stylesheet cache group
* Form/button stucture
* Use registerBlockComponent
* Context for add to cart form
* Working cart button
* Tidy up button component
* Add todos
* Revert reg block
* Hide stock indicator if not purchasable
* Hide terms if empty
* Add url and type to API
* Skip default category from term response
* Rename form element
* Form for product types
* Tidy up context provider and expand todos
* No longer using qty icon
* Update todos
* Correct text domain
* registerExperimentalBlockType
* Duplicate method
* Remove prevent default
* Update docblock
* Description for button code
* more setup configuration for rtl
* move default state for cart out of reducer
This also creates a file for default store states, it should make it easier to execute tests in various environments.
* Make sure there’s a default object for cart line item row
* set defaults for cartData
* add fetchMock as a global in eslint config
* add initial cart flow tests
This is just to get the ball rolling, the cart block needs more tests
* fix missing @wordpress/jest-console configs (because I overwrote the original configuration)
* update test because of change in branch
* switch import order
* add globals.d.ts file to declare globals we use.
This is a quick solution to prevent typescript linting warning about `fetchMock`. At some point we could also create a proper interface for it or import the types (if they exist) for the `jest-mock` package.
The new `globals.d.ts` file is excluded from published builds.
- restructures `@woocommerce/base-context` imports so it pulls from `index.js` in the `base/context` folder. That way tree-shaking will be used if possible. This also helps with organizing the folder structure a bit better for the new contexts.
- Fixes all the various imports through the code due to the above change.
- Adds `CheckoutContextProvider`, `useCheckoutContext` and related files.
- Adds `PaymentMethodDataProvider`, `usePaymentMethodDataContext` and related files.
- Adds `ShippingMethodDataProvider`, `useShippingMethodDataContext` and related files.
- Adds typedefs used for the various context interfaces.
* Fix background overlap of feedback box
* TS notices
* Add company name toggle
* Implement new attributes and toggles in editor
* Handle field config in address component
* Remove other hoc rule from tsconfig
* map -> forEach
* Remove return from forEach
* Export and extend field config
* Fix optional text for all field types
* unit text
* Update snapshot
* install typescript and add typedef support
* add typedefs for Cart things
* improve typescript config
- adds more base config
- add our aliases
* fix error caught by typescript!
* Tweak typescript configuration
* Add missing `@woocommerce/settings` alias to ts config
* Add alias for type-defs