-
Notifications
You must be signed in to change notification settings - Fork 237
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Refactor util.js #73
Comments
I like doing Anyways, what I would really like though is to be able to give a
Could be usable for all but Might also be usable for the mocha and jasmine plugins 🙂 Also see #34 (/cc @xfumihiro), for an alternate approach to what I outline here |
I like the idea of a |
I think the way |
Various rule files consume
util.js
by requiring the file multiple times:eslint-plugin-jest/rules/prefer-to-have-length.js
Lines 2 to 6 in 38f8ca0
I'm wondering if we could clean this up, either by how we require the files, or how we organize these util methods. Some options I can think of:
or:
I also wonder if we could have more specifically named util files, like
is.js
, which exports functions that take a node and return a boolean:I'm just throwing out a few ideas that have different levels of difficulty in terms of the refactoring involved. Wondering what you think about these, if it's time to refactor any part of this, and (if so) how we can help make that happen. 👍
The text was updated successfully, but these errors were encountered: