eslint-plugin-lodash
eslint-plugin-lodash copied to clipboard
Rule suggestion: Prefer `difference` over `without`
Since difference and without seem to be the same thing, except that the former accepts an array and the latter accepts variables, then create a new rule to prefer only difference, for those who want to enable it. This would improve consistency, and makes it easier to use difference without wondering if it's the one that accepts arrays or separate items.
If one of the two has to be chosen, then difference is preferred, since it also has useful differenceBy and differenceWith variations.