diff --git a/packages/eslint-plugin/src/rules/prefer-destructuring.ts b/packages/eslint-plugin/src/rules/prefer-destructuring.ts index 5934573e3350..a3afb125a301 100644 --- a/packages/eslint-plugin/src/rules/prefer-destructuring.ts +++ b/packages/eslint-plugin/src/rules/prefer-destructuring.ts @@ -52,6 +52,7 @@ const schema: readonly JSONSchema4[] = [ }, { type: 'object', + additionalProperties: false, properties: { enforceForDeclarationWithTypeAnnotation: { type: 'boolean', diff --git a/packages/eslint-plugin/src/rules/prefer-nullish-coalescing.ts b/packages/eslint-plugin/src/rules/prefer-nullish-coalescing.ts index 3e8c5914fa9f..d611e7b079a9 100644 --- a/packages/eslint-plugin/src/rules/prefer-nullish-coalescing.ts +++ b/packages/eslint-plugin/src/rules/prefer-nullish-coalescing.ts @@ -123,6 +123,7 @@ export default createRule({ oneOf: [ { type: 'object', + additionalProperties: false, description: 'Which primitives types may be ignored.', properties: { bigint: { diff --git a/packages/eslint-plugin/tests/schema-snapshots/prefer-destructuring.shot b/packages/eslint-plugin/tests/schema-snapshots/prefer-destructuring.shot index 61036ced3fda..d99ed3d30301 100644 --- a/packages/eslint-plugin/tests/schema-snapshots/prefer-destructuring.shot +++ b/packages/eslint-plugin/tests/schema-snapshots/prefer-destructuring.shot @@ -49,6 +49,7 @@ ] }, { + "additionalProperties": false, "properties": { "enforceForDeclarationWithTypeAnnotation": { "description": "Whether to enforce destructuring on variable declarations with type annotations.", @@ -88,6 +89,5 @@ type Options = [ enforceForDeclarationWithTypeAnnotation?: boolean; /** Whether to enforce destructuring that use a different variable name than the property name. */ enforceForRenamedProperties?: boolean; - [k: string]: unknown; }, ]; diff --git a/packages/eslint-plugin/tests/schema-snapshots/prefer-nullish-coalescing.shot b/packages/eslint-plugin/tests/schema-snapshots/prefer-nullish-coalescing.shot index 18b7da68ac53..5a8ea93c4ed6 100644 --- a/packages/eslint-plugin/tests/schema-snapshots/prefer-nullish-coalescing.shot +++ b/packages/eslint-plugin/tests/schema-snapshots/prefer-nullish-coalescing.shot @@ -29,6 +29,7 @@ "description": "Whether to ignore all (`true`) or some (an object with properties) primitive types.", "oneOf": [ { + "additionalProperties": false, "description": "Which primitives types may be ignored.", "properties": { "bigint": { @@ -95,7 +96,6 @@ type Options = [ number?: boolean; /** Ignore string primitive types. */ string?: boolean; - [k: string]: unknown; } /** Ignore all primitive types. */ | true; pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy