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

Closed
feross opened this issue Jul 5, 2019 · 17 comments
Closed

Eliminate eslint-plugin-standard #1316

feross opened this issue Jul 5, 2019 · 17 comments
Labels
Milestone

Comments

@feross
Copy link
Member

feross commented Jul 5, 2019

ATTENTION: If you're coming to this issue from the npm deprecation warning, here's what you need to know:

standard and eslint-config-standard version 16.0.0 and later no longer require eslint-plugin-standard to function. If you have this package in your package.json you can remove it with npm rm eslint-plugin-standard and save some disk space and install time :)

Here's the full v16.0.0 changelog: https://github.com/standard/standard/blob/master/CHANGELOG.md#1600---2020-10-28


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
Copy link
Contributor

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
Copy link
Member Author

feross 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
Copy link
Member Author

feross 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
@feross
Copy link
Member Author

feross commented Sep 4, 2019

I was able to PR the no-callback-literal rule into the eslint-plugin-node project: mysticatea/eslint-plugin-node#179

So, we can close this issue in standard 15 now :)

@voxpelli
Copy link
Member

Posted a request to deprecate eslint-plugin-standard as a follow up to this thread: standard/eslint-plugin-standard#38

@feross
Copy link
Member Author

feross commented Nov 23, 2020

@voxpelli I agree. Just released eslint-plugin-standard 5.0.0 and deprecated it.

@sQVe
Copy link

sQVe commented Nov 23, 2020

@feross This package is still listed as a peerDependency for https://github.com/standard/eslint-config-standard-with-typescript thought. So, basically still used.

@voxpelli
Copy link
Member

@sQVe That peerDependency should be locked to 4.x then, or better, replaced there as well

@mmoussa-tbx
Copy link

What happened with this? I'm still having the issue @vitexikora reported in this comment #1316 (comment)

@voxpelli
Copy link
Member

@mmoussa-tbx Nothing happens. This plugin has been superseded by other rules and neither eslint-config-standard or any other standard configs should be using it anymore.

If you can't remove eslint-plugin-standard without your setup failing, then that means one of two things:

  1. You are referencing it yourself in your ESLint config (as in the comment you are referencing)
  2. Another config you extend is referencing it

According to npm there are 1606 packages depending on the plugin: https://www.npmjs.com/package/eslint-plugin-standard All of them should be able to move on to the same rules that standard moved to.

Here's a reference of what happened with many of the rules:

@mmoussa-tbx
Copy link

@voxpelli thank you very much for the detailed explanation! 👍

We were still using in our .eslintrc file the standard/* rules defined in the deprecated eslint-plugin-standard

I just replaced these old rules with the ones in the eslint-config-standard rules file and is working good now!

sleepycat added a commit to canada-ca/tracker that referenced this issue Apr 8, 2022
Also removing deprecated eslint-plugin-standard as per:
standard/standard#1316
sleepycat added a commit to canada-ca/tracker that referenced this issue Apr 8, 2022
Also removing deprecated eslint-plugin-standard as per:
standard/standard#1316
VladimirSlavik added a commit to VladimirSlavik/anaconda that referenced this issue Apr 21, 2022
sambostock added a commit to Shopify/ruby-style-guide that referenced this issue Jun 21, 2022
As per deprecation message during NPM install:

> standard 16.0.0 and eslint-config-standard 16.0.0 no longer require the eslint-plugin-standard package.
> You can remove it from your dependencies with 'npm rm eslint-plugin-standard'.
> More info here: standard/standard#1316
Frederick888 added a commit to zendesk/zcli that referenced this issue Jul 20, 2022
standard 16.0.0 and eslint-config-standard 16.0.0 no longer require the
eslint-plugin-standard package.

[1] standard/standard#1316
Frederick888 added a commit to zendesk/zcli that referenced this issue Jul 20, 2022
standard 16.0.0 and eslint-config-standard 16.0.0 no longer require the
eslint-plugin-standard package.

[1] standard/standard#1316
Frederick888 added a commit to zendesk/zcli that referenced this issue Jul 21, 2022
standard 16.0.0 and eslint-config-standard 16.0.0 no longer require the
eslint-plugin-standard package.

[1] standard/standard#1316
sakura-flutter added a commit to sakura-flutter/tampermonkey-scripts that referenced this issue Aug 1, 2022
[因为standard and eslint-config-standard16+ 不再需要](standard/standard#1316)
sakura-flutter added a commit to sakura-flutter/tampermonkey-scripts that referenced this issue Aug 1, 2022
[因为standard and eslint-config-standard16+ 不再需要](standard/standard#1316)
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 11, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
Archived in project
Development

No branches or pull requests

7 participants