From e9b67f7e5deb60bef05036be9eaaa5b919364d63 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 f8ef2cec411f26..e510de49b7b48f 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 992b79107eaa25..b269eb14e625f4 100644 --- a/doc/.eslintrc.yaml +++ b/doc/.eslintrc.yaml @@ -11,13 +11,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