Prevent JSON.stringify(error) (#298)

This commit is contained in:
Steve Faulkner 2020-10-26 16:50:31 -05:00 committed by GitHub
parent b4219e2994
commit 94ff6b3e81
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 1 deletions

View File

@ -42,6 +42,13 @@ module.exports = {
"no-null/no-null": "error",
"@typescript-eslint/no-explicit-any": "error",
"prefer-arrow/prefer-arrow-functions": ["error", { allowStandaloneDeclarations: true }],
eqeqeq: "error"
eqeqeq: "error",
"no-restricted-syntax": [
"error",
{
selector: "CallExpression[callee.object.name='JSON'][callee.property.name='stringify'] Identifier[name=/$err/]",
message: "Do not use JSON.stringify(error). It will print '{}'"
}
]
}
};