indent-legacy

此规则在 ESLint v4.0.0 中已弃用。

ESLint 4.0.0 引入了对 indent 规则的重写,它现在报告的错误比以前版本中的更多。为了简化迁移到 4.0.0 的过程,引入了 indent-legacy 规则作为 ESLint 3.x 中 indent 规则的快照。如果升级到 4.0.0 后构建失败,您可以禁用 indent 并启用 indent-legacy 作为快速修复。最后,您应该切换回 indent 规则以在未来版本中获得错误修复和改进。


有几个通用准则需要嵌套块和语句的特定缩进,例如:

function hello(indentSize, type) {
    if (indentSize === 4 && type !== 'tab') {
        console.log('Each next indentation will increase on 4 spaces');
    }
}

这些是不同风格指南中推荐的最常见场景:

  • 两个空格,不是更长也没有制表符:谷歌、npm、Node.js、惯用语、Felix
  • Tabs: jQuery
  • 四个空格:Crockford

规则详情

xBQU4JyfAZpPaTmkM8WrPAw/gqhLkAlMzMYRyhE+807lKiyjdy7n86hG/BhfzNRxkZBAZQSCqhsTjll7RPUZ8dz/4YVBaIFzr3io1E5a02KbteR7lDkYQ6wMlegNxtWT

选项

8tpaQvHwOW6egTxtmGETxURon2LyC1juySWLNm/lS8WeixZYfiwma/o1TG/2NhvJ

g869MertYcL3HeW0GFnZBd3xGm161mFgODsxw9KQBFn6yQWcZGyjnzOs0rKxRtyq

{
    "indent": ["error", 2]
}

CgYB9ERj94o3diiZoMxqcZkMq5mzITtPqEV+9grfFWM=

{
    "indent": ["error", "tab"]
}

AfJhcGtLEEH9iaKsvaU1xUfIgNhyr4C/Bcx/xp64E+tZbCNmgixNattsPDqHNoTEe6E0ZScpBGrlCLyVVYI6Pw==

/*eslint indent: "error"*/

if (a) {
  b=c;
  function foo(d) {
    e=f;
  }
}

AfJhcGtLEEH9iaKsvaU1xUfIgNhyr4C/Bcx/xp64E+sHkgbRSe/udCOnIsiX+w0iy+d7tCEmJvrzJumM96Ay2w==

/*eslint indent: "error"*/

if (a) {
    b=c;
    function foo(d) {
        e=f;
    }
}

8tpaQvHwOW6egTxtmGETxTflp+BGPa3VKRHMK6uHuifLZs6g/rHfZStG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6ZJnt46GowhAjgP2WrfOUxLQFEb2MA6eKAxRJEXmY3yAQBX/ggILq0bXeJGnA8WJZJ8SGKy5anQZfY3sl3tPuad7/kNlWSaIL5lZx+kJc7vj5CJcQSL0Omk6Hsu8cCEMy3jLudE7E2udsJ003+OZtspkArRKpw9hn9kTqiiIsKDYTS9RDUJAF7o5aMsypr/yqP3A6eKpG0D+w14HJOu/gJMqAKTEp8qJ2LOb1tD7SZh1gJLY9183mQbXMcq5UlRBlOReM+/qkIfG+owsi3nN5DlbLqr6wMv3ZCqOEPZcRHLKZTFz/qwxaWCyBA6jmbXHcHNBPZi+T/Yz6qrBjCXl4NqZMSSfmR3aIFgB1bui0iJBHuFFw78cZVHKkqXVUUER5YOyV8DdcJdmMwdoCyxPJWiflqTV3ES84e18Dw/sTeXcyTH8TjJZXeDUDRu1+FeirEcjygNLJaNRBezNsSjwrV9EVbG0Dh0dEbn2Lmh/Goha851aEjTfdfxCRZpv19R3DnfkoYrdFL8/IOZilwNMzYMuAJ2I6VlyZ/qnLdgDo4V0WPUL003omiw57UCAuM30OI7AF+SnpZM6fSn5SRfeNuCNZTnqzDCyoSQ==

tab

yOPmeunUbyT4mmCnPBjZ7fkM++gdWO0392qQYHbJIGKurP6ew9ucB96NrrI9EOXvK71+SkPxQ+4FdgVF6aM1uCQGPnsyCSHU87/TNSc1yU0=

