aboutsummaryrefslogtreecommitdiff
path: root/.eslintrc.json
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2023-12-29 00:05:24 -0500
committerGitHub <noreply@github.com>2023-12-29 05:05:24 +0000
commit42c3b0d8bf2cf98d3202d8ea6a44bee8b9792fda (patch)
tree7bf26c7ec4e98a8bba7d6e5dee594454d5092e86 /.eslintrc.json
parent59961b6eeb46a93aa2db587a047e6da79b2dceda (diff)
Add eslint rule no-restricted-syntax (#486)
Diffstat (limited to '.eslintrc.json')
-rw-r--r--.eslintrc.json11
1 files changed, 11 insertions, 0 deletions
diff --git a/.eslintrc.json b/.eslintrc.json
index 3ea5d555..9a0402ed 100644
--- a/.eslintrc.json
+++ b/.eslintrc.json
@@ -200,6 +200,17 @@
],
"no-implicit-globals": "error",
"no-multi-spaces": "error",
+ "no-restricted-syntax": [
+ "error",
+ {
+ "message": "Avoid using JSON.parse(), prefer parseJson.",
+ "selector": "MemberExpression[object.name=JSON][property.name=parse]"
+ },
+ {
+ "message": "Avoid using Response.json(), prefer readResponseJson.",
+ "selector": "MemberExpression[property.name=json]"
+ }
+ ],
"no-trailing-spaces": "error",
"no-whitespace-before-property": "error",
"object-curly-spacing": [