ci: adding eslint rule for polyfills in monorepo

Branch: wmendesneto/adding-eslint-rule-for-polyfills
Branch: editor-next-release
Merged
Merged pull request
Merged in wmendesneto/adding-eslint-rule-for-polyfills (pull request #7385)
Merged in wmendesneto/adding-eslint-rule-for-polyfills (pull request #7385)
About this pull request
Raised as a result of this comment in this pull request https://bitbucket.org/atlassian/atlaskit-mk-2/pull-requests/7364/ms-2550-check-if-containsnode-is-defined/diff#comment-121061951 . These changes can help us to avoid issues like https://ops.internal.atlassian.com/jira/browse/HOT-88870 in the future, giving browser support feedback in dev loop (Dev Experience ++)
Â
At the total, I got 1236 when I ran the eslint command in AK monorepo, adding all the packages. However, some of the errors are duplicated.
Â
Â
Sharing some points
Â
This won’t fully solve our problems when using experimental features
Since this plugin only checks non-experimental features, this won’t cover some scenarios such as
Selection.containsNode()
(https://developer.mozilla.org/en-US/docs/Web/API/Selection/containsNode#Browser_compatibility).Â
However, there are other ways to cover it properly, such as visual/integration/end-to-end tests, add specific polyfills for experimental features in
@atlaskit/polyfills
, etc.Â
However, it’s definitely a great start!
With all the polyfills in a list, we can make sure our consumers will have the proper polyfills added on their bundle - perhaps create some automation for it in the future
Â
As a way to mitigate any possible problem, we should revisit the list of polyfills that should be added in our current consumers to make sure our components/experiences are working as expected in all supported browsers