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:

  1. Create issue, Reviewers manually watch out for deprecated things
  2. Add Danger rule, possibly link to relevant issue
  3. rename function, e.g. prefix the name with 'deprecated_do_not_use`
  4. deprecate function wrapper, or some kind of console.error when it gets called
  5. Don't worry about it. We'll do a bulk replacement anyway and a few extra instances doesn't matter
Edited Nov 05, 2018 by Simon Knox
Assignee Loading
Time tracking Loading