summaryrefslogtreecommitdiff
path: root/.eslintrc.js
diff options
context:
space:
mode:
authorMichaël Zasso <targos@protonmail.com>2018-03-15 14:22:43 +0100
committerMichaël Zasso <targos@protonmail.com>2018-03-21 20:15:33 +0100
commit6a9f0499688b7515f3156a1754583d7624b25989 (patch)
treed84151b10c31eb482efb618c09d6b3672fbc9461 /.eslintrc.js
parentab8bf26994677a5f0823b3810668f6cfa18374d9 (diff)
downloadnode-new-6a9f0499688b7515f3156a1754583d7624b25989.tar.gz
tools,lib: forbid native Error constructors
This adds a rule that forbids the use of native Error constructors in the `lib` directory. This is to encourage use of the `internal/errors` mechanism. The rule is disabled for errors that are not created with the `internal/errors` module but are still assigned an error code. PR-URL: https://github.com/nodejs/node/pull/19373 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to '.eslintrc.js')
-rw-r--r--.eslintrc.js1
1 files changed, 1 insertions, 0 deletions
diff --git a/.eslintrc.js b/.eslintrc.js
index 2250fdba77..cbadffded2 100644
--- a/.eslintrc.js
+++ b/.eslintrc.js
@@ -148,6 +148,7 @@ module.exports = {
}
],
/* eslint-disable max-len, quotes */
+ // If this list is modified, please copy the change to lib/.eslintrc.yaml
'no-restricted-syntax': [
'error',
{