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
Adopt no-callback-literal rule #178
Comments
I should note that the rule has one bug that we are aware of. We falsely report an error when the spread operator is used. This is probably an easy fix. function a (cb) {
cb(...[new Error(''), 1, 2]) // Unexpected literal in error position of callback.
} |
This was referenced Aug 14, 2019
I'm fine if this plugin hosts that rule. But I'm not sure if |
@mysticatea Great! I sent a PR: #179 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi there!
I'd like to deprecate
eslint-plugin-standard
. We currently have four rules, three of which are no longer used by us since ESLint core now has suitable alternatives built-in.The fourth rule is quite useful.
no-callback-literal
- Ensures the Node.js error-first callback pattern is followed. Specifically, when a function is namedcb
orcallback
, then it must be called withundefined
,null
or anError
object as the first function argument.We have code and tests for the implementation (https://github.com/standard/eslint-plugin-standard/blob/master/rules/no-callback-literal.js).
Ideally, we'd be able to just deprecate
eslint-plugin-standard
since we're currently maintaining a whole ESLint plugin just for a single rule.So, my question is – would
eslint-plugin-node
like to adopt this rule? It seems like a good fit. Let me know what you think!The text was updated successfully, but these errors were encountered: