From 4e9df6a8befc5d7d336f20ebc1e51fab0112a73d Mon Sep 17 00:00:00 2001 From: Dmitriy Schekhovtsov Date: Sat, 27 Feb 2016 01:37:43 +0200 Subject: [PATCH] fix(rules): 3 rules was eased max-len, newline-per-chained-call, no-magic-numbers see readme or config for details --- .eslintrc | 6 +++--- readme.md | 3 +++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.eslintrc b/.eslintrc index 4ea000b..c16769b 100644 --- a/.eslintrc +++ b/.eslintrc @@ -83,7 +83,7 @@ "no-labels": 2, "no-lone-blocks": 2, "no-loop-func": 2, - "no-magic-numbers": 2, + "no-magic-numbers": [2, {"ignoreArrayIndexes": true, "enforceConst": true }], "no-multi-spaces": 2, "no-multi-str": 2, "no-native-reassign": 2, @@ -176,14 +176,14 @@ ], "lines-around-comment": 2, "max-depth": 2, - "max-len": 2, + "max-len": [2, 120], "max-nested-callbacks": 2, "max-params": 2, "max-statements": 2, "new-cap": 2, "new-parens": 2, "newline-after-var": 2, - "newline-per-chained-call": 2, + "newline-per-chained-call": [2, {"ignoreChainWithDepth": 3}], "no-array-constructor": 2, "no-bitwise": 2, "no-continue": 2, diff --git a/readme.md b/readme.md index f00b226..40f687d 100644 --- a/readme.md +++ b/readme.md @@ -27,6 +27,8 @@ ## What is tweaked - `indent` - 2 spaces rulezzz! +- `max-len` - extended to 120 chars +- `newline-per-chained-call` - extended `ignoreChainWithDepth` to 3 - `eqeqeq` - `smart` mode enabled - `dot-location` - `property` mode enabled - `no-implicit-coercion` - boolean implicit coercion enabled @@ -37,6 +39,7 @@ - `one-var` - `never` use one `var|let|const` per block - `padded-blocks` - `never` add useless padding - `quote-props` - quote properties only `as-needed` and `keywords` +- `no-magic-numbers` - enabled `ignoreArrayIndexes` and `enforceConst` ## Contribution - what I really appreciate is configs for IDEs