Skip to content
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

Library makes no distinction between utilities and traversal methods with the same name #3

Open
3 of 10 tasks
edg2s opened this issue Nov 16, 2018 · 3 comments
Open
3 of 10 tasks

Comments

@edg2s
Copy link
Member

edg2s commented Nov 16, 2018

(moved from dgraham/eslint-plugin-jquery#29, project assumed inactive)
There are two separate methods called 'each' with different documentation pages:

The same is true of 'map':

Update: This task applies to every rule that uses createCollectionOrUtilMethodRule. Although often the utils are not officially documented, some will be getting deprecated in the future (e.g. $.find):

  • no-attr
  • no-clone
  • no-css
  • no-data
  • no-each
  • no-filter
  • no-find
  • no-map
  • no-prop
  • no-text
@edg2s
Copy link
Member Author

edg2s commented Nov 16, 2018

cc @Krinkle @jdforrester @jdlrobson

We need to come up with a new naming scheme to resolve these conflicts, currently the only rule is:
no-[method-name]

A couple of options:

  1. no-each-method & no-each-util
  2. no-collection-each & no-util-each
  3. stick with no-each for both and use config options
  4. no-each & no-jquery-each

4 would necessarily be a breaking change, but I'm not that concerned about that. In 1/2 we could leave no-each as is, or deprecated/remove it.

Thoughts?

@jdforrester
Copy link
Member

My preference order is 2 > 1 > 3 > 4.

@jdforrester jdforrester mentioned this issue Nov 16, 2018
4 tasks
@edg2s
Copy link
Member Author

edg2s commented Nov 19, 2018

I'd probably go with no-each-[modifier] so they appear next to each other when listed.

@jdforrester jdforrester changed the title Library makes no distinction utilities and traversal methods with the same name Library makes no distinction between utilities and traversal methods with the same name Nov 19, 2018
@edg2s edg2s reopened this Apr 4, 2020
edg2s added a commit that referenced this issue Apr 4, 2020
`no-find-util` is being considered for removal in jQuery 4.

Part of #3
jdforrester pushed a commit that referenced this issue Apr 6, 2020
`no-find-util` is being considered for removal in jQuery 4.

Part of #3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants