From 34df6a5c0c4e6270076fa8305a9ec227b632083e Mon Sep 17 00:00:00 2001 From: Roman Reiss Date: Mon, 25 Jan 2016 22:15:16 +0100 Subject: [PATCH] tools: enable assorted ESLint error rules MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Enables assorted rules from the category of possible errors. These should not get in the way in any form. - http://eslint.org/docs/rules/no-control-regex - http://eslint.org/docs/rules/no-extra-boolean-cast - http://eslint.org/docs/rules/no-invalid-regexp - http://eslint.org/docs/rules/no-irregular-whitespace - http://eslint.org/docs/rules/no-unexpected-multiline PR-URL: https://github.com/nodejs/node/pull/4864 Reviewed-By: targos - Michaƫl Zasso Reviewed-By: Rich Trott Reviewed-By: Roman Klauke --- .eslintrc | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.eslintrc b/.eslintrc index 8d9988acef..e4dd84b889 100644 --- a/.eslintrc +++ b/.eslintrc @@ -33,6 +33,16 @@ rules: no-unreachable: 2 ## require valid typeof compared string like typeof foo === 'strnig' valid-typeof: 2 + ## disallow controls characters in regular expressions + no-control-regex: 2 + ## disallow extra boolean casts + no-extra-boolean-cast : 2 + ## validate regular expressions + no-invalid-regexp: 2 + ## forbid weird whitespace characters + no-irregular-whitespace: 2 + ## avoid unexpected multiline expressions + no-unexpected-multiline: 2 # Best Practices # list: https://github.com/eslint/eslint/tree/master/docs/rules#best-practices