Skip to content

Commit

Permalink
tools: print a better message for unexpected use of globals
Browse files Browse the repository at this point in the history
PR-URL: #27083
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Yongsheng Zhang <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
  • Loading branch information
targos committed Apr 6, 2019
1 parent de23055 commit dd89a11
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion lib/.eslintrc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,14 @@ env:
rules:
prefer-object-spread: error
no-buffer-constructor: error
no-restricted-globals: ["error", "JSON", "Math", "Reflect"]
no-restricted-globals:
- error
- name: JSON
message: "Use `const { JSON } = primordials;` instead of the global."
- name: Math
message: "Use `const { Math } = primordials;` instead of the global."
- name: Reflect
message: "Use `const { Reflect } = primordials;` instead of the global."
no-restricted-syntax:
# Config copied from .eslintrc.js
- error
Expand Down

0 comments on commit dd89a11

Please sign in to comment.