can camelcase rule ignore predefs?

101 views
Skip to first unread message

Don Walling

unread,
Feb 16, 2015, 12:06:24 AM2/16/15
to jsh...@googlegroups.com
Hi, 
Is there a way to configure the camelcase rule to ignore variables defined in predefs? Our project inherits a variable that is not camelcase, so the camelcase rule flags all of our usages. I'd like to turn that off somehow without having to disable the camelcase rule for our own code.
Thanks
Don

Morten Sjøgren

unread,
Feb 20, 2015, 11:37:05 AM2/20/15
to jsh...@googlegroups.com
You can disable the camelcase rule for blocks in your code, this is how I solved it in one of the projects I'm working on.

/*jshint camelcase: false */
if ( NOTCAMELCASE ) {
/// TODO: Stuff
} else {
/// TODO: Other Stuff
}
/*jshint camelcase: true*/

Of cause this is only useful, if you have a limited use of non-camelcase names. It'll be too bothersome, if you have to do that many times.
Reply all
Reply to author
Forward
0 new messages