/*eslint indent: ["error", "tab"]*/

if (a) {
     b=c;
function foo(d) {
           e=f;
 }
}

yOPmeunUbyT4mmCnPBjZ7fkM++gdWO0392qQYHbJIGL+ycR0oUM0hDIpq/NoCs7Xyrb4qR/sy1V4pQk74AFhvNueNJ8I30wXRKkRRBgl9NQ=

/*eslint indent: ["error", "tab"]*/

if (a) {
/*tab*/b=c;
/*tab*/function foo(d) {
/*tab*//*tab*/e=f;
/*tab*/}
}

SwitchCase

yOPmeunUbyT4mmCnPBjZ7Vu9JNQLUy7blWAem9V+AsHJ9ke+IaEaFsOS4+UIViD/ttVvN7KXWTEHM9/MhZozjk148sk2A5nejtdFuNbQd50j3J8+xQ9qEElGdOyNsiGI

/*eslint indent: ["error", 2, { "SwitchCase": 1 }]*/

switch(a){
case "a":
    break;
case "b":
    break;
}

yOPmeunUbyT4mmCnPBjZ7Vu9JNQLUy7blWAem9V+AsHJ9ke+IaEaFsOS4+UIViD/sPipztdXzcVsu6yEVMVoo32TU2Bxn3IK92cq9E3OB0zvuvXPEVyNfViBDDJMVpFG

/*eslint indent: ["error", 2, { "SwitchCase": 1 }]*/

switch(a){
  case "a":
    break;
  case "b":
    break;
}

VariableDeclarator

yOPmeunUbyT4mmCnPBjZ7dNQbsThJY2mIMOvQ9KNUwq0ohEPk4gExBLUujOtMFI8+4dUZaSDCkVYb0j5cnPd7sfQzsYRIOqSR9ZSisWhFmZkPnt2YeOjuzG5GlsYiwnJ

/*eslint indent: ["error", 2, { "VariableDeclarator": 1 }]*/
/*eslint-env es6*/

var a,
    b,
    c;
let a,
    b,
    c;
const a = 1,
    b = 2,
    c = 3;

yOPmeunUbyT4mmCnPBjZ7dNQbsThJY2mIMOvQ9KNUwq0ohEPk4gExBLUujOtMFI8+4dUZaSDCkVYb0j5cnPd7llQskMQgtXXOk0jjhuruPII6dQrMcy7F9vpjdsgOTIA

/*eslint indent: ["error", 2, { "VariableDeclarator": 1 }]*/
/*eslint-env es6*/

var a,
  b,
  c;
let a,
  b,
  c;
const a = 1,
  b = 2,
  c = 3;

yOPmeunUbyT4mmCnPBjZ7dNQbsThJY2mIMOvQ9KNUwq0ohEPk4gExBLUujOtMFI8/ifnOzUKgypfu3YB17EzWZRRzKSmAqC+xq0HA7eY4sZmsEEiGQ4xF/MDtV7fpP0c

/*eslint indent: ["error", 2, { "VariableDeclarator": 2 }]*/
/*eslint-env es6*/

var a,
    b,
    c;
let a,
    b,
    c;
const a = 1,
    b = 2,
    c = 3;

yOPmeunUbyT4mmCnPBjZ7dNQbsThJY2mIMOvQ9KNUwq0ohEPk4gExBLUujOtMFI87CcbyuLjkjASUb5pxa+oUFnvj7I5BU7YrNGg5AxmqHnj4nXQXyVMOTU0rPvmPsYRRGgV/cW8RO8aPHCNVf30V3NatjFIOhx5QTPw/k3VmQc=

/*eslint indent: ["error", 2, { "VariableDeclarator": { "var": 2, "let": 2, "const": 3 } }]*/
/*eslint-env es6*/

var a,
    b,
    c;
let a,
    b,
    c;
const a = 1,
      b = 2,
      c = 3;

outerIIFEBody

LZl0PGF+VxJcsXNTLOvWhZwjd2Dt66aiqRHO4EntNRWD7oQAHYmEB9yABN5jwM2gTQogncTa0pTMXNrnlz4p6evIj+HNg1/lyVVDR+4rX4s0SiyyLiqWJNjFkCq+RmWq

