@@ -11,23 +11,23 @@ const noRestrictedSyntax = [
1111 ...noRestrictedSyntaxCommonLib ,
1212 {
1313 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' ,
1515 } ,
1616 {
1717 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." ,
1919 } ,
2020 {
2121 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." ,
2323 } ,
2424 {
2525 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." ,
2727 } ,
2828 {
2929 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 .' ,
3131 } ,
3232] ;
3333
@@ -500,7 +500,7 @@ export default [
500500 ...noRestrictedSyntax ,
501501 {
502502 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. ' ,
504504 } ,
505505 ] ,
506506 } ,
0 commit comments