Skip to content

Commit 76c9801

Browse files
committed
add lint rule
1 parent 2379adc commit 76c9801

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

lib/_tls_wrap.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
'use strict';
2323

2424
const {
25-
FunctionPrototype,
2625
ObjectAssign,
2726
ObjectDefineProperty,
2827
ObjectSetPrototypeOf,
@@ -112,7 +111,7 @@ const kPskIdentityHint = Symbol('pskidentityhint');
112111
const kPendingSession = Symbol('pendingSession');
113112
const kIsVerified = Symbol('verified');
114113

115-
const noop = FunctionPrototype;
114+
const noop = () => {};
116115

117116
let ipServernameWarned = false;
118117
let tlsTracingWarned = false;

lib/eslint.config_partial.mjs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -492,16 +492,18 @@ export default [
492492
{
493493
files: [
494494
'lib/_http_*.js',
495+
'lib/_tls_*.js',
495496
'lib/http.js',
496497
'lib/http2.js',
497498
'lib/internal/http.js',
498499
'lib/internal/http2/*.js',
500+
'lib/tls.js',
499501
],
500502
rules: {
501503
'no-restricted-syntax': [
502504
...noRestrictedSyntax,
503505
{
504-
selector: 'VariableDeclarator:has(.init[name="primordials"]) Identifier[name=/Prototype/]:not([name=/^(Object|Reflect)(Get|Set)PrototypeOf$/])',
506+
selector: 'VariableDeclarator:has(.init[name="primordials"]) Identifier[name=/Prototype[A-Z]/]:not([name=/^(Object|Reflect)(Get|Set)PrototypeOf$/])',
505507
message: 'We do not use prototype primordials in this file',
506508
},
507509
],

0 commit comments

Comments
 (0)