/*eslint indent: ["error", 2, { "outerIIFEBody": 0 }]*/

(function() {

  function foo(x) {
    return x + 1;
  }

})();

if(y) {
console.log('foo');
}

LZl0PGF+VxJcsXNTLOvWhYjHbpuz3RoROqQoJQXIfLTGarJJ86r0wtyUfBaeUCACSbdW8Jt7ppJf21WESGfmh54REs8UtjDwqQNpb7Bx9UlGWWbapthDWOVFT0Kw2SMe

/*eslint indent: ["error", 2, { "outerIIFEBody": 0 }]*/

(function() {

function foo(x) {
  return x + 1;
}

})();

if(y) {
   console.log('foo');
}

MemberExpression

yOPmeunUbyT4mmCnPBjZ7fVXenszYNHNdu78kpzugZcf+BCLoH6Sap2atKbpELmZylGc/bLJ6FyHQZ+tukpd3gBh8BNUkHarWAaGYG/bLENesh+HVuNACfgfHNHKfQmw

/*eslint indent: ["error", 2, { "MemberExpression": 1 }]*/

foo
.bar
.baz()

yOPmeunUbyT4mmCnPBjZ7fVXenszYNHNdu78kpzugZcf+BCLoH6Sap2atKbpELmZylGc/bLJ6FyHQZ+tukpd3nh2R9MHxb06YHl/MU1npD26mZTX3IffcPC2W2KS6rsk

/*eslint indent: ["error", 2, { "MemberExpression": 1 }]*/

foo
  .bar
  .baz();

// Any indentation is permitted in variable declarations and assignments.
var bip = aardvark.badger
                  .coyote;

FunctionDeclaration

yOPmeunUbyT4mmCnPBjZ7TCyqlL9kFw2nhVa32QC7IwTKewdycFETG0w7i353Yg2BZF0vrkcL/R7bVBd5/eLOgkf9FIFmNVJmpEovgyO161RD9BFTZttpigh8oJQn3t59Cmpidid8FyqK+2Qd1Y6/M1v7rC2nIXY9gLO6Tj76c8=

/*eslint indent: ["error", 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} }]*/

function foo(bar,
  baz,
  qux) {
    qux();
}

yOPmeunUbyT4mmCnPBjZ7TCyqlL9kFw2nhVa32QC7IwTKewdycFETG0w7i353Yg2BZF0vrkcL/R7bVBd5/eLOgkf9FIFmNVJmpEovgyO161RD9BFTZttpigh8oJQn3t5wWB/q+DSk4dP1CV0zb04xvYJw2ZwkRADVBpLJL07aN8=

/*eslint indent: ["error", 2, { "FunctionDeclaration": {"body": 1, "parameters": 2} }]*/

function foo(bar,
    baz,
    qux) {
  qux();
}

yOPmeunUbyT4mmCnPBjZ7TCyqlL9kFw2nhVa32QC7IwTKewdycFETG0w7i353Yg2HdGzzrjdg7J0uRvZeopP/iUaryySZXbLY7mKoGYrLwG9/yM3yMQz11BxPv6Quv/nP8PJJl0QM9S26aoWgHHjY0rNCMQtwUbg2xSEwoL6mus=

/*eslint indent: ["error", 2, {"FunctionDeclaration": {"parameters": "first"}}]*/

function foo(bar, baz,
  qux, boop) {
  qux();
}

yOPmeunUbyT4mmCnPBjZ7TCyqlL9kFw2nhVa32QC7IwTKewdycFETG0w7i353Yg2HdGzzrjdg7J0uRvZeopP/iUaryySZXbLY7mKoGYrLwE/JYvqBzKFm0dTbuqLclXCH/dQ8Lx8+0/sdTPMveAMiGTCl90jBxdQRuWTetBgrIk=

/*eslint indent: ["error", 2, {"FunctionDeclaration": {"parameters": "first"}}]*/

function foo(bar, baz,
             qux, boop) {
  qux();
}

FunctionExpression

yOPmeunUbyT4mmCnPBjZ7TCyqlL9kFw2nhVa32QC7IwRJn5sWOv1qlGRCsb0MmFZhAiks2q8ACRISIk/6aL/vEHd/fwCPGY1VSiQosCZ4KUXiDuKp07JojPCns2Yd1lSSFI1pYr2z5zIUlt91l8UM4lVzlRe5m3dSTuRF55aFtk=

