Skip to content

Commit 8bb2590

Browse files
committed
[Fix] disallow extra properties in rule options
1 parent a7d1a12 commit 8bb2590

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

src/rules/label-has-for.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ const schema = {
2626
},
2727
allowChildren: { type: 'boolean' },
2828
},
29+
additionalProperties: false,
2930
};
3031
// Breadth-first search, assuming that HTML for forms is shallow.
3132
function validateNesting(node) {

src/util/schemas.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,5 @@ export const generateObjSchema = (properties = {}, required = undefined) => ({
3030
type: 'object',
3131
properties,
3232
required,
33+
additionalProperties: false,
3334
});

0 commit comments

Comments
 (0)