schorfES / grunt-lintspaces

A Grunt task for checking spaces in files.
https://npmjs.com/package/grunt-lintspaces
MIT License
31 stars 9 forks source link

Confusion between ignore `js-comments` and `newlineMaximum` #20

Closed yfr closed 10 years ago

yfr commented 10 years ago

When i use

options: {
  ignore: [
    "js-comments"
  ],
  newlineMaximum: 1
}

the ignored comments are counted as new lines. And i get an newlineMaximum error.

What can i do?

schorfES commented 10 years ago

Hi! Can you post a code example where this issue occours? Please post that issue again in the node-lintspaces repo. This grunt task is just a wrapper for that module. Thank you!!!

yfr commented 10 years ago

sure:

var app = app || {};

/**
 * Methods for handling the header
 */
app.Header = new Model({

  /**
   * Initialize the model
   */
  init: function() {}

});
…

When i use the settings like above an newlineMaximum error raises. If i remove the first comment, the second comment then becomes the error.

Hope that helps.

schorfES commented 10 years ago

Thanks for reopening a new issue @ the node-linspaces repo!