In my pom.xml file which I use for my project I've set the following up for jsLint:
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>jslint-maven-plugin</artifactId>
<version>1.0.1</version>
<executions>
<execution>
<goals>
<goal>jslint</goal>
<goal>test-jslint</goal>
</goals>
</execution>
</executions>
<configuration>
<excludes>
<exclude>**/vendor/*</exclude>
</excludes>
</configuration>
</plugin>
And at the top of my js-file I have the following:
/*jslint nomen: true, browser: true, devel: true*/
And within the file I have a method called:
Api.prototype._call = function (query) {...};
Which I call like this:
Api.prototype.product = function (options) {
...
return this._call(query);
};
And now for the strange things...
If I compile this with mvn clean install
I get the following error message:
api.js:45:29:Unexpected dangling '_' in '_call'.
But if I revert the flag for nomen to say nomen: false
mvn does not complain!
This on the other hand leads to that IntelliJ marks the _call
part of the code with a red marker since it is beaking jsLint.