@@ -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
} ,
0 commit comments