Replace Underscore with Lodash
Preferred syntax: - `import { func } from "lodash"` - Why? This enables us to leverage tree shaking because we are using babel plugin lodash. See [My Small Test Project](https://gitlab.com/sstern/lodash-test)! - <strong>Here are a list of native replacements from underscore https://www.dropbox.com/s/ppekkr10lf4g2ds/Underscore-Replacements.pdf, please consider using these before using a lodash equivalent.</strong> Concerns: - Q: We have dependencies pulling in difference versions of lodash, wont we have too many versions of lodash? - A: Yes, we have dependencies and deps of deps pulling in lodash, but `yarn install` already dedupes lodash so we will only have one main copy of lodash. Here is what is outputted when running `yarn list --pattern lodash`. ``` ├─ lodash.camelcase@4.3.0 ├─ lodash.clonedeep@4.5.0 ├─ lodash.differencewith@4.5.0 ├─ lodash.escaperegexp@4.1.2 ├─ lodash.flatten@4.4.0 ├─ lodash.isequal@4.5.0 ├─ lodash.isplainobject@4.0.6 ├─ lodash.isstring@4.0.1 ├─ lodash.kebabcase@4.1.1 ├─ lodash.mergewith@4.6.2 ├─ lodash.snakecase@4.1.1 ├─ lodash.sortby@4.7.0 ├─ lodash.upperfirst@4.3.1 └─ lodash@4.17.15 ✨ Done in 0.59s. ``` Making MRs: - When fixing spec files, you might notice that spec files are testing weather or not an `underscore` function has been called or not. We can remove this and update the expectation because best testing practices indicate black box testing and we are not concerned with implementation details. An example can be found [Here](https://gitlab.com/gitlab-org/gitlab/merge_requests/22944). Todo: - [ ] Take snapshot of current webpack bundle size on master
epic