jscs-dev / node-jscs

:arrow_heading_up: JavaScript Code Style checker (unmaintained)
https://jscs-dev.github.io
MIT License
4.97k stars 515 forks source link

Unusual indentation enforcement #2210

Closed DarkArc closed 8 years ago

DarkArc commented 8 years ago

Given the correct code:

var a = function() {
  return function() {
    return true;
  };
};

JSCS Will correct the following invalid version of this:

var a = function() {
  return function() {
  return true;
  };
};

However, JSCS will not correct this invalid version, nor will it have any complaints:

var a = function() {
  return function() {
  return true;
};
};
markelog commented 8 years ago

Did you check it with master?

DarkArc commented 8 years ago

I did not, I'm using v2.11.0.

markelog commented 8 years ago

Ping us up if this behaviour is present in master.

DarkArc commented 8 years ago

@markelog I didn't get a chance to run this with master, but I just tried this with 3.0.2 (which is effectively master at the moment), it's still a problem.

markelog commented 8 years ago

/cc @mdevils

DarkArc commented 8 years ago

Found another case:

var a = function() {
  return function() {
      return true;
  };
};

becomes:

var a = function() {
  return function() {
      return true;
    };
};
markelog commented 8 years ago

At this point only major and CST related bugs will be fixed.