Browse Source

tools: update eslint config

The no-reserved-keys rule doesn't exist anymore and we don't need ES3
compatibility.
escape and unescape are now known by eslint.
--reset flag was removed and it is now the default behavior.

PR-URL: https://github.com/nodejs/io.js/pull/2286
Reviewed-By: Roman Reiss <me@silverwind.io>
v5.x
Michaël Zasso 9 years ago
committed by Rod Vagg
parent
commit
225d94068a
  1. 6
      .eslintrc
  2. 2
      Makefile
  3. 2
      vcbuild.bat

6
.eslintrc

@ -27,8 +27,6 @@ rules:
no-duplicate-case: 2 no-duplicate-case: 2
## disallow assignment of exceptional params ## disallow assignment of exceptional params
no-ex-assign: 2 no-ex-assign: 2
## disallow use of reserved words as keys like enum, class
no-reserved-keys: 2
## disallow unreachable code ## disallow unreachable code
no-unreachable: 2 no-unreachable: 2
## require valid typeof compared string like typeof foo === 'strnig' ## require valid typeof compared string like typeof foo === 'strnig'
@ -44,7 +42,7 @@ rules:
## use single quote, we can use double quote when escape chars ## use single quote, we can use double quote when escape chars
quotes: [2, "single", "avoid-escape"] quotes: [2, "single", "avoid-escape"]
## 2 space indentation ## 2 space indentation
indent: [2, 2] indent: [2, 2, {SwitchCase: 1}]
## add space after comma ## add space after comma
comma-spacing: 2 comma-spacing: 2
## put semi-colon ## put semi-colon
@ -112,5 +110,3 @@ globals:
DTRACE_NET_SERVER_CONNECTION : false DTRACE_NET_SERVER_CONNECTION : false
LTTNG_NET_SERVER_CONNECTION : false LTTNG_NET_SERVER_CONNECTION : false
COUNTER_NET_SERVER_CONNECTION : false COUNTER_NET_SERVER_CONNECTION : false
escape : false
unescape : false

2
Makefile

@ -510,7 +510,7 @@ bench-idle:
jslint: jslint:
$(NODE) tools/eslint/bin/eslint.js src lib test tools/eslint-rules \ $(NODE) tools/eslint/bin/eslint.js src lib test tools/eslint-rules \
--rulesdir tools/eslint-rules --reset --quiet --rulesdir tools/eslint-rules --quiet
CPPLINT_EXCLUDE ?= CPPLINT_EXCLUDE ?=
CPPLINT_EXCLUDE += src/node_lttng.cc CPPLINT_EXCLUDE += src/node_lttng.cc

2
vcbuild.bat

@ -254,7 +254,7 @@ goto jslint
:jslint :jslint
if not defined jslint goto exit if not defined jslint goto exit
echo running jslint echo running jslint
%config%\node tools\eslint\bin\eslint.js src lib test tools\eslint-rules --rulesdir tools\eslint-rules --reset --quiet %config%\node tools\eslint\bin\eslint.js src lib test tools\eslint-rules --rulesdir tools\eslint-rules --quiet
goto exit goto exit
:create-msvs-files-failed :create-msvs-files-failed

Loading…
Cancel
Save