-
Notifications
You must be signed in to change notification settings - Fork 65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add more string methods to prefer-lodash-method
rule
#136
Comments
…incubator#136. The following string methods are now reported on: - repeat - replace - split - toLowerCase (toLower) - toUpperCase (toUpper) - trim
Good point! I see you're working on a PR. Thanks! |
I didn't add Another thing I questioned: this rule is pretty complex at the moment. I think it'd be nice to split things out into Thanks for this plugin though! I'm going to find it useful. |
You're right, it is getting a bit unwieldy. But I think maybe splitting for individual methods could be too much. Maybe categories? (e.g. |
…incubator#136. The following string methods are now reported on: - repeat - replace - split - toLowerCase (toLower) - toUpperCase (toUpper) - trim
Published in |
I like that idea better I think. At the same time, it's probably not worth the work/risk in a big refactor. The only reason I mentioned it, is because this is the rule that caused the most errors in our codebase, so I had to disable it temporarily. Once I fix all the errors, it won't be a big deal. So I just threw the idea out there. Your suggestion is definitely better than the "method-level" rules. |
Thanks!!! |
Okay, so I'll open an issue for it, but it means a new major version because it's a breaking change, so it'll be a while. |
Currently, the following string methods are added to the
prefer-lodash-method
rule:A few seem to be missing:
The text was updated successfully, but these errors were encountered: