diff options
author | Rich Trott <rtrott@gmail.com> | 2016-02-22 08:19:32 +0300 |
---|---|---|
committer | Rich Trott <rtrott@gmail.com> | 2016-02-25 01:54:29 +0300 |
commit | 9534f6dfd534c24d1da8a2f0715f2dd6b7e09285 (patch) | |
tree | 232fc92082b271070f6225d58006b6f1480678d9 /.eslintrc | |
parent | 7b0a83d2b007a381effa038b3e4fb2421de10b87 (diff) |
tools: enable additional lint rules
Enable additional likely-uncontroversial lint rules:
* `comma-dangle` set to prohibit dangling commas on objects and arrays
that are defined on a single line. Multi-line definitions can use or
omit a trailing comma.
* `no-unused-labels` Prohibits defining a label that is not used.
* `no-path-concat` Prohibits string-concatenation using i`__dirname` and
`__filename`. Use `path.join()`, `path.resolve()`, or template strings
instead.
* `no-new-symbol` disallow use of `new` operator with `Symbol` object.
Violating this rule would result in a `TypeError` at runtime.`
PR-URL: https://github.com/nodejs/node/pull/5357
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michaƫl Zasso <mic.besace@gmail.com>
Diffstat (limited to '.eslintrc')
-rw-r--r-- | .eslintrc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/.eslintrc b/.eslintrc index d76e058b368..b9ebff875f1 100644 --- a/.eslintrc +++ b/.eslintrc @@ -5,6 +5,7 @@ env: rules: # Possible Errors # https://github.com/eslint/eslint/tree/master/docs/rules#possible-errors + comma-dangle: [2, "only-multiline"] no-control-regex: 2 no-debugger: 2 no-dupe-args: 2 @@ -30,6 +31,7 @@ rules: no-fallthrough: 2 no-octal: 2 no-redeclare: 2 + no-unused-labels: 2 # Variables # http://eslint.org/docs/rules/#variables @@ -41,6 +43,7 @@ rules: # http://eslint.org/docs/rules/#nodejs-and-commonjs no-mixed-requires: 2 no-new-require: 2 + no-path-concat: 2 no-restricted-modules: [2, "sys", "_linklist"] # Stylistic Issues @@ -71,6 +74,7 @@ rules: no-confusing-arrow: 2 no-const-assign: 2 no-dupe-class-members: 2 + no-new-symbol: 2 no-this-before-super: 2 prefer-const: 2 |