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

Suggestion: globals in package.json #177

Closed
Deadarius opened this issue Jun 29, 2015 · 3 comments

Comments

@Deadarius
Copy link

commented Jun 29, 2015

It is rather uncomfortable to write something like window._ or have /* global _ */ at each .js file.
What if we have something like this inside of package.json:

{
  <...>
  "standard": {
    "globals": ["_", "angular", "s"]
  }
}

feross added a commit to webtorrent/create-torrent that referenced this issue Jun 30, 2015

@feross feross closed this in e3cf562 Jun 30, 2015

@feross

This comment has been minimized.

Copy link
Member

commented Jun 30, 2015

Agreed - this is really handy for large projects. Released as 4.5.0.

@Deadarius

This comment has been minimized.

Copy link
Author

commented Jun 30, 2015

I think there is a confusion between 'globals' and 'global'
It is plural in source and test case, but singular in readme. Will it make sense to have it singular in source since it is singular /* global var1 */ ? Or is it better to just update readme.

Sorry, it must be me who confused you in my original suggestion as it says "globals" there

@feross

This comment has been minimized.

Copy link
Member

commented Jun 30, 2015

I think eslint supports both global and globals, so we can support both. Released as 4.5.1.

Flet added a commit to Flet/standard that referenced this issue Oct 23, 2015

@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.
2 participants
You can’t perform that action at this time.