Problem with no-callback-literal
See original GitHub issueI fail to see what’s invalid with the following code, what makes this callback literal?
], (err, result) => {
callback(...response(err, (result ? result.paymentProvider : '')))
})
results in
Unexpected literal in error position of callback standard/no-callback-literal
Issue Analytics
- State:
- Created 6 years ago
- Comments:12 (5 by maintainers)
Top Results From Across the Web
eslint-plugin-node/no-callback-literal.md at master - GitHub
When a function is named cb or callback , then it must be invoked with a first argument that is undefined , null...
Read more >Unexpected literal in error position of callback in Vue.JS
It seems like it's caused by some code linting tool you use. It thinks that you need to pass error as the first...
Read more >14 Linting Rules To Help You Write Asynchronous Code in ...
9. node/no-callback-literal. This rule enforces that a callback function is called with an Error object as the first parameter. In case there's no...
Read more >Documentation - Do's and Don'ts - TypeScript
Overloads and Callbacks ... ): void;. ❔ Why: It's always legal for a callback to disregard a parameter, so there's no need for...
Read more >Eslint-plugin-standard NPM - npm.io
no-callback-literal - Ensures that we strictly follow the callback pattern with undefined , null or an error object in the first position of...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I agree. It should be removed all together
Sent from my iPhone
Let’s move discussion here: https://github.com/standard/standard/issues/1352