| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent b5c30e2 commit 86e80dc
5 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -9,7 +9,6 @@ import toolsConfig from './tools/eslint.config_partial.mjs'; | |||
| 9 | 9 | import { | |
| 10 | 10 | noRestrictedSyntaxCommonAll, | |
| 11 | 11 | noRestrictedSyntaxCommonLib, | |
| 12 | - noRestrictedSyntaxCommonTest, | ||
| 13 | 12 | requireEslintTool, | |
| 14 | 13 | resolveEslintTool, | |
| 15 | 14 | } from './tools/eslint.config_utils.mjs'; | |
@@ -191,12 +190,15 @@ export default [ | |||
| 191 | 190 | property: '__defineSetter__', | |
| 192 | 191 | message: '__defineSetter__ is deprecated.', | |
| 193 | 192 | }, | |
| 193 | + { | ||
| 194 | + property: 'webcrypto', | ||
| 195 | + message: 'Use `globalThis.crypto`.', | ||
| 196 | + }, | ||
| 194 | 197 | ], | |
| 195 | 198 | 'no-restricted-syntax': [ | |
| 196 | 199 | 'error', | |
| 197 | 200 | ...noRestrictedSyntaxCommonAll, | |
| 198 | 201 | ...noRestrictedSyntaxCommonLib, | |
| 199 | - ...noRestrictedSyntaxCommonTest, | ||
| 200 | 202 | ], | |
| 201 | 203 | 'no-self-compare': 'error', | |
| 202 | 204 | 'no-template-curly-in-string': 'error', | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -2,7 +2,6 @@ | |||
| 2 | 2 | ||
| 3 | 3 | import { | |
| 4 | 4 | noRestrictedSyntaxCommonAll, | |
| 5 | - noRestrictedSyntaxCommonTest, | ||
| 6 | 5 | requireEslintTool, | |
| 7 | 6 | } from '../tools/eslint.config_utils.mjs'; | |
| 8 | 7 | ||
@@ -26,7 +25,6 @@ export default [ | |||
| 26 | 25 | 'no-restricted-syntax': [ | |
| 27 | 26 | 'error', | |
| 28 | 27 | ...noRestrictedSyntaxCommonAll, | |
| 29 | - ...noRestrictedSyntaxCommonTest, | ||
| 30 | 28 | { | |
| 31 | 29 | 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'])", | |
| 32 | 30 | message: 'Use strictEqual instead of deepStrictEqual for literals or undefined.', | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -7,7 +7,6 @@ if (!common.hasCrypto) | |||
| 7 | 7 | ||
| 8 | 8 | const assert = require('assert'); | |
| 9 | 9 | ||
| 10 | - /* eslint-disable no-restricted-syntax */ | ||
| 11 | 10 | const webcrypto = require('internal/crypto/webcrypto'); | |
| 12 | 11 | assert.strictEqual(Crypto, webcrypto.Crypto); | |
| 13 | 12 | assert.strictEqual(CryptoKey, webcrypto.CryptoKey); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -7,7 +7,7 @@ if (!common.hasCrypto) | |||
| 7 | 7 | const assert = require('assert'); | |
| 8 | 8 | const crypto = require('crypto'); | |
| 9 | 9 | ||
| 10 | - /* eslint-disable no-restricted-syntax */ | ||
| 10 | + /* eslint-disable no-restricted-properties */ | ||
| 11 | 11 | assert.strictEqual(globalThis.crypto, crypto.webcrypto); | |
| 12 | 12 | assert.strictEqual(Crypto, crypto.webcrypto.constructor); | |
| 13 | 13 | assert.strictEqual(SubtleCrypto, crypto.webcrypto.subtle.constructor); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -24,12 +24,3 @@ export const noRestrictedSyntaxCommonLib = [ | |||
| 24 | 24 | message: '`setTimeout()` must be invoked with at least two arguments.', | |
| 25 | 25 | }, | |
| 26 | 26 | ]; | |
| 27 | - | ||
| 28 | - export const noRestrictedSyntaxCommonTest = [ | ||
| 29 | - { | ||
| 30 | - // TODO(@panva): move this to no-restricted-properties | ||
| 31 | - // when https://github.com/eslint/eslint/issues/16412 is fixed. | ||
| 32 | - selector: "Identifier[name='webcrypto']", | ||
| 33 | - message: 'Use `globalThis.crypto`.', | ||
| 34 | - }, | ||
| 35 | - ]; | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments