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

Global variables options in command line. #200

Closed
LeiZeng opened this issue Jul 21, 2015 · 9 comments

Comments

@LeiZeng
Copy link
Contributor

commented Jul 21, 2015

Hi, @feross ,

I know we can set options in package.json or put some comments in the head of the files.
But we still met some troubles when use some plugins in our Editors(like Atom), the cwd is no longer the root path of our project, so if we could have some options to config the global variables in the command line like the ignores, it will be perfect!!

@dcousens dcousens added the question label Jul 21, 2015

@dcousens

This comment has been minimized.

Copy link
Member

commented Jul 21, 2015

Weeeee

edit: didn't mean to close

@dcousens dcousens closed this Jul 21, 2015

@dcousens dcousens reopened this Jul 21, 2015

@ricardofbarros

This comment has been minimized.

Copy link
Contributor

commented Jul 22, 2015

+1,

Was looking to add this feature on linter-js-standard but it seems like this isn't supported on standard CLI.

@dcousens Yeah it could be very slippery since we need to pass a serialised array on CLI args
@feross What are your thoughts on this?

@feross

This comment has been minimized.

Copy link
Member

commented Jul 22, 2015

@ricardofbarros

The simple argument parser we use (minimist) returns an array when a command line flag is used twice:

standard --global React --global OtherGlobal

So no worries there.

@feross

This comment has been minimized.

Copy link
Member

commented Jul 22, 2015

@dcousens

I'm fine adding a command line flag for anything that's configurable in package.json. You can already set the parser in package.json and on the command line. But, more generally, your point is taken :)

@ricardofbarros

This comment has been minimized.

Copy link
Contributor

commented Jul 22, 2015

Cool 😄

@feross

This comment has been minimized.

Copy link
Member

commented Jul 22, 2015

Released as 5.0.0-3. This is a prerelease version, so beware that breaking changes may be added before 5.0.0 is released.

@feross feross closed this Jul 22, 2015

@ricardofbarros

This comment has been minimized.

Copy link
Contributor

commented Jul 22, 2015

I couldn't make the CLI to accept --global arg, can anyone test to see if it's working?

@feross

This comment has been minimized.

Copy link
Member

commented Jul 22, 2015

Published 5.0.0-4 and confirmed that it works.

@dcousens

This comment has been minimized.

Copy link
Member

commented Jul 23, 2015

@feross 👍 happy with that.

@lock lock bot locked as resolved and limited conversation to collaborators May 11, 2018

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