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

Add eslint plugins? #386

jescalan opened this Issue Jan 15, 2016 · 1 comment


3 participants
Copy link

jescalan commented Jan 15, 2016

So I have been looking at flow, and would very much like to try it out for a project I'm working on to get some of the lovely benefits of strong typing. However, standard isn't happy about the type annotations when I start adding them in.

I found a nice eslint plugin that strips the type annotations for you, and started looking into whether it was possible to use this with standard, but it doesn't seem like it.

Any thoughts on the possibility of letting users add eslint plugins? In this case, the type annotations don't make it past the babel compile anyway, so it's not bending the rules of standard.js in any way. Standard already does accept custom parsers too, so I'm hoping it would be reasonable to add plugins as well.

If this does sound ok, I'd be happy to contribute!

@dcousens dcousens added the question label Jan 15, 2016

@feross feross added feature request and removed question labels Feb 4, 2016

feross added a commit to standard/standard-engine that referenced this issue Feb 4, 2016

Add --plugin option
So users can specify a custom plugin.

For user that need flowtype support, or whatever the new flavor of the
week will be in the future.

Fixes standard/standard#386

This comment has been minimized.

Copy link

feross commented Feb 4, 2016

Sure. This isn't the first issue about support for flowtype. See: #306, #186, and #157

I've been wanting to expose the underlying eslint configurability via package.json and command line option so that we can put an end to all the requests to support X, Y, or Z JavaScript extension.

In the past, I've rejected such things on the basis that we want to avoid configurability in standard, since that's kinda the whole point.

But, users use JSX, Babel, React, Flow, and a bunch of other things. Rather than support them in standard core, I want to move to a model where standard continues to Just Work out of the box, but we expose the necessary hooks for adding support for whatever flavor of the week thing decides to extend the built-in JS syntax.

So, with all that said, here's a PR to add support to standard-engine for setting plugins: standard/standard-engine#56

Works in package.json:

  "standard": {
    "plugins": [ "my-plugin" ]

Or via command line option:

standard --plugin my-plugin

This will be released in standard v6.

@feross feross closed this Feb 4, 2016

@feross feross added enhancement and removed enhancement labels May 10, 2018

@lock lock bot locked as resolved and limited conversation to collaborators Aug 8, 2018

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