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

Defining globals #103

Closed
kmamykin opened this issue Apr 4, 2015 · 5 comments

Comments

@kmamykin
Copy link

commented Apr 4, 2015

I am working on a Appcelerator Titanium project, where the framework defines several globals that I would like to ignore.
Is there a suggested way to override them (through package.json for example) and keep using standard (instead of switching to eslint)?

@yoshuawuyts

This comment has been minimized.

Copy link
Contributor

commented Apr 4, 2015

From the README:

How do I ignore files?

The paths node_modules/, .git/, *.min.js, bundle.js, and coverage/ are automatically excluded
when looking for .js files to style check.

Sometimes you need to ignore additional folders or specific minfied files. To do that, add
a standard.ignore property to package.json:

"standard": {
  "ignore": [
    "**/out/**",
    "**/lib/select2/**",
    "**/lib/ckeditor/**"
  ]
}
@kmamykin

This comment has been minimized.

Copy link
Author

commented Apr 5, 2015

@yoshuawuyts you probably misunderstood my question. I am trying to ignore certain globals from generating standard's errors through some config setting. But I finally settled on explicitly specifying

/* global Titanium, Allow, arguments */

in each file.

@feross feross closed this Apr 5, 2015

@yoshuawuyts

This comment has been minimized.

Copy link
Contributor

commented Apr 5, 2015

whoops, my bad.

@mattdesl

This comment has been minimized.

Copy link

commented Apr 11, 2015

Is there a resolution for this issue? I tend to work with APIs like ThreeJS, CocoonJS, PIXI, etc. which are often in global scope.

@maxogden

This comment has been minimized.

Copy link
Contributor

commented Apr 11, 2015

@mattdesl I put /* global foo */ at the top of all my files, it's the simplest thing I can think of. Other than to not use globals :)

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