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

lodash3/matches-shorthand listener must be a function #13

Closed
gajus opened this issue Jan 6, 2016 · 4 comments
Closed

lodash3/matches-shorthand listener must be a function #13

gajus opened this issue Jan 6, 2016 · 4 comments

Comments

@gajus
Copy link
Contributor

gajus commented Jan 6, 2016

TypeError: Error while loading rule 'lodash3/matches-shorthand': listener must be a function
    at EventEmitter.addListener (events.js:197:11)
    at /Users/gajus/Documents/dev/gajus/create-index/node_modules/pragmatist/node_modules/canonical/node_modules/eslint/lib/eslint.js:699:29
    at Array.forEach (native)
    at /Users/gajus/Documents/dev/gajus/create-index/node_modules/pragmatist/node_modules/canonical/node_modules/eslint/lib/eslint.js:698:39
    at Array.forEach (native)
    at EventEmitter.module.exports.api.verify (/Users/gajus/Documents/dev/gajus/create-index/node_modules/pragmatist/node_modules/canonical/node_modules/eslint/lib/eslint.js:671:16)
    at processText (/Users/gajus/Documents/dev/gajus/create-index/node_modules/pragmatist/node_modules/canonical/node_modules/eslint/lib/cli-engine.js:230:27)
    at CLIEngine.executeOnText (/Users/gajus/Documents/dev/gajus/create-index/node_modules/pragmatist/node_modules/canonical/node_modules/eslint/lib/cli-engine.js:686:26)
    at exports.lintText.lintText (/Users/gajus/Documents/dev/gajus/create-index/node_modules/pragmatist/node_modules/canonical/dist/linters/js/index.js:31:16)
    at exports.default (/Users/gajus/Documents/dev/gajus/create-index/node_modules/pragmatist/node_modules/canonical/dist/lintText.js:46:35)
    at /Users/gajus/Documents/dev/gajus/create-index/node_modules/pragmatist/node_modules/canonical/dist/lintFiles.js:65:45
    at arrayEach (/Users/gajus/Documents/dev/gajus/create-index/node_modules/pragmatist/node_modules/canonical/node_modules/lodash/internal/arrayEach.js:15:9)
    at /Users/gajus/Documents/dev/gajus/create-index/node_modules/pragmatist/node_modules/canonical/node_modules/lodash/internal/createForEach.js:15:9
    at exports.default (/Users/gajus/Documents/dev/gajus/create-index/node_modules/pragmatist/node_modules/canonical/dist/lintFiles.js:53:27)
    at /Users/gajus/Documents/dev/gajus/create-index/node_modules/pragmatist/dist/index.js:242:47
@gajus
Copy link
Contributor Author

gajus commented Jan 6, 2016

I am getting this error with the latest version regardless of the input code.

@ganimomer
Copy link
Contributor

Hi @gajus,
The latest version made a breaking change in this rule (that's why the latest version had a larger minor version and not just a patch).
Change your configuration to match the one in the README or the rule docs, and it should fix it.

@gajus
Copy link
Contributor Author

gajus commented Jan 6, 2016

https://github.com/wix/eslint-plugin-lodash3/blob/master/docs/rules/matches-shorthand.md

Breaking change was introduced:

What was:

"lodash3/matches-shorthand": [
    1,
    3
],

is now:

"lodash3/matches-shorthand": [
    1,
    "always",
    3
],

@ganimomer
Copy link
Contributor

Unfortunately, this is the message ESLint supplies whenever the rule config doesn't match the schema.

gajus added a commit to gajus/eslint-config-canonical-lodash that referenced this issue Jan 6, 2016
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

2 participants