/*eslint indent: ["error", 2, { "FunctionExpression": {"body": 1, "parameters": 2} }]*/

var foo = function(bar,
  baz,
  qux) {
    qux();
}

yOPmeunUbyT4mmCnPBjZ7TCyqlL9kFw2nhVa32QC7IwRJn5sWOv1qlGRCsb0MmFZhAiks2q8ACRISIk/6aL/vEHd/fwCPGY1VSiQosCZ4KUXiDuKp07JojPCns2Yd1lSWJ/J+FZLbvjgtZX5cJRV4wEsiB6iICJqOJxX0hlhCGs=

/*eslint indent: ["error", 2, { "FunctionExpression": {"body": 1, "parameters": 2} }]*/

var foo = function(bar,
    baz,
    qux) {
  qux();
}

yOPmeunUbyT4mmCnPBjZ7TCyqlL9kFw2nhVa32QC7IwRJn5sWOv1qlGRCsb0MmFZg+0/IusRZ5c5EQPyThfm+2MZMCpuER79A3/OPHQMWFEOgMv6hh9y9UhSr2mCRm87Crzo3ZA3DPlAudCRa/+t9RqcGTlSiaoGDamhpPt9bao=

/*eslint indent: ["error", 2, {"FunctionExpression": {"parameters": "first"}}]*/

var foo = function(bar, baz,
  qux, boop) {
  qux();
}

yOPmeunUbyT4mmCnPBjZ7TCyqlL9kFw2nhVa32QC7IwRJn5sWOv1qlGRCsb0MmFZg+0/IusRZ5c5EQPyThfm+2MZMCpuER79A3/OPHQMWFG97vbjpstFJ2URNLNfWG93GVhE3xG3EyauWFdIkxsaBAh9qLr9KSruZLb+s+5Va4Y=

/*eslint indent: ["error", 2, {"FunctionExpression": {"parameters": "first"}}]*/

var foo = function(bar, baz,
                   qux, boop) {
  qux();
}

CallExpression

yOPmeunUbyT4mmCnPBjZ7QsrsqGGgJJZ9As1ZKsW9Gh/0rTdATtYSSEBy+BBnXe4XRKPTZ5Dr7osBc53/0i2aDbgjQ2i1oIn/RXf8MB07ACUSazZT2QWJyfrJPRkDEE13DGZ4GNPNkc/JnqModsocw==

/*eslint indent: ["error", 2, { "CallExpression": {"arguments": 1} }]*/

foo(bar,
    baz,
      qux
);

yOPmeunUbyT4mmCnPBjZ7QsrsqGGgJJZ9As1ZKsW9Gh/0rTdATtYSSEBy+BBnXe4XRKPTZ5Dr7osBc53/0i2aDbgjQ2i1oIn/RXf8MB07ADbUIaS2E1nzVUUw6Ki1QP1oY4Ieialao0yA9k8qUMJ1w==

/*eslint indent: ["error", 2, { "CallExpression": {"arguments": 1} }]*/

foo(bar,
  baz,
  qux
);

yOPmeunUbyT4mmCnPBjZ7QsrsqGGgJJZ9As1ZKsW9Gh/0rTdATtYSSEBy+BBnXe4gO/OpnlJuURXRKBlXzkCcKI+z0wOdF6YTCMezMbk9+iIQv7ZUTXTxx5R7mnAQkjB3wuy6mYf0dqMbDiOY6jmnw==

/*eslint indent: ["error", 2, {"CallExpression": {"arguments": "first"}}]*/

foo(bar, baz,
  baz, boop, beep);

yOPmeunUbyT4mmCnPBjZ7QsrsqGGgJJZ9As1ZKsW9Gh/0rTdATtYSSEBy+BBnXe4gO/OpnlJuURXRKBlXzkCcKI+z0wOdF6YTCMezMbk9+jM1m/Yx7UOlv3Q4U+hc/8LI/G+Qr63WkAKgBIwHIUcMA==

/*eslint indent: ["error", 2, {"CallExpression": {"arguments": "first"}}]*/

foo(bar, baz,
    baz, boop, beep);

ArrayExpression

yOPmeunUbyT4mmCnPBjZ7bT3hQuTEbejFzvXhd4/43TUkn6xCxm/JWueZVTlZ2QEz2dd0xoiKAn9fF+PGq4JCqzhlq4XOytlClauamKBluBVKNI5TBayMgEdYsG8MQ9Q

/*eslint indent: ["error", 2, { "ArrayExpression": 1 }]*/

var foo = [
    bar,
baz,
      qux
];

yOPmeunUbyT4mmCnPBjZ7bT3hQuTEbejFzvXhd4/43TUkn6xCxm/JWueZVTlZ2QEz2dd0xoiKAn9fF+PGq4JCrtVAFAFmAs6dtrY27np0Ix4iLD/fwna/emk2qsKuw/V

/*eslint indent: ["error", 2, { "ArrayExpression": 1 }]*/

var foo = [
  bar,
  baz,
  qux
];

yOPmeunUbyT4mmCnPBjZ7bT3hQuTEbejFzvXhd4/43ROgfbkKI76lPpTM5hIUpKyWUxVB4MasuVHGys4xp4BK5ud/+dPdv4xCzo3U7M2jmL5BHv7yyIb+iJKD/b1v1Nj

/*eslint indent: ["error", 2, {"ArrayExpression": "first"}]*/

var foo = [bar,
  baz,
  qux
];

yOPmeunUbyT4mmCnPBjZ7bT3hQuTEbejFzvXhd4/43ROgfbkKI76lPpTM5hIUpKyWUxVB4MasuVHGys4xp4BK+koQINIAeLTxdmNxAx9+v5T6GUMHTWzpz9rfKL61/uN

/*eslint indent: ["error", 2, {"ArrayExpression": "first"}]*/

var foo = [bar,
           baz,
           qux
];

ObjectExpression

yOPmeunUbyT4mmCnPBjZ7bHu8NEkIpOHEnSL+Kkl8vQhk5qvtJCo+CxOQ33PfBANWHEOAq0T4D4guUkvZWQOPpvWzE6ji5gDMqS6OEMK5FxIM+K33foMJd0sBzoh0ECM

/*eslint indent: ["error", 2, { "ObjectExpression": 1 }]*/

var foo = {
    bar: 1,
baz: 2,
      qux: 3
};

yOPmeunUbyT4mmCnPBjZ7bHu8NEkIpOHEnSL+Kkl8vQhk5qvtJCo+CxOQ33PfBANWHEOAq0T4D4guUkvZWQOPq2N+i7H970aO+qFt92SKvi+zMJuMa1E6oXAHP3wM1Oy

/*eslint indent: ["error", 2, { "ObjectExpression": 1 }]*/

var foo = {
  bar: 1,
  baz: 2,
  qux: 3
};

yOPmeunUbyT4mmCnPBjZ7bHu8NEkIpOHEnSL+Kkl8vQgdXMzGwiLfD3w8vq3qZWupey3HJ835sVzfKEZibKj4J6mXQMc064EvKpb6eVJwAw6rCZqiUfTsP4CtpurYu0e

/*eslint indent: ["error", 2, {"ObjectExpression": "first"}]*/

var foo = { bar: 1,
  baz: 2 };

yOPmeunUbyT4mmCnPBjZ7bHu8NEkIpOHEnSL+Kkl8vQgdXMzGwiLfD3w8vq3qZWupey3HJ835sVzfKEZibKj4M6GKd22Lee7eC5ddGvMSEWkMtYz3tFFdiHumJEOkN/y

/*eslint indent: ["error", 2, {"ObjectExpression": "first"}]*/

var foo = { bar: 1,
            baz: 2 };

兼容性

    odyYqUn4pqJcOfcDYspLcuN7ecZCFtb1h/2LnVjeSWBYTKScohSsgFFykY7BbjBhaV5/AtRqKBOXtzNi7ZrcHL62wfhyuNwKHhwnXN7/+++aEjIQqHh/7f954x6FBXxIb82/03W67mL5SjKo+6u819fOUrM5OrIxpHb3LH+1zN6k91UcoPNQ3lqFpCQ4mDNdVpu3i5S/yUYkzXmBWpb16g==