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

Definitions not found for multiple methods #65

Closed
noderat opened this issue Nov 7, 2016 · 8 comments
Closed

Definitions not found for multiple methods #65

noderat opened this issue Nov 7, 2016 · 8 comments

Comments

@noderat
Copy link

noderat commented Nov 7, 2016

I'm getting errors including what looks to be valid rules. Errors are occurring for these rules: findIndex, indexOf, lastIndexOf, forEach, reduceRight, after, isNaN, extendOwn, toLower, toUpper

warning  Definition for rule 'you-dont-need-lodash-underscore/indexOf' was not found  you-dont-need-lodash-underscore/indexOf
@cht8687
Copy link
Member

cht8687 commented Nov 8, 2016

@noderat opps~ I had a quick look and found it is using kebab-case for exporting the rules...
I am fixing it now. Thanks for reporting it.

@cht8687 cht8687 mentioned this issue Nov 8, 2016
@stevemao
Copy link
Member

stevemao commented Nov 8, 2016

See the docs

'plugins': ['you-dont-need-lodash-underscore'],
'rules': {
  'you-dont-need-lodash-underscore/for-each': 1,
  'you-dont-need-lodash-underscore/concat': 1,
  ...
}

@stevemao stevemao closed this as completed Nov 8, 2016
@noderat
Copy link
Author

noderat commented Nov 8, 2016

@stevemao Ah, missed that since I was using the rule definition JSON to determine which rules applied since they weren't all explicitly laid out. camelCase is probably a better idea, since it matches the method names.

@stevemao
Copy link
Member

stevemao commented Nov 8, 2016

@noderat

The rule names, by convention, should be dash-cased. is-nan should be the only bug here.
See http://eslint.org/docs/rules/ or other eslint addons.

@noderat
Copy link
Author

noderat commented Nov 8, 2016

Ah, indeed! Should explicitly mention the name of the rule in the README.md then to prevent future confusion

@stevemao
Copy link
Member

stevemao commented Nov 8, 2016

@noderat PR welcome. I agree it's not terribly obvious :)

@noderat
Copy link
Author

noderat commented Nov 28, 2016

@stevemao Looks like the rule for _.after doesn't exist still but is in the README.

@stevemao
Copy link
Member

@noderat please open an issue for other problems. Thanks :)

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

No branches or pull requests

3 participants