Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
tools: prohibit Error.prepareStackTrace usage
This eslint rule makes sure that `prepareStackTrace` is not used in
Node.js core.
  • Loading branch information
BridgeAR committed Oct 3, 2019
commit db6b7a609a27062098e90d56e0415a6fb8c4d4bc
2 changes: 2 additions & 0 deletions lib/.eslintrc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ rules:
message: "Use an error exported by the internal/errors module."
- selector: "CallExpression[callee.object.name='Error'][callee.property.name='captureStackTrace']"
message: "Please use `require('internal/errors').hideStackFrames()` instead."
- selector: "AssignmentExpression:matches([left.name='prepareStackTrace'], [left.property.name='prepareStackTrace'])"
message: "Please use 'internalOverriddenErrors' from 'lib/internal/errors.js' instead of 'Error.prepareStackTrace'."
Comment thread
BridgeAR marked this conversation as resolved.
Outdated
# Custom rules in tools/eslint-rules
node-core/lowercase-name-for-primitive: error
node-core/non-ascii-character: error
Expand Down