tools: move webcrypto into no-restricted-properties · nodejs/node@86e80dc · GitHub
Skip to content

Commit 86e80dc

Browse files
zeeqkotargos
authored andcommitted
tools: move webcrypto into no-restricted-properties
Since eslint fixed eslint/eslint#16412 and we are on eslint v8.57.0 so that we can take advantage of no-restricted-properties rule for webcrypto. PR-URL: #53023 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
1 parent b5c30e2 commit 86e80dc

5 files changed

Lines changed: 5 additions & 15 deletions

File tree

eslint.config.mjs

Lines changed: 4 additions & 2 deletions

test/eslint.config_partial.mjs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
import {
44
noRestrictedSyntaxCommonAll,
5-
noRestrictedSyntaxCommonTest,
65
requireEslintTool,
76
} from '../tools/eslint.config_utils.mjs';
87

@@ -26,7 +25,6 @@ export default [
2625
'no-restricted-syntax': [
2726
'error',
2827
...noRestrictedSyntaxCommonAll,
29-
...noRestrictedSyntaxCommonTest,
3028
{
3129
selector: "CallExpression:matches([callee.name='deepStrictEqual'], [callee.property.name='deepStrictEqual']):matches([arguments.1.type='Literal']:not([arguments.1.regex]), [arguments.1.type='Identifier'][arguments.1.name='undefined'])",
3230
message: 'Use strictEqual instead of deepStrictEqual for literals or undefined.',

test/parallel/test-global-webcrypto-classes.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ if (!common.hasCrypto)
77

88
const assert = require('assert');
99

10-
/* eslint-disable no-restricted-syntax */
1110
const webcrypto = require('internal/crypto/webcrypto');
1211
assert.strictEqual(Crypto, webcrypto.Crypto);
1312
assert.strictEqual(CryptoKey, webcrypto.CryptoKey);

test/parallel/test-global-webcrypto.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ if (!common.hasCrypto)
77
const assert = require('assert');
88
const crypto = require('crypto');
99

10-
/* eslint-disable no-restricted-syntax */
10+
/* eslint-disable no-restricted-properties */
1111
assert.strictEqual(globalThis.crypto, crypto.webcrypto);
1212
assert.strictEqual(Crypto, crypto.webcrypto.constructor);
1313
assert.strictEqual(SubtleCrypto, crypto.webcrypto.subtle.constructor);

tools/eslint.config_utils.mjs

Lines changed: 0 additions & 9 deletions

0 commit comments

Comments
 (0)