Skip to content

Commit 5ec8c58

Browse files
authored
fix: disallow extra properties in rule options (#11397)
* fix: disallow extra properties in rule options * chore: regenerate schema snapshots * fix: linter errors
1 parent ca00714 commit 5ec8c58

File tree

4 files changed

+4
-2
lines changed

4 files changed

+4
-2
lines changed

packages/eslint-plugin/src/rules/prefer-destructuring.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ const schema: readonly JSONSchema4[] = [
5252
},
5353
{
5454
type: 'object',
55+
additionalProperties: false,
5556
properties: {
5657
enforceForDeclarationWithTypeAnnotation: {
5758
type: 'boolean',

packages/eslint-plugin/src/rules/prefer-nullish-coalescing.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ export default createRule<Options, MessageIds>({
123123
oneOf: [
124124
{
125125
type: 'object',
126+
additionalProperties: false,
126127
description: 'Which primitives types may be ignored.',
127128
properties: {
128129
bigint: {

packages/eslint-plugin/tests/schema-snapshots/prefer-destructuring.shot

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/eslint-plugin/tests/schema-snapshots/prefer-nullish-coalescing.shot

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)
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