Skip to content

Support negated predef#111

Open
duncanbeevers wants to merge 1 commit intovictorporof:masterfrom
duncanbeevers:negate-predef
Open

Support negated predef#111
duncanbeevers wants to merge 1 commit intovictorporof:masterfrom
duncanbeevers:negate-predef

Conversation

@duncanbeevers
Copy link

In a .jshint config, you can negate globals via "predef".

This is useful in cases where you want to use jshint's dictionary of browser globals, but want to explicitly blacklist a subset of those entries.

{
  "browser": true,
  "predef": ["-event"]
}

@duncanbeevers duncanbeevers force-pushed the negate-predef branch 3 times, most recently from 8c9cf05 to 6566d61 Compare May 6, 2015 21:07
scripts/run.js Outdated
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: this extra variable doesn't really help with anything. Please remove it.

@victorporof
Copy link
Owner

Is this an officially supported jshint thing? I had no idea. In any case, please also add some documentation in the readme about it.

@duncanbeevers
Copy link
Author

It was an official feature, though predef is getting deprecated.

In a .jshint config, you can negate globals via "predef".

This is useful in cases where you want to use jshint's dictionary of browser globals, but want to explicitly blacklist a subset of those entries.

{
  "browser": true,
  "predef": ["-event"]
}
@duncanbeevers
Copy link
Author

Pushed update to var usage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants