+13
-13
lines changedFilter options
+13
-13
lines changed Original file line number Diff line number Diff line change
@@ -346,31 +346,31 @@ export default [
346
346
'error',
347
347
{
348
348
name: '__filename',
349
-
message: 'Use import.meta.url instead',
349
+
message: 'Use import.meta.url instead.',
350
350
},
351
351
{
352
352
name: '__dirname',
353
-
message: 'Not available in ESM',
353
+
message: 'Not available in ESM.',
354
354
},
355
355
{
356
356
name: 'exports',
357
-
message: 'Not available in ESM',
357
+
message: 'Not available in ESM.',
358
358
},
359
359
{
360
360
name: 'module',
361
-
message: 'Not available in ESM',
361
+
message: 'Not available in ESM.',
362
362
},
363
363
{
364
364
name: 'require',
365
-
message: 'Use import instead',
365
+
message: 'Use import instead.',
366
366
},
367
367
{
368
368
name: 'Buffer',
369
-
message: 'Import Buffer instead of using the global',
369
+
message: "Import 'Buffer' instead of using the global.",
370
370
},
371
371
{
372
372
name: 'process',
373
-
message: 'Import process instead of using the global',
373
+
message: "Import 'process' instead of using the global.",
374
374
},
375
375
] },
376
376
},
Original file line number Diff line number Diff line change
@@ -11,23 +11,23 @@ const noRestrictedSyntax = [
11
11
...noRestrictedSyntaxCommonLib,
12
12
{
13
13
selector: "CallExpression[callee.object.name='assert']:not([callee.property.name='ok']):not([callee.property.name='fail']):not([callee.property.name='ifError'])",
14
-
message: 'Please only use simple assertions in ./lib',
14
+
message: 'Only use simple assertions',
15
15
},
16
16
{
17
17
selector: 'NewExpression[callee.name=/Error$/]:not([callee.name=/^(AssertionError|NghttpError|AbortError|NodeAggregateError)$/])',
18
-
message: 'Use an error exported by the internal/errors module.',
18
+
message: "Use an error exported by 'internal/errors' instead.",
19
19
},
20
20
{
21
21
selector: "CallExpression[callee.object.name='Error'][callee.property.name='captureStackTrace']",
22
-
message: "Please use `require('internal/errors').hideStackFrames()` instead.",
22
+
message: "Use 'hideStackFrames' from 'internal/errors' instead.",
23
23
},
24
24
{
25
25
selector: "AssignmentExpression:matches([left.object.name='Error']):matches([left.name='prepareStackTrace'], [left.property.name='prepareStackTrace'])",
26
-
message: "Use 'overrideStackTrace' from 'lib/internal/errors.js' instead of 'Error.prepareStackTrace'.",
26
+
message: "Use 'overrideStackTrace' from 'internal/errors' instead.",
27
27
},
28
28
{
29
29
selector: "ThrowStatement > NewExpression[callee.name=/^ERR_[A-Z_]+$/] > ObjectExpression:first-child:not(:has([key.name='message']):has([key.name='code']):has([key.name='syscall']))",
30
-
message: 'The context passed into SystemError constructor must have .code, .syscall and .message.',
30
+
message: 'The context passed into the SystemError constructor must include .code, .syscall, and .message properties.',
31
31
},
32
32
];
33
33
@@ -500,7 +500,7 @@ export default [
500
500
...noRestrictedSyntax,
501
501
{
502
502
selector: 'VariableDeclarator:has(.init[name="primordials"]) Identifier[name=/Prototype[A-Z]/]:not([name=/^(Object|Reflect)(Get|Set)PrototypeOf$/])',
503
-
message: 'We do not use prototype primordials in this file',
503
+
message: 'Do not use prototype primordials in this file.',
504
504
},
505
505
],
506
506
},
You can’t perform that action at this time.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4