diff --git a/rules/better-regex.js b/rules/better-regex.js index ca09effb89..137c7c8f1c 100644 --- a/rules/better-regex.js +++ b/rules/better-regex.js @@ -101,6 +101,7 @@ const create = context => { const schema = [ { type: 'object', + additionalProperties: false, properties: { sortCharacterClasses: { type: 'boolean', diff --git a/rules/catch-error-name.js b/rules/catch-error-name.js index 8b7021a195..0d899cf99d 100644 --- a/rules/catch-error-name.js +++ b/rules/catch-error-name.js @@ -100,6 +100,7 @@ const create = context => { const schema = [ { type: 'object', + additionalProperties: false, properties: { name: { type: 'string', diff --git a/rules/consistent-function-scoping.js b/rules/consistent-function-scoping.js index f5578abf59..eb1195b599 100644 --- a/rules/consistent-function-scoping.js +++ b/rules/consistent-function-scoping.js @@ -196,6 +196,7 @@ const create = context => { const schema = [ { type: 'object', + additionalProperties: false, properties: { checkArrowFunctions: { type: 'boolean', diff --git a/rules/expiring-todo-comments.js b/rules/expiring-todo-comments.js index edbe686ecd..73fb1893ba 100644 --- a/rules/expiring-todo-comments.js +++ b/rules/expiring-todo-comments.js @@ -510,6 +510,7 @@ const create = context => { const schema = [ { type: 'object', + additionalProperties: false, properties: { terms: { type: 'array', @@ -530,7 +531,6 @@ const schema = [ default: false, }, }, - additionalProperties: false, }, ]; diff --git a/rules/explicit-length-check.js b/rules/explicit-length-check.js index cb8f334d8c..ecbb493b8e 100644 --- a/rules/explicit-length-check.js +++ b/rules/explicit-length-check.js @@ -185,6 +185,7 @@ function create(context) { const schema = [ { type: 'object', + additionalProperties: false, properties: { 'non-zero': { enum: [...nonZeroStyles.keys()], diff --git a/rules/import-index.js b/rules/import-index.js index 917a4047f4..4fbf66d5c7 100644 --- a/rules/import-index.js +++ b/rules/import-index.js @@ -37,13 +37,13 @@ const create = context => { const schema = [ { type: 'object', + additionalProperties: false, properties: { ignoreImports: { type: 'boolean', default: false, }, }, - additionalProperties: false, }, ]; diff --git a/rules/import-style.js b/rules/import-style.js index cc7f1b6836..855b3c289d 100644 --- a/rules/import-style.js +++ b/rules/import-style.js @@ -313,6 +313,7 @@ const schema = { items: [ { type: 'object', + additionalProperties: false, properties: { checkImport: { type: 'boolean', @@ -333,7 +334,6 @@ const schema = { $ref: '#/definitions/moduleStyles', }, }, - additionalProperties: false, }, ], definitions: { diff --git a/rules/no-array-push-push.js b/rules/no-array-push-push.js index c91750048d..562b04a16c 100644 --- a/rules/no-array-push-push.js +++ b/rules/no-array-push-push.js @@ -110,13 +110,13 @@ function create(context) { const schema = [ { type: 'object', + additionalProperties: false, properties: { ignore: { type: 'array', uniqueItems: true, }, }, - additionalProperties: false, }, ]; diff --git a/rules/no-array-reduce.js b/rules/no-array-reduce.js index 8dfc819b37..3613757951 100644 --- a/rules/no-array-reduce.js +++ b/rules/no-array-reduce.js @@ -38,6 +38,7 @@ const selector = matches([ const schema = [ { type: 'object', + additionalProperties: false, properties: { allowSimpleOperations: { type: 'boolean', diff --git a/rules/no-keyword-prefix.js b/rules/no-keyword-prefix.js index dcf3fcf18a..6eea73e1c2 100644 --- a/rules/no-keyword-prefix.js +++ b/rules/no-keyword-prefix.js @@ -167,6 +167,7 @@ const create = context => { const schema = [ { type: 'object', + additionalProperties: false, properties: { disallowedPrefixes: { type: 'array', @@ -185,7 +186,6 @@ const schema = [ type: 'boolean', }, }, - additionalProperties: false, }, ]; diff --git a/rules/no-null.js b/rules/no-null.js index 5e192df6c0..f57da95d26 100644 --- a/rules/no-null.js +++ b/rules/no-null.js @@ -93,13 +93,13 @@ const create = context => { const schema = [ { type: 'object', + additionalProperties: false, properties: { checkStrictEquality: { type: 'boolean', default: false, }, }, - additionalProperties: false, }, ]; diff --git a/rules/no-useless-undefined.js b/rules/no-useless-undefined.js index 1a3b60e053..8cc9719f37 100644 --- a/rules/no-useless-undefined.js +++ b/rules/no-useless-undefined.js @@ -190,12 +190,12 @@ const create = context => { const schema = [ { type: 'object', + additionalProperties: false, properties: { checkArguments: { type: 'boolean', }, }, - additionalProperties: false, }, ]; diff --git a/rules/numeric-separators-style.js b/rules/numeric-separators-style.js index c5106d7a22..572f5c8101 100644 --- a/rules/numeric-separators-style.js +++ b/rules/numeric-separators-style.js @@ -133,6 +133,7 @@ const create = context => { const formatOptionsSchema = ({minimumDigits, groupLength}) => ({ type: 'object', + additionalProperties: false, properties: { onlyIfContainsSeparator: { type: 'boolean', @@ -148,11 +149,11 @@ const formatOptionsSchema = ({minimumDigits, groupLength}) => ({ default: groupLength, }, }, - additionalProperties: false, }); const schema = [{ type: 'object', + additionalProperties: false, properties: { ...Object.fromEntries( Object.entries(defaultOptions).map(([type, options]) => [type, formatOptionsSchema(options)]), @@ -162,7 +163,6 @@ const schema = [{ default: false, }, }, - additionalProperties: false, }]; module.exports = { diff --git a/rules/prefer-add-event-listener.js b/rules/prefer-add-event-listener.js index a7de0a60e5..34b9fda2d5 100644 --- a/rules/prefer-add-event-listener.js +++ b/rules/prefer-add-event-listener.js @@ -157,6 +157,7 @@ const create = context => { const schema = [ { type: 'object', + additionalProperties: false, properties: { excludedPackages: { type: 'array', @@ -166,7 +167,6 @@ const schema = [ uniqueItems: true, }, }, - additionalProperties: false, }, ]; diff --git a/rules/prefer-array-flat.js b/rules/prefer-array-flat.js index 68f510d906..8711ef6396 100644 --- a/rules/prefer-array-flat.js +++ b/rules/prefer-array-flat.js @@ -234,13 +234,13 @@ function create(context) { const schema = [ { type: 'object', + additionalProperties: false, properties: { functions: { type: 'array', uniqueItems: true, }, }, - additionalProperties: false, }, ]; diff --git a/rules/prefer-at.js b/rules/prefer-at.js index 863752f4a5..7f91f46de7 100644 --- a/rules/prefer-at.js +++ b/rules/prefer-at.js @@ -284,6 +284,7 @@ function create(context) { const schema = [ { type: 'object', + additionalProperties: false, properties: { getLastElementFunctions: { type: 'array', @@ -294,7 +295,6 @@ const schema = [ default: false, }, }, - additionalProperties: false, }, ]; diff --git a/rules/prefer-node-protocol.js b/rules/prefer-node-protocol.js index df5341f92d..8ade6d9b0f 100644 --- a/rules/prefer-node-protocol.js +++ b/rules/prefer-node-protocol.js @@ -50,13 +50,13 @@ const create = context => { const schema = [ { type: 'object', + additionalProperties: false, properties: { checkRequire: { type: 'boolean', default: false, }, }, - additionalProperties: false, }, ]; diff --git a/rules/prefer-number-properties.js b/rules/prefer-number-properties.js index 782d349aa9..910bb58e7f 100644 --- a/rules/prefer-number-properties.js +++ b/rules/prefer-number-properties.js @@ -127,13 +127,13 @@ const create = context => { const schema = [ { type: 'object', + additionalProperties: false, properties: { checkInfinity: { type: 'boolean', default: true, }, }, - additionalProperties: false, }, ]; diff --git a/rules/prefer-object-from-entries.js b/rules/prefer-object-from-entries.js index 4e1174d2af..6f0e3e2c4f 100644 --- a/rules/prefer-object-from-entries.js +++ b/rules/prefer-object-from-entries.js @@ -249,13 +249,13 @@ function create(context) { const schema = [ { type: 'object', + additionalProperties: false, properties: { functions: { type: 'array', uniqueItems: true, }, }, - additionalProperties: false, }, ]; diff --git a/rules/prefer-object-has-own.js b/rules/prefer-object-has-own.js index 8a7191de3d..d1e32748b9 100644 --- a/rules/prefer-object-has-own.js +++ b/rules/prefer-object-has-own.js @@ -81,13 +81,13 @@ const create = context => { const schema = [ { type: 'object', + additionalProperties: false, properties: { functions: { type: 'array', uniqueItems: true, }, }, - additionalProperties: false, }, ]; diff --git a/rules/prefer-switch.js b/rules/prefer-switch.js index 66d8ed3e74..bcdc200d1b 100644 --- a/rules/prefer-switch.js +++ b/rules/prefer-switch.js @@ -302,6 +302,7 @@ const create = context => { const schema = [ { type: 'object', + additionalProperties: false, properties: { minimumCases: { type: 'integer', @@ -317,7 +318,6 @@ const schema = [ default: 'no-default-comment', }, }, - additionalProperties: false, }, ]; diff --git a/rules/prevent-abbreviations.js b/rules/prevent-abbreviations.js index 52ac9e921f..c9c1651566 100644 --- a/rules/prevent-abbreviations.js +++ b/rules/prevent-abbreviations.js @@ -534,6 +534,7 @@ const schema = { items: [ { type: 'object', + additionalProperties: false, properties: { checkProperties: { type: 'boolean', @@ -578,7 +579,6 @@ const schema = { uniqueItems: true, }, }, - additionalProperties: false, }, ], definitions: { diff --git a/rules/string-content.js b/rules/string-content.js index c68f1847ff..308090782a 100644 --- a/rules/string-content.js +++ b/rules/string-content.js @@ -136,6 +136,7 @@ const create = context => { const schema = [ { type: 'object', + additionalProperties: false, properties: { patterns: { type: 'object', @@ -167,7 +168,6 @@ const schema = [ ], }}, }, - additionalProperties: false, }, ]; diff --git a/rules/template-indent.js b/rules/template-indent.js index 726d263d19..28a6a50213 100644 --- a/rules/template-indent.js +++ b/rules/template-indent.js @@ -104,6 +104,7 @@ const create = context => { const schema = [ { type: 'object', + additionalProperties: false, properties: { indent: { oneOf: [ @@ -146,7 +147,6 @@ const schema = [ }, }, }, - additionalProperties: false, }, ];