Use linter rule to disallow importing js-cookie directly
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
Following !85518 (merged), all imports of js-cookie should now use ~/lib/utils/cookies instead so that our Cookie implementation can be made to take gon.relative_url_root into account (this ensures things don't break when GitLab is installed in a sub-directory).
There are not many tests for the "relative url root" and it is an uncommon use case, so if someone were to import js-cookie directly instead of our helper module, it is not likely that this error would be caught. Using a linter is the best way to protect against this.
I believe the no-restricted-imports rule should suffice to enforce this, though we ought to make sure we aren't overriding any inherited rulesets from upstream (this is possibly employed already to disable imports of nodejs modules like fs).