Way to deprecate JS functions & components
Sometimes we want to mark things as deprecated, but not do the replacement yet.
Examples are pluralize and a number of other util functions, and happens for shared Vue components as we add more to gitlab-ui. Also some existing ongoing deprecations such as modals and dropdowns.
Ideally either your editor or CI should complain if you use these
Possible solutions:
- Create issue, Reviewers manually watch out for deprecated things
- Add Danger rule, possibly link to relevant issue
- rename function, e.g. prefix the name with 'deprecated_do_not_use`
-
deprecatefunction wrapper, or some kind ofconsole.errorwhen it gets called - Don't worry about it. We'll do a bulk replacement anyway and a few extra instances doesn't matter
Edited by Simon Knox