From 7477f9ba9c40ac36b17e005ff61f8fa3794f6d3e Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Tue, 27 Jun 2017 13:33:07 -0700 Subject: [PATCH] doc: use stricter indentation checking for docs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Use stricter ESLint indent checking for sample code in docs. PR-URL: https://github.com/nodejs/node/pull/13950 Reviewed-By: Refael Ackermann Reviewed-By: Luigi Pinca Reviewed-By: Colin Ihrig Reviewed-By: Vse Mozhet Byt Reviewed-By: Benjamin Gruenbaum Reviewed-By: Tobias Nießen Reviewed-By: Michael Dawson Reviewed-By: James M Snell --- doc/.eslintrc.yaml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/doc/.eslintrc.yaml b/doc/.eslintrc.yaml index 5b7ea75de5..df93899bfb 100644 --- a/doc/.eslintrc.yaml +++ b/doc/.eslintrc.yaml @@ -13,3 +13,13 @@ rules: no-var: 2 prefer-const: 2 prefer-rest-params: 2 + + # use stricter indent over indent-legacy + indent-legacy: 0 + indent: [2, 2, {ArrayExpression: first, + CallExpression: {arguments: first}, + FunctionDeclaration: {parameters: first}, + FunctionExpression: {parameters: first}, + MemberExpression: off, + ObjectExpression: first, + SwitchCase: 1}]