Skip to content

Problem with migration to 1.0, indent rule. #3228

@zloirock

Description

@zloirock

Old rule: "indent": [2, 2].
New rule: "indent": [2, 2, {"VariableDeclarator": 2, "SwitchCase": 1}].
Example 1:

module.exports = function(TYPE){
  // ..
  return function($this, callbackfn, that){
    var O = toObject($this, true)
      // ...
      , val, res;
    // 27:34 error Expected indentation of 6 characters but found 4 indent
    for(;length > index; index++)if(NO_HOLES || index in self){

Example 2:

module.exports = function(fn, that, length){
  aFunction(fn);
  if(~length && that === undefined)return fn;
  switch(length){
    // 7:13 error Expected indentation of 6 characters but found 4 indent
    case 1: return function(a){

Metadata

Metadata

Assignees

Labels

acceptedThere is consensus among the team that this change meets the criteria for inclusionarchived due to ageThis issue has been archived; please open a new issue for any further discussionbugESLint is working incorrectlyruleRelates to ESLint's core rules

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions