maven - Does Mojo use jslint nomen flag backwards? -
i've started jslint , mojo(1.7.1-alpha-1) bare me...
in pom.xml file use project i've set following 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 @ top of js-file have following:
/*jslint nomen: true, browser: true, devel: true*/
and within file have method called:
api.prototype._call = function (query) {...};
which call this:
api.prototype.product = function (options) { ... return this._call(query); };
and strange things...
if compile mvn clean install
following error message:
api.js:45:29:unexpected dangling '_' in '_call'.
but if revert flag nomen nomen: false
mvn not complain!
on other hand leads intellij marks _call
part of code red marker since beaking jslint.
it looks bug in "jslint-maven-plugin" plugin.
the official jslint docs nomen "true
if names should not checked initial or trailing underbars." can verify options checkboxes on jslint.com.
the "jslint-maven-plugin" source code appears have backwards: if search "nomen" in the source code, you'll see have mapped called disallowdanglingunderbarinidentifiers
-- inverse of nomen
means. (i'm not entirely sure how translates overriding config settings in js file, seems suspicious).
it looks can file bug here on plugin, if that's consolation.
Comments
Post a Comment