Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 6367349

Browse filesBrowse files
Trotttargos
authored andcommitted
tools: synchronize deepStrictEqual() message rules
Update ESLint config to include a rule about assert.deepStrictEqual() messages and string literals. The rule is included in lib and test, but should be included everywhere else as well. PR-URL: #22887 Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Teddy Katz <teddy.katz@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com>
1 parent 25220f0 commit 6367349
Copy full SHA for 6367349

File tree

Expand file treeCollapse file tree

1 file changed

+4
-0
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+4
-0
lines changed
Open diff view settings
Collapse file

‎.eslintrc.js‎

Copy file name to clipboardExpand all lines: .eslintrc.js
+4Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,10 @@ module.exports = {
159159
// and test/.eslintrc.yaml.
160160
'no-restricted-syntax': [
161161
'error',
162+
{
163+
selector: "CallExpression[callee.object.name='assert'][callee.property.name='deepStrictEqual'][arguments.2.type='Literal']",
164+
message: 'Do not use a literal for the third argument of assert.deepStrictEqual()'
165+
},
162166
{
163167
selector: "CallExpression[callee.object.name='assert'][callee.property.name='doesNotThrow']",
164168
message: 'Please replace `assert.doesNotThrow()` and add a comment next to the code instead.'

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.