From fa8c5f4372ff4f3ca440ccd1a7d11756ba3a72cd Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Thu, 27 Jul 2017 09:29:15 -0700 Subject: [PATCH] tools: remove legacy indentation linting All linting now uses the current ESLint 4.3.0 indentation linting. Remove legacy indentation rules. PR-URL: https://github.com/nodejs/node/pull/14515 Reviewed-By: Luigi Pinca Reviewed-By: Colin Ihrig Reviewed-By: Claudio Rodriguez Reviewed-By: Evan Lucas Reviewed-By: Timothy Gu --- .eslintrc.yaml | 19 +++++++------------ benchmark/.eslintrc.yaml | 13 ------------- doc/.eslintrc.yaml | 10 ---------- lib/.eslintrc.yaml | 9 --------- test/.eslintrc.yaml | 10 ---------- tools/.eslintrc.yaml | 13 ------------- 6 files changed, 7 insertions(+), 67 deletions(-) delete mode 100644 benchmark/.eslintrc.yaml delete mode 100644 tools/.eslintrc.yaml diff --git a/.eslintrc.yaml b/.eslintrc.yaml index 0ba050d4c60628..dfe99dcca24c75 100644 --- a/.eslintrc.yaml +++ b/.eslintrc.yaml @@ -101,18 +101,13 @@ rules: func-call-spacing: error func-name-matching: error func-style: [error, declaration, {allowArrowFunctions: true}] - # indent: [error, 2, {ArrayExpression: first, - # CallExpression: {arguments: first}, - # FunctionDeclaration: {parameters: first}, - # FunctionExpression: {parameters: first}, - # MemberExpression: off, - # ObjectExpression: first, - # SwitchCase: 1}] - indent-legacy: [error, 2, {ArrayExpression: first, - CallExpression: {arguments: first}, - MemberExpression: 1, - ObjectExpression: first, - SwitchCase: 1}] + indent: [error, 2, {ArrayExpression: first, + CallExpression: {arguments: first}, + FunctionDeclaration: {parameters: first}, + FunctionExpression: {parameters: first}, + MemberExpression: off, + ObjectExpression: first, + SwitchCase: 1}] key-spacing: [error, {mode: minimum}] keyword-spacing: error linebreak-style: [error, unix] diff --git a/benchmark/.eslintrc.yaml b/benchmark/.eslintrc.yaml deleted file mode 100644 index beaaea041fc7f5..00000000000000 --- a/benchmark/.eslintrc.yaml +++ /dev/null @@ -1,13 +0,0 @@ -## Benchmarks-specific linter rules - -rules: - # Stylistic Issues - # http://eslint.org/docs/rules/#stylistic-issues - indent: [error, 2, {ArrayExpression: first, - CallExpression: {arguments: first}, - FunctionDeclaration: {parameters: first}, - FunctionExpression: {parameters: first}, - MemberExpression: off, - ObjectExpression: first, - SwitchCase: 1}] - indent-legacy: off diff --git a/doc/.eslintrc.yaml b/doc/.eslintrc.yaml index a112e0f54cd604..1c5177d90642ad 100644 --- a/doc/.eslintrc.yaml +++ b/doc/.eslintrc.yaml @@ -13,13 +13,3 @@ rules: no-var: error prefer-const: error prefer-rest-params: error - - # use stricter indent over indent-legacy - indent-legacy: off - indent: [error, 2, {ArrayExpression: first, - CallExpression: {arguments: first}, - FunctionDeclaration: {parameters: first}, - FunctionExpression: {parameters: first}, - MemberExpression: off, - ObjectExpression: first, - SwitchCase: 1}] diff --git a/lib/.eslintrc.yaml b/lib/.eslintrc.yaml index 29d938e27d6c23..24f54e682636ee 100644 --- a/lib/.eslintrc.yaml +++ b/lib/.eslintrc.yaml @@ -1,13 +1,4 @@ rules: - indent: [error, 2, {ArrayExpression: first, - CallExpression: {arguments: first}, - FunctionDeclaration: {parameters: first}, - FunctionExpression: {parameters: first}, - MemberExpression: off, - ObjectExpression: first, - SwitchCase: 1}] - indent-legacy: off - # Custom rules in tools/eslint-rules require-buffer: error buffer-constructor: error diff --git a/test/.eslintrc.yaml b/test/.eslintrc.yaml index 85d89ebb8647f9..aeaf09fb0ff732 100644 --- a/test/.eslintrc.yaml +++ b/test/.eslintrc.yaml @@ -1,16 +1,6 @@ ## Test-specific linter rules rules: - # Stylistic Issues - # http://eslint.org/docs/rules/#stylistic-issues - indent: [error, 2, {ArrayExpression: first, - CallExpression: {arguments: first}, - FunctionDeclaration: {parameters: first}, - FunctionExpression: {parameters: first}, - MemberExpression: off, - ObjectExpression: first, - SwitchCase: 1}] - indent-legacy: off # ECMAScript 6 # http://eslint.org/docs/rules/#ecmascript-6 no-var: error diff --git a/tools/.eslintrc.yaml b/tools/.eslintrc.yaml deleted file mode 100644 index 1655ae36f41d74..00000000000000 --- a/tools/.eslintrc.yaml +++ /dev/null @@ -1,13 +0,0 @@ -## Tools-specific linter rules - -rules: - # Stylistic Issues - # http://eslint.org/docs/rules/#stylistic-issues - indent: [error, 2, {ArrayExpression: first, - CallExpression: {arguments: first}, - FunctionDeclaration: {parameters: first}, - FunctionExpression: {parameters: first}, - MemberExpression: off, - ObjectExpression: first, - SwitchCase: 1}] - indent-legacy: off