Commit Graph

3 Commits

Author SHA1 Message Date
Darren Ethier dc5304823b Add @woocommerce/eslint-plugin (https://github.com/woocommerce/woocommerce-admin/pull/4714)
* add new woocommerce/eslint-plugin

* implement eslint-plugin (switch scripts to use wp-scripts etc)

* various linting fixes

* more lint fixes

* improve fix script

* more eslint fixes

* more eslint fixes

* temporary convert rules to warnings until they are all handled

* linting fixes

* update package-lock.json

* remove duplicates

* remove unnecessary `@wordpress/dependency-group` rule config

* add docs and adjust rules

* prettier fix

* fix merge artifact

* convert more rules to warnings

* change order to reflect importance

* install babel-preset-default

* remove unnecessary configuration for babel

* fix dependency group rule and test

* fix test

* handle collapsible whitespace

* add react testing library eslint plugin

* linter errors

* Add back in prettierrc

* package-lock update

* js lint fix with --fix

* disable whitespace in translation

* package-lock update

* make eslint actual dependency, not peer dependency

* pin eslint to v7

* I don't know why, but its working

* fix lint js

Co-authored-by: Paul Sealock <psealock@gmail.com>
2020-07-28 14:32:58 +12:00
Fernando 0d35c1c791 Added event prop 'screen' to be recorded (https://github.com/woocommerce/woocommerce-admin/pull/4643)
* Added event prop to be recorded

This commit adds the event prop `screen` to `wcadmin_wcadmin_inbox_action_click`

* Getting screen name from referer

Now the we get the screen name from the referer

* The screen name is not being sent anymore to the API

The screen name is not sent anymore to the API. Also, the $screen_name is set as empty in the API to make the method more defensive.

* Created method `get_screen_name`

This commit moves the code related  to getting the screen name to a specific method.

* Added screen name recording for individual posts

This commits adds screen name recording for individual posts

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2020-06-25 10:36:59 -03:00
Fernando d5b40ae01f Usage of URLSearchParams breaks in IE11 (https://github.com/woocommerce/woocommerce-admin/pull/4501)
* Removed URLSearchParams method

This commit removes the method URLSearchParams to use something compatible with IE

* Revert "Removed URLSearchParams method"

This reverts commit c2b24b34c93d16264c62b3bf522f4fbc94354d58.

* Removed URLSearchParams method

This commit removes the method URLSearchParams to use something compatible with IE

* Created folder utils with global utils

This commit moves the method "getUrlParams" to a utils file. Also some unit test were added

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2020-06-05 13:07:28 -03:00