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

Eliminate eslint-plugin-standard #1316

Open
feross opened this issue Jul 5, 2019 · 3 comments

Comments

@feross
Copy link
Member

commented Jul 5, 2019

We are only using one rule at this point: no-callback-literal. It would be nice to see if there's some way to eliminate the dependency and simplify the maintenance burden in some way.

@feross feross added the meta label Jul 5, 2019

@brodybits

This comment has been minimized.

Copy link
Contributor

commented Jul 7, 2019

We are only using one rule at this point: no-callback-literal.

Couldn’t we replace it with handle-callback-err?

I would also like to say that this looks like an old JavaScript coding pattern that can be replaced by promises and async functions.

@feross

This comment has been minimized.

Copy link
Member Author

commented Jul 10, 2019

handle-callback-err is about ensuring that the error is always handled in node.js-style callbacks. E.g. this is an error:

function loadData (err, data) {
    doSomething()
}

no-callback-literal ensures that when a node.js-style callback is actually called, the first argument is always null, undefined, or an Error object. E.g. this is an error:

cb('an error string')
@feross

This comment has been minimized.

Copy link
Member Author

commented Aug 14, 2019

I opened an issue asking if ESLint wants to adopt no-callback-literal so we can deprecate eslint-plugin-standard: mysticatea/eslint-plugin-node#178

@feross feross modified the milestones: standard 14, standard 15 Aug 14, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants
You can’t perform that action at this time.