From 9d2c6cb973227d5a714ddae06834b4b830123b4e Mon Sep 17 00:00:00 2001 From: Vessel9817 <151808241+Vessel9817@users.noreply.github.com> Date: Thu, 16 Jul 2026 16:29:04 -0400 Subject: [PATCH 1/8] Migrated to draft-07 Signed-off-by: Vessel9817 <151808241+Vessel9817@users.noreply.github.com> --- src/schemas/json/jscsrc.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/schemas/json/jscsrc.json b/src/schemas/json/jscsrc.json index 300d5f4bee5..9c48cef59d3 100644 --- a/src/schemas/json/jscsrc.json +++ b/src/schemas/json/jscsrc.json @@ -1,5 +1,6 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "https://json.schemastore.org/jscsrc.json", "additionalProperties": true, "definitions": { "blockKeywords": { @@ -461,7 +462,6 @@ "uniqueItems": true } }, - "id": "https://json.schemastore.org/jscsrc.json", "properties": { "additionalRules": { "description": "Path to load additional rules", From 7a8687d1da469025ee3a81a761a4ad1cd3fedc83 Mon Sep 17 00:00:00 2001 From: Vessel9817 <151808241+Vessel9817@users.noreply.github.com> Date: Thu, 16 Jul 2026 16:44:08 -0400 Subject: [PATCH 2/8] Replaced single-element enums with constants Signed-off-by: Vessel9817 <151808241+Vessel9817@users.noreply.github.com> --- src/schemas/json/jscsrc.json | 174 +++++++++++++++++------------------ 1 file changed, 87 insertions(+), 87 deletions(-) diff --git a/src/schemas/json/jscsrc.json b/src/schemas/json/jscsrc.json index 9c48cef59d3..7a6ee68a171 100644 --- a/src/schemas/json/jscsrc.json +++ b/src/schemas/json/jscsrc.json @@ -125,15 +125,15 @@ "oneOf": [ { "description": "https://github.com/google/closure-compiler", - "enum": ["closurecompiler"] + "const": "closurecompiler" }, { "description": "https://github.com/jsdoc3/jsdoc", - "enum": ["jsdoc3"] + "const": "jsdoc3" }, { "description": "https://github.com/senchalabs/jsduck", - "enum": ["jsduck5"] + "const": "jsduck5" } ] }, @@ -157,15 +157,15 @@ "oneOf": [ { "description": "https://github.com/google/closure-compiler", - "enum": ["closurecompiler"] + "const": "closurecompiler" }, { "description": "https://github.com/jsdoc3/jsdoc", - "enum": ["jsdoc3"] + "const": "jsdoc3" }, { "description": "https://github.com/senchalabs/jsduck", - "enum": ["jsduck5"] + "const": "jsduck5" } ] } @@ -215,11 +215,11 @@ "oneOf": [ { "description": "The strictNativeCase mode checks that case of natives is the same as in this list: boolean, number, string, Object, Array, Date, RegExp.", - "enum": ["strictNativeCase"] + "const": "strictNativeCase" }, { "description": "The capitalizedNativeCase mode checks that the first letter in all native types and primitives is uppercased except the case with function in google closure format: {function(...)}.", - "enum": ["capitalizedNativeCase"] + "const": "capitalizedNativeCase" } ] } @@ -240,11 +240,11 @@ "oneOf": [ { "description": "If an @access tag is specified, the function name must contain a leading _underscore.", - "enum": ["enforceLeadingUnderscore"] + "const": "enforceLeadingUnderscore" }, { "description": "If an @access tag is specified, the function name must contain a trailing underscore_.", - "enum": ["enforceTrailingUnderscore"] + "const": "enforceTrailingUnderscore" } ] } @@ -266,11 +266,11 @@ "oneOf": [ { "description": "Enforce only @private for all _underscored function names.", - "enum": ["private"] + "const": "private" }, { "description": "Enforce only @protected for all _underscored function names.", - "enum": ["protected"] + "const": "protected" } ] } @@ -299,15 +299,15 @@ "oneOf": [ { "description": "Skip expression functions.", - "enum": ["expressions"] + "const": "expressions" }, { "description": "Skip module.exports = function () {};", - "enum": ["exports"] + "const": "exports" }, { "description": "Functions without parameters and with empty return statements will be skipped.", - "enum": ["paramless-procedures"] + "const": "paramless-procedures" } ] }, @@ -321,7 +321,7 @@ "oneOf": [ { "description": "Skip expression functions.", - "enum": ["exceptExports"] + "const": "exceptExports" } ] } @@ -503,7 +503,7 @@ "type": "array", "minItems": 0, "items": { - "enum": ["function"] + "const": "function" }, "uniqueItems": true } @@ -567,7 +567,7 @@ "type": "array", "minItems": 0, "items": { - "enum": ["comments"] + "const": "comments" }, "uniqueItems": true } @@ -717,11 +717,11 @@ "oneOf": [ { "description": "Allows declarations where all variables are importing external modules with require.", - "enum": ["require"] + "const": "require" }, { "description": "Allows declarations where all variables are not defined.", - "enum": ["undefined"] + "const": "undefined" } ] }, @@ -789,7 +789,7 @@ "type": "string" }, { - "enum": ["multiline"] + "const": "multiline" } ] }, @@ -928,7 +928,7 @@ }, { "description": "Allows ES3+ reserved words to remain quoted which is helpful when using this option with JSHint's es3 flag.", - "enum": ["reserved"] + "const": "reserved" } ] }, @@ -941,7 +941,7 @@ "type": "string", "oneOf": [ { - "enum": ["allButReserved"] + "const": "allButReserved" } ] } @@ -988,7 +988,7 @@ "oneOf": [ { "description": "Allow spaces in place of absent values in sparse arrays.", - "enum": ["sparseArrays"] + "const": "sparseArrays" } ] }, @@ -1034,19 +1034,19 @@ "oneOf": [ { "description": "Ignores objects if the object only takes up a single line.", - "enum": ["singleline"] + "const": "singleline" }, { "description": "Ignores objects if the object takes up multiple lines.", - "enum": ["multiline"] + "const": "multiline" }, { "description": "Ignores aligned object properties.", - "enum": ["aligned"] + "const": "aligned" }, { "description": "Ignores method declarations.", - "enum": ["method"] + "const": "method" } ] }, @@ -1060,11 +1060,11 @@ "oneOf": [ { "description": "Ignores objects if the object only takes up a single line.", - "enum": ["ignoreSingleLine"] + "const": "ignoreSingleLine" }, { "description": "Ignores objects if the object takes up multiple lines.", - "enum": ["ignoreMultiLine"] + "const": "ignoreMultiLine" } ] } @@ -1116,7 +1116,7 @@ "oneOf": [ { "description": "Allow spaces in place of absent values in sparse arrays.", - "enum": ["sparseArrays"] + "const": "sparseArrays" } ] }, @@ -1130,7 +1130,7 @@ "oneOf": [ { "description": "Skip expression functions.", - "enum": ["exceptExports"] + "const": "exceptExports" } ] } @@ -1181,7 +1181,7 @@ "type": "string", "anyOf": [ { - "enum": ["("] + "const": "(" }, { "type": "string", @@ -1343,7 +1343,7 @@ "type": "string", "oneOf": [ { - "enum": ["nested"] + "const": "nested" } ] } @@ -1421,7 +1421,7 @@ "type": "string", "oneOf": [ { - "enum": ["nested"] + "const": "nested" } ] } @@ -1615,23 +1615,23 @@ "anyOf": [ { "description": "Allows comments to break the rule.", - "enum": ["comments"] + "const": "comments" }, { "description": "Allows function definitions to break the rule.", - "enum": ["functionSignature"] + "const": "functionSignature" }, { "description": "Allows regular expression literals to break the rule.", - "enum": ["regex"] + "const": "regex" }, { "description": "Allows require expressions to break the rule.", - "enum": ["require"] + "const": "require" }, { "description": "Allows comments with long urls to break the rule.", - "enum": ["urlComments"] + "const": "urlComments" } ] }, @@ -1676,7 +1676,7 @@ "anyOf": [ { "description": "Allows comments to break the rule.", - "enum": ["comments"] + "const": "comments" } ] }, @@ -1727,7 +1727,7 @@ { "description": "Use `firstParam` to require parameters on a new line to be aligned with the first parameter(s) on the previous line.", "type": "string", - "enum": ["firstParam"] + "const": "firstParam" } ] }, @@ -1743,15 +1743,15 @@ "oneOf": [ { "description": "Use for strict mode.", - "enum": ["all"] + "const": "all" }, { "description": "Ignores objects if one of the property values is a function expression.", - "enum": ["ignoreFunction"] + "const": "ignoreFunction" }, { "description": "Ignores objects if there are line breaks between properties.", - "enum": ["ignoreLineBreak"] + "const": "ignoreLineBreak" } ] } @@ -1779,7 +1779,7 @@ "anyOf": [ { "description": "Ignores function declarations.", - "enum": ["declarations"] + "const": "declarations" } ] }, @@ -1911,7 +1911,7 @@ "type": "string", "oneOf": [ { - "enum": ["ignoreProperties"] + "const": "ignoreProperties" } ] } @@ -2095,11 +2095,11 @@ "oneOf": [ { "description": "Allow quoted identifiers made of reserved words.", - "enum": ["keywords"] + "const": "keywords" }, { "description": "Allow quoted snake cased identifiers.", - "enum": ["snake_case"] + "const": "snake_case" } ] }, @@ -2113,7 +2113,7 @@ "oneOf": [ { "description": "Allow quoted snake cased identifiers.", - "enum": ["except_snake_case"] + "const": "except_snake_case" } ] } @@ -2258,7 +2258,7 @@ "oneOf": [ { "description": "`require` statements are allowed to have a var declaration per variable.", - "enum": ["require"] + "const": "require" } ] }, @@ -2271,7 +2271,7 @@ "oneOf": [ { "description": "If equal to 'onevar', requireMultipleVarDecl will allow only one var per function scope.", - "enum": ["onevar"] + "const": "onevar" } ] } @@ -2360,7 +2360,7 @@ "oneOf": [ { "description": "Ignores the rule if all the keys and values are on the same line.", - "enum": ["sameLine"] + "const": "sameLine" } ] }, @@ -2415,19 +2415,19 @@ "oneOf": [ { "description": "Blocks don't need a line of padding in function argument lists.", - "enum": ["inCallExpressions"] + "const": "inCallExpressions" }, { "description": "Blocks don't need a line of padding in constructor argument lists.", - "enum": ["inNewExpressions"] + "const": "inNewExpressions" }, { "description": "Blocks don't need a line of padding in arrays.", - "enum": ["inArrayExpressions"] + "const": "inArrayExpressions" }, { "description": "Blocks don't need a line of padding as object properties.", - "enum": ["inProperties"] + "const": "inProperties" } ] }, @@ -2461,7 +2461,7 @@ "oneOf": [ { "description": "Allows 'require' statements to occur immediately after 'use strict'.", - "enum": ["require"] + "const": "require" } ] }, @@ -2516,7 +2516,7 @@ "oneOf": [ { "description": "Comments may be first line of block without extra padding.", - "enum": ["firstAfterCurly"] + "const": "firstAfterCurly" } ] }, @@ -2562,11 +2562,11 @@ "oneOf": [ { "description": "Ignores conditional (if, else if, else) blocks.", - "enum": ["conditionals"] + "const": "conditionals" }, { "description": "Ignores function blocks.", - "enum": ["functions"] + "const": "functions" } ] }, @@ -2681,7 +2681,7 @@ "oneOf": [ { "description": "Ignore trailing commas.", - "enum": ["trailing"] + "const": "trailing" } ] }, @@ -2730,7 +2730,7 @@ "type": "string", "oneOf": [ { - "enum": ["allowSlash"] + "const": "allowSlash" } ] } @@ -2895,7 +2895,7 @@ "oneOf": [ { "description": "If \"shorthand\" is provided, spaces will not be required for ES6 method definitions.", - "enum": ["shorthand"] + "const": "shorthand" } ] }, @@ -3052,11 +3052,11 @@ "oneOf": [ { "description": "Strict mode.", - "enum": ["all"] + "const": "all" }, { "description": "Deprecated in favor of the object \"allExcept\": [\"[\", \"]\"] format.", - "enum": ["allButNested"] + "const": "allButNested" } ] } @@ -3127,11 +3127,11 @@ "oneOf": [ { "description": "Strict mode.", - "enum": ["all"] + "const": "all" }, { "description": "Deprecated in favor of the object \"allExcept\": [\"}\"] format.", - "enum": ["allButNested"] + "const": "allButNested" } ] } @@ -3179,11 +3179,11 @@ "oneOf": [ { "description": "Strict mode.", - "enum": ["all"] + "const": "all" }, { "description": "Deprecated in favor of the object \"except\": [\"(\", \")\"] format. Ignores nested brackets in a row.", - "enum": ["allButNested"] + "const": "allButNested" } ] } @@ -3259,7 +3259,7 @@ "oneOf": [ { "description": "Ignores strings concatenated with other strings.", - "enum": ["stringConcatenation"] + "const": "stringConcatenation" } ] }, @@ -3446,11 +3446,11 @@ "oneOf": [ { "description": "Ignores comments.", - "enum": ["comments"] + "const": "comments" }, { "description": "Ignores empty lines, included by default.", - "enum": ["emptyLines"] + "const": "emptyLines" } ] }, @@ -3535,27 +3535,27 @@ "oneOf": [ { "description": "Requires sorting in ascending order.", - "enum": ["asc"] + "const": "asc" }, { "description": "Requires sorting in ascending order (case-insensitive).", - "enum": ["asc-insensitive"] + "const": "asc-insensitive" }, { "description": "Requires sorting in ascending natural order.", - "enum": ["asc-natural"] + "const": "asc-natural" }, { "description": "Requires sorting in descending order.", - "enum": ["desc"] + "const": "desc" }, { "description": "Requires sorting in descending order (case-insensitive).", - "enum": ["desc-insensitive"] + "const": "desc-insensitive" }, { "description": "Requires sorting in descending natural order.", - "enum": ["desc-natural"] + "const": "desc-natural" } ] } @@ -3573,19 +3573,19 @@ "oneOf": [ { "description": "Function parameters are immediately followed by a comma.", - "enum": [","] + "const": "," }, { "description": "Function parameters are immediately followed by a comma and then a space.", - "enum": [", "] + "const": ", " }, { "description": "Function parameters are immediately followed by a space and then a comma.", - "enum": [" ,"] + "const": " ," }, { "description": "Function parameters are immediately followed by a space, a comma, and then a space.", - "enum": [" , "] + "const": " , " } ] } @@ -3615,11 +3615,11 @@ "oneOf": [ { "description": "All strings require double quotes.", - "enum": [""] + "const": "\"" }, { "description": "All strings require single quotes.", - "enum": [""] + "const": "'" } ] }, @@ -3635,11 +3635,11 @@ "oneOf": [ { "description": "All strings require double quotes.", - "enum": ["\""] + "const": "\"" }, { "description": "All strings require single quotes.", - "enum": ["'"] + "const": "'" } ] } From 8a0ce00bc369f84fdd4547d57f48f6b71d30251b Mon Sep 17 00:00:00 2001 From: Vessel9817 <151808241+Vessel9817@users.noreply.github.com> Date: Thu, 16 Jul 2026 16:57:58 -0400 Subject: [PATCH 3/8] Replaced nullish array type unions with stricter equivalents Signed-off-by: Vessel9817 <151808241+Vessel9817@users.noreply.github.com> --- src/schemas/json/jscsrc.json | 307 ++++++++++++++++++----------------- 1 file changed, 157 insertions(+), 150 deletions(-) diff --git a/src/schemas/json/jscsrc.json b/src/schemas/json/jscsrc.json index 7a6ee68a171..ceaebdaf8c4 100644 --- a/src/schemas/json/jscsrc.json +++ b/src/schemas/json/jscsrc.json @@ -4,21 +4,28 @@ "additionalProperties": true, "definitions": { "blockKeywords": { - "type": ["array", "null"], - "items": { - "enum": [ - "catch", - "do", - "else", - "finally", - "for", - "function", - "if", - "try", - "while" - ] - }, - "uniqueItems": true + "anyOf": [ + { + "type": "array", + "items": { + "enum": [ + "catch", + "do", + "else", + "finally", + "for", + "function", + "if", + "try", + "while" + ] + }, + "uniqueItems": true + }, + { + "type": "null" + } + ] }, "braceRules": { "type": ["null", "object"], @@ -32,74 +39,81 @@ } }, "esprimaNodeTypes": { - "type": ["array", "null"], - "items": { - "enum": [ - "ArrayExpression", - "ArrayPattern", - "ArrowFunctionExpression", - "AssignmentExpression", - "AssignmentPattern", - "BinaryExpression", - "BlockStatement", - "BreakStatement", - "CallExpression", - "CatchClause", - "ClassBody", - "ClassDeclaration", - "ClassExpression", - "ConditionalExpression", - "ContinueStatement", - "DebuggerStatement", - "DoWhileStatement", - "EmptyStatement", - "ExportAllDeclaration", - "ExportDefaultDeclaration", - "ExportNamedDeclaration", - "ExportSpecifier", - "ExpressionStatement", - "ForInStatement", - "ForStatement", - "FunctionDeclaration", - "FunctionExpression", - "Identifier", - "IfStatement", - "ImportDeclaration", - "ImportDefaultSpecifier", - "ImportNamespaceSpecifier", - "ImportSpecifier", - "LabeledStatement", - "Literal", - "LogicalExpression", - "MemberExpression", - "MethodDefinition", - "NewExpression", - "ObjectExpression", - "ObjectPattern", - "Program", - "Property", - "RestElement", - "ReturnStatement", - "SequenceExpression", - "SpreadElement", - "Super", - "SwitchCase", - "SwitchStatement", - "TaggedTemplateExpression", - "TemplateElement", - "TemplateLiteral", - "ThisExpression", - "ThrowStatement", - "TryStatement", - "UnaryExpression", - "UpdateExpression", - "VariableDeclaration", - "VariableDeclarator", - "WhileStatement", - "WithStatement" - ] - }, - "uniqueItems": true + "anyOf": [ + { + "type": "array", + "items": { + "enum": [ + "ArrayExpression", + "ArrayPattern", + "ArrowFunctionExpression", + "AssignmentExpression", + "AssignmentPattern", + "BinaryExpression", + "BlockStatement", + "BreakStatement", + "CallExpression", + "CatchClause", + "ClassBody", + "ClassDeclaration", + "ClassExpression", + "ConditionalExpression", + "ContinueStatement", + "DebuggerStatement", + "DoWhileStatement", + "EmptyStatement", + "ExportAllDeclaration", + "ExportDefaultDeclaration", + "ExportNamedDeclaration", + "ExportSpecifier", + "ExpressionStatement", + "ForInStatement", + "ForStatement", + "FunctionDeclaration", + "FunctionExpression", + "Identifier", + "IfStatement", + "ImportDeclaration", + "ImportDefaultSpecifier", + "ImportNamespaceSpecifier", + "ImportSpecifier", + "LabeledStatement", + "Literal", + "LogicalExpression", + "MemberExpression", + "MethodDefinition", + "NewExpression", + "ObjectExpression", + "ObjectPattern", + "Program", + "Property", + "RestElement", + "ReturnStatement", + "SequenceExpression", + "SpreadElement", + "Super", + "SwitchCase", + "SwitchStatement", + "TaggedTemplateExpression", + "TemplateElement", + "TemplateLiteral", + "ThisExpression", + "ThrowStatement", + "TryStatement", + "UnaryExpression", + "UpdateExpression", + "VariableDeclaration", + "VariableDeclarator", + "WhileStatement", + "WithStatement" + ] + }, + "uniqueItems": true + }, + { + "type": "null" + } + ] }, "jsDoc": { "description": "Validate jsdoc comments.", @@ -354,38 +368,45 @@ } }, "keywords": { - "type": ["array", "null"], - "items": { - "enum": [ - "break", - "case", - "catch", - "continue", - "debugger", - "default", - "delete", - "do", - "else", - "finally", - "for", - "function", - "if", - "in", - "instanceof", - "new", - "return", - "switch", - "this", - "throw", - "try", - "typeof", - "var", - "void", - "while", - "with" - ] - }, - "uniqueItems": true + "anyOf": [ + { + "type": "array", + "items": { + "enum": [ + "break", + "case", + "catch", + "continue", + "debugger", + "default", + "delete", + "do", + "else", + "finally", + "for", + "function", + "if", + "in", + "instanceof", + "new", + "return", + "switch", + "this", + "throw", + "try", + "typeof", + "var", + "void", + "while", + "with" + ] + }, + "uniqueItems": true + }, + { + "type": "null" + } + ] }, "keywords2": { "type": ["array", "boolean", "null"], @@ -585,7 +606,6 @@ }, "disallowIdentifierNames": { "description": "Disallows a specified set of identifier names.", - "type": ["array", "null"], "oneOf": [ { "description": "An array of strings, which should be disallowed as identifier names.", @@ -602,12 +622,19 @@ ] }, "disallowImplicitTypeConversion": { - "description": "Disallows implicit type conversion.", - "type": ["array", "null"], - "items": { - "enum": ["numeric", "boolean", "binary", "string"] - }, - "uniqueItems": true + "anyOf": [ + { + "type": "array", + "items": { + "enum": ["numeric", "boolean", "binary", "string"] + }, + "uniqueItems": true + }, + { + "type": "null" + } + ], + "description": "Disallows implicit type conversion." }, "disallowKeywordsInComments": { "description": "Disallows one or more keywords in comments.", @@ -636,22 +663,12 @@ ] }, "disallowKeywordsOnNewLine": { - "description": "Disallows placing the specified keywords on a new line.", - "type": ["array", "null"], - "oneOf": [ - { - "$ref": "#/definitions/keywords" - } - ] + "$ref": "#/definitions/keywords", + "description": "Disallows placing the specified keywords on a new line." }, "disallowKeywords": { - "description": "Disallows usage of the specified keywords.", - "type": ["array", "null"], - "oneOf": [ - { - "$ref": "#/definitions/keywords" - } - ] + "$ref": "#/definitions/keywords", + "description": "Disallows usage of the specified keywords." }, "disallowMixedSpacesAndTabs": { "description": "Requires lines to not contain both spaces and tabs consecutively, or spaces after tabs only for alignment if \"smart", @@ -800,13 +817,8 @@ ] }, "disallowNodeTypes": { - "description": "Disallow use of certain node types (from Esprima/ESTree). Value equals an array of parser node types to be disallowed.", - "type": ["array", "null"], - "oneOf": [ - { - "$ref": "#/definitions/esprimaNodeTypes" - } - ] + "$ref": "#/definitions/esprimaNodeTypes", + "description": "Disallow use of certain node types (from Esprima/ESTree). Value equals an array of parser node types to be disallowed." }, "disallowNotOperatorsInConditionals": { "description": "Disallows the not, not equals, and strict not equals operators in conditionals.", @@ -2169,13 +2181,8 @@ ] }, "requireKeywordsOnNewLine": { - "description": "Requires placing the specified keywords on a new line.", - "type": ["array", "null"], - "oneOf": [ - { - "$ref": "#/definitions/keywords" - } - ] + "$ref": "#/definitions/keywords", + "description": "Requires placing the specified keywords on a new line." }, "requireLineBreakAfterVariableAssignment": { "description": "Requires placing line feed after assigning a variable.", From 00259e4e7011fc924af7c1424b48ba3698b5c7df Mon Sep 17 00:00:00 2001 From: Vessel9817 <151808241+Vessel9817@users.noreply.github.com> Date: Thu, 16 Jul 2026 17:01:36 -0400 Subject: [PATCH 4/8] Replaced nullish boolean type unions with stricter equivalents Signed-off-by: Vessel9817 <151808241+Vessel9817@users.noreply.github.com> --- src/schemas/json/jscsrc.json | 420 ++++++++++++++++++++++++++++------- 1 file changed, 344 insertions(+), 76 deletions(-) diff --git a/src/schemas/json/jscsrc.json b/src/schemas/json/jscsrc.json index ceaebdaf8c4..b424616daaa 100644 --- a/src/schemas/json/jscsrc.json +++ b/src/schemas/json/jscsrc.json @@ -31,10 +31,24 @@ "type": ["null", "object"], "properties": { "beforeOpeningRoundBrace": { - "type": ["boolean", "null"] + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ] }, "beforeOpeningCurlyBrace": { - "type": ["boolean", "null"] + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ] } } }, @@ -187,31 +201,80 @@ }, "checkParamExistence": { "description": "Checks whether all parameters are documented.", - "type": ["boolean", "null"] + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ] }, "checkParamNames": { "description": "Checks whether param names in jsdoc and in function declaration are equal.", - "type": ["boolean", "null"] + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ] }, "requireParamTypes": { "description": "Checks whether params in jsdoc contains type.", - "type": ["boolean", "null"] + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ] }, "checkRedundantParams": { "description": "Reports redundant params in jsdoc.", - "type": ["boolean", "null"] + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ] }, "checkReturnTypes": { "description": "Checks for differences between the jsdoc and actual return types if both exist.", - "type": ["boolean", "null"] + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ] }, "checkRedundantReturns": { "description": "Report statements for functions without a return, which are described with an @return tag.", - "type": ["boolean", "null"] + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ] }, "requireReturnTypes": { "description": "Checks whether @returns in jsdoc contains type.", - "type": ["boolean", "null"] + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ] }, "checkTypes": { "description": "Reports invalid types for bunch of tags.", @@ -343,27 +406,69 @@ }, "requireHyphenBeforeDescription": { "description": "Checks whether a jsdoc param description has a hyphen before it (checks for -).", - "type": ["boolean", "null"] + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ] }, "requireNewlineAfterDescription": { "description": "Checks whether a jsdoc comment description has a padding (trailing) newline separator between it and additional @tags.", - "type": ["boolean", "null"] + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ] }, "disallowNewlineAfterDescription": { "description": "Checks whether a jsdoc comment description has no padding (trailing) newline separator between it and additional @tags.", - "type": ["boolean", "null"] + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ] }, "requireDescriptionCompleteSentence": { "description": "Checks whether a jsdoc comment description is a complete sentence. A complete sentence is defined as starting with an upper case letter and ending with a period.", - "type": ["boolean", "null"] + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ] }, "requireParamDescription": { "description": "Checks whether a jsdoc param description exists.", - "type": ["boolean", "null"] + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ] }, "requireReturnDescription": { "description": "Checks whether a jsdoc return description exists.", - "type": ["boolean", "null"] + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ] } } }, @@ -494,15 +599,36 @@ }, "disallowAnonymousFunctions": { "description": "Requires that a function expression be named. Named functions provide more information in the error stack trace than anonymous functions. This option does not help if you use Arrow functions (ES6) which are always anonymous.", - "type": ["boolean", "null"] + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ] }, "disallowArrowFunctions": { "description": "Disallows arrow functions.", - "type": ["boolean", "null"] + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ] }, "disallowCapitalizedComments": { "description": "Requires the first alphabetical character of a comment to be lowercase.", - "type": ["boolean", "null"] + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ] }, "disallowCommaBeforeLineBreak": { "description": "Disallows commas as last token on a line in lists.", @@ -598,11 +724,25 @@ }, "disallowFunctionDeclarations": { "description": "Disallows function declarations.", - "type": ["boolean", "null"] + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ] }, "disallowIdenticalDestructuringNames": { "description": "Disallows identical destructuring names for the key and value in favor of using shorthand destructuring.", - "type": ["boolean", "null"] + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ] }, "disallowIdentifierNames": { "description": "Disallows a specified set of identifier names.", @@ -677,15 +817,36 @@ }, "disallowMultiLineTernary": { "description": "Disallows the test, consequent and alternate to be on separate lines when using the ternary operator.", - "type": ["boolean", "null"] + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ] }, "disallowMultipleLineBreaks": { "description": "Disallows multiple blank lines in a row.", - "type": ["boolean", "null"] + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ] }, "disallowMultipleLineStrings": { "description": "Disallows strings that span multiple lines without using concatenation.", - "type": ["boolean", "null"] + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ] }, "disallowMultipleSpaces": { "description": "Disallows multiple indentation characters (tabs or spaces) between identifiers, keywords, and any other token.", @@ -702,7 +863,14 @@ "type": "object", "properties": { "allowEOLComments": { - "type": ["boolean", "null"] + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ] } } } @@ -723,7 +891,14 @@ "type": "object", "properties": { "strict": { - "type": ["boolean", "null"] + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ] }, "allExcept": { "description": "Array of quoted keywords to exempt.", @@ -750,7 +925,14 @@ }, "disallowNamedUnassignedFunctions": { "description": "Disallows unassigned functions to be named inline.", - "type": ["boolean", "null"] + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ] }, "disallowNestedTernaries": { "description": "Disallows nested ternaries.", @@ -822,11 +1004,25 @@ }, "disallowNotOperatorsInConditionals": { "description": "Disallows the not, not equals, and strict not equals operators in conditionals.", - "type": ["boolean", "null"] + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ] }, "disallowObjectKeysOnNewLine": { "description": "Disallows placing object keys on new line.", - "type": ["boolean", "null"] + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ] }, "disallowOperatorBeforeLineBreak": { "description": "Requires putting certain operators on the next line rather than on the current line before a line break.", @@ -839,15 +1035,36 @@ }, "disallowPaddingNewLinesAfterBlocks": { "description": "Disallow a newline after blocks.", - "type": ["boolean", "null"] + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ] }, "disallowPaddingNewLinesAfterUseStrict": { "description": "Disallow a blank line after 'use strict'; statements.", - "type": ["boolean", "null"] + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ] }, "disallowPaddingNewLinesBeforeExport": { "description": "Disallows newline before module.exports.", - "type": ["boolean", "null"] + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ] }, "disallowPaddingNewlinesBeforeKeywords": { "description": "Disallow an empty line above the specified keywords.", @@ -860,7 +1077,6 @@ }, "disallowPaddingNewLinesBeforeLineComments": { "description": "Disallows newline before line comments.", - "type": ["boolean", "null"], "oneOf": [ { "type": "boolean" @@ -908,11 +1124,25 @@ }, "disallowPaddingNewLinesInObjects": { "description": "Disallows newlines adjacent to curly braces in all object literals.", - "type": ["boolean", "null"] + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ] }, "disallowParenthesesAroundArrowParam": { "description": "Disallows parentheses around arrow function expressions that contain a single parameter.", - "type": ["boolean", "null"] + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ] }, "disallowQuotedKeysInObjects": { "description": "Disallows quoted keys in object if possible.", @@ -961,11 +1191,25 @@ }, "disallowSemicolons": { "description": "Disallows lines from ending in a semicolon.", - "type": ["boolean", "null"] + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ] }, "disallowShorthandArrowFunctions": { "description": "Require arrow functions to use a block statement (explicit return).", - "type": ["boolean", "null"] + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ] }, "disallowSpaceAfterBinaryOperators": { "description": "Requires sticking binary operators to the right.", @@ -1021,7 +1265,14 @@ }, "disallowSpaceAfterLineComment": { "description": "Requires that a line comment (//) not be followed by a space.", - "type": ["boolean", "null"] + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ] }, "disallowSpaceAfterObjectKeys": { "description": "Disallows space after object keys.", @@ -1102,7 +1353,14 @@ }, "disallowSpaceBeforeBlockStatements": { "description": "Disallows space before block statements (for loops, control structures).", - "type": ["boolean", "null"] + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ] }, "disallowSpaceBeforeComma": { "description": "Disallows spaces before commas.", @@ -1159,7 +1417,14 @@ }, "disallowSpaceBeforeObjectValues": { "description": "Disallows space before object values.", - "type": ["boolean", "null"] + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ] }, "disallowSpaceBeforePostfixUnaryOperators": { "description": "Requires sticking unary operators to the left.", @@ -1209,7 +1474,14 @@ }, "disallowSpaceBetweenArguments": { "description": "Ensure there are no spaces after argument separators in call expressions.", - "type": ["boolean", "null"] + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ] }, "disallowSpacesInAnonymousFunctionExpression": { "description": "Disallows space before () or {} in anonymous function expressions.", @@ -1222,7 +1494,14 @@ }, "disallowSpacesInCallExpression": { "description": "Disallows space before () in call expressions.", - "type": ["boolean", "null"] + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ] }, "disallowSpacesInConditionalExpression": { "description": "Disallows space before and/or after ? or : in conditional expressions.", @@ -1256,7 +1535,14 @@ }, "disallowSpacesInForStatement": { "description": "Disallow spaces in between for statement.", - "type": ["boolean", "null"] + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ] }, "disallowSpacesInFunction": { "description": "Disallows space before `()` or `{}` in function expressions (both named and anonymous) and function declarations.", @@ -1512,7 +1798,6 @@ }, "disallowSpacesInsideTemplateStringPlaceholders": { "description": "Disallows spaces before and after curly brace inside template string placeholders.", - "type": ["boolean", "null"], "oneOf": [ { "type": "boolean" @@ -1524,7 +1809,6 @@ }, "disallowTabs": { "description": "Disallows tabs everywhere.", - "type": ["boolean", "null"], "oneOf": [ { "type": "boolean" @@ -1536,7 +1820,6 @@ }, "disallowTrailingComma": { "description": "Disallows an extra comma following the final element of an array or object literal.", - "type": ["boolean", "null"], "oneOf": [ { "type": "boolean" @@ -1562,7 +1845,6 @@ }, "disallowUnusedParams": { "description": "Disallows unused params in function expression and function declaration.", - "type": ["boolean", "null"], "oneOf": [ { "type": "boolean" @@ -1803,7 +2085,6 @@ }, "requireArrayDestructuring": { "description": "Requires that variable assignment from array values are * destructured.", - "type": ["boolean", "null"], "oneOf": [ { "type": "boolean" @@ -1815,7 +2096,6 @@ }, "requireArrowFunctions": { "description": "Requires that arrow functions are used instead of anonymous function expressions in callbacks.", - "type": ["boolean", "null"], "oneOf": [ { "type": "boolean" @@ -2028,7 +2308,6 @@ }, "requireCommaBeforeLineBreak": { "description": "Requires commas as last token on a line in lists.", - "type": ["boolean", "null"], "oneOf": [ { "type": "boolean" @@ -2133,7 +2412,6 @@ }, "requireEarlyReturn": { "description": "Requires early return in a function.", - "type": ["boolean", "null"], "oneOf": [ { "description": "If true, disallow the use of `else` if the corresponding parent `if` block contains a return.", @@ -2146,7 +2424,6 @@ }, "requireEnhancedObjectLiterals": { "description": "Requires declaring objects via ES6 enhanced object literals.", - "type": ["boolean", "null"], "oneOf": [ { "type": "boolean" @@ -2158,7 +2435,6 @@ }, "requireFunctionDeclarations": { "description": "Requires function declarations by disallowing assignment of functions expressions to variables. Function expressions are allowed in all other contexts, including when passed as function arguments or immediately invoked. Assignment of function expressions to object members is also permitted, since these can't be declared.", - "type": ["boolean", "null"], "oneOf": [ { "type": "boolean" @@ -2170,7 +2446,6 @@ }, "requireImportAlphabetized": { "description": "Requires imports to be alphabetized (A-Z).", - "type": ["boolean", "null"], "oneOf": [ { "type": "boolean" @@ -2186,7 +2461,6 @@ }, "requireLineBreakAfterVariableAssignment": { "description": "Requires placing line feed after assigning a variable.", - "type": ["boolean", "null"], "oneOf": [ { "type": "boolean" @@ -2198,7 +2472,6 @@ }, "requireLineFeedAtFileEnd": { "description": "Requires placing line feed at file end.", - "type": ["boolean", "null"], "oneOf": [ { "type": "boolean" @@ -2231,7 +2504,6 @@ }, "requireMultiLineTernary": { "description": "Requires the test, consequent and alternate to be on separate lines when using the ternary operator.", - "type": ["boolean", "null"], "oneOf": [ { "type": "boolean" @@ -2322,7 +2594,6 @@ }, "requireNumericLiterals": { "description": "Requires use of binary, hexadecimal, and octal literals instead of parseInt.", - "type": ["boolean", "null"], "oneOf": [ { "type": "boolean" @@ -2334,7 +2605,6 @@ }, "requireObjectDestructuring": { "description": "Requires variable declarations from objects via destructuring.", - "type": ["boolean", "null"], "oneOf": [ { "type": "boolean" @@ -2388,7 +2658,6 @@ }, "requirePaddingNewLineAfterVariableDeclaration": { "description": "Requires an extra blank newline after var declarations, as long as it is not the last expression in the current block.", - "type": ["boolean", "null"], "oneOf": [ { "type": "boolean" @@ -2480,7 +2749,6 @@ }, "requirePaddingNewLinesBeforeExport": { "description": "Requires newline before module.exports.", - "type": ["boolean", "null"], "oneOf": [ { "type": "boolean" @@ -2585,7 +2853,6 @@ }, "requirePaddingNewLinesInObjects": { "description": "Requires newline inside curly braces of all objects.", - "type": ["boolean", "null"], "oneOf": [ { "type": "boolean" @@ -2597,7 +2864,6 @@ }, "requireParenthesesAroundArrowParam": { "description": "Requires parentheses around arrow function expressions with a single parameter.", - "type": ["boolean", "null"], "oneOf": [ { "type": "boolean" @@ -2609,7 +2875,6 @@ }, "requireParenthesesAroundIIFE": { "description": "Requires parentheses around immediately invoked function expressions.", - "type": ["boolean", "null"], "oneOf": [ { "type": "boolean" @@ -2621,7 +2886,6 @@ }, "requireQuotedKeysInObjects": { "description": "Requires quoted keys in objects.", - "type": ["boolean", "null"], "oneOf": [ { "type": "boolean" @@ -2633,7 +2897,6 @@ }, "requireSemicolons": { "description": "Requires semicolon after: var declaration, expression statement, return, throw, break, continue, do-while.", - "type": ["boolean", "null"], "oneOf": [ { "type": "boolean" @@ -2645,7 +2908,6 @@ }, "requireShorthandArrowFunctions": { "description": "Require arrow functions to use an expression body when returning a single statement (no block statement, implicit return).", - "type": ["boolean", "null"], "oneOf": [ { "type": "boolean" @@ -2745,7 +3007,6 @@ }, "requireSpaceAfterObjectKeys": { "description": "Requires space after object keys.", - "type": ["boolean", "null"], "oneOf": [ { "type": "boolean" @@ -2793,7 +3054,6 @@ }, "requireSpaceBeforeComma": { "description": "Requires a space before a comma.", - "type": ["boolean", "null"], "oneOf": [ { "description": "If true, require a space before any comma.", @@ -2837,7 +3097,6 @@ }, "requireSpaceBeforeObjectValues": { "description": "Requires space after object keys.", - "type": ["boolean", "null"], "oneOf": [ { "type": "boolean" @@ -2858,7 +3117,6 @@ }, "requireSpaceBetweenArguments": { "description": "Ensure there are spaces after argument separators in call expressions.", - "type": ["boolean", "null"], "oneOf": [ { "type": "boolean" @@ -2877,10 +3135,24 @@ "type": "object", "properties": { "beforeOpeningRoundBrace": { - "type": ["boolean", "null"] + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ] }, "beforeOpeningCurlyBrace": { - "type": ["boolean", "null"] + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ] }, "allExcept": { "description": "A boolean or an array of quoted exceptions.", @@ -2916,7 +3188,6 @@ }, "requireSpacesInCallExpression": { "description": "Requires space before `()` in call expressions.", - "type": ["boolean", "null"], "oneOf": [ { "type": "boolean" @@ -2958,7 +3229,6 @@ }, "requireSpacesInForStatement": { "description": "Requires spaces in between `for` statement.", - "type": ["boolean", "null"], "oneOf": [ { "type": "boolean" @@ -3232,7 +3502,6 @@ }, "requireSpread": { "description": "Disallows using `.apply` in favor of the spread operator.", - "type": ["boolean", "null"], "oneOf": [ { "description": "If true, specifies that apply `.apply` is disallowed.", @@ -3304,7 +3573,6 @@ }, "requireVarDeclFirst": { "description": "Requires `var` declaration to be on the top of an enclosing scope.", - "type": ["boolean", "null"], "oneOf": [ { "description": "If true, specifies that `var` declarations must occur the top of a function scope.", From cf6a6c663ca21f9964fc67ade9a2ce155aad53f3 Mon Sep 17 00:00:00 2001 From: Vessel9817 <151808241+Vessel9817@users.noreply.github.com> Date: Thu, 16 Jul 2026 17:05:11 -0400 Subject: [PATCH 5/8] Replaced nullish boolean/object type unions with stricter equivalents Signed-off-by: Vessel9817 <151808241+Vessel9817@users.noreply.github.com> --- src/schemas/json/jscsrc.json | 30 +----------------------------- 1 file changed, 1 insertion(+), 29 deletions(-) diff --git a/src/schemas/json/jscsrc.json b/src/schemas/json/jscsrc.json index b424616daaa..a798fe98b31 100644 --- a/src/schemas/json/jscsrc.json +++ b/src/schemas/json/jscsrc.json @@ -632,7 +632,6 @@ }, "disallowCommaBeforeLineBreak": { "description": "Disallows commas as last token on a line in lists.", - "type": ["boolean", "null", "object"], "oneOf": [ { "description": "For default behavior (strict mode, comma on the same line).", @@ -669,7 +668,6 @@ }, "disallowDanglingUnderscores": { "description": "Disallows identifiers that start or end in _. Some popular identifiers are automatically listed as exceptions: __proto__ (javascript), _ (underscore.js), __filename (node.js global), __dirname (node.js global), super_ (node.js, used by util.inherits).", - "type": ["boolean", "null", "object"], "oneOf": [ { "type": "boolean" @@ -696,7 +694,6 @@ }, "disallowEmptyBlocks": { "description": "Disallows empty blocks (except for catch blocks).", - "type": ["boolean", "null", "object"], "oneOf": [ { "description": "For default behavior (strict mode, no empty blocks allowed).", @@ -850,7 +847,6 @@ }, "disallowMultipleSpaces": { "description": "Disallows multiple indentation characters (tabs or spaces) between identifiers, keywords, and any other token.", - "type": ["boolean", "null", "object"], "oneOf": [ { "type": "boolean" @@ -878,7 +874,6 @@ }, "disallowMultipleVarDecl": { "description": "Disallows multiple `var` declaration (except for-loop).", - "type": ["boolean", "null", "object"], "oneOf": [ { "type": "boolean" @@ -936,7 +931,6 @@ }, "disallowNestedTernaries": { "description": "Disallows nested ternaries.", - "type": ["boolean", "null", "object"], "oneOf": [ { "type": "boolean" @@ -1088,7 +1082,6 @@ }, "disallowPaddingNewlinesInBlocks": { "description": "Disallows blocks from beginning or ending with 2 newlines.", - "type": ["boolean", "null", "object"], "oneOf": [ { "description": "A value of true validates all non-empty blocks.", @@ -1222,7 +1215,6 @@ }, "disallowSpaceAfterComma": { "description": "Disallows spaces after commas.", - "type": ["boolean", "null", "object"], "oneOf": [ { "description": "A value of true will disallow any spaces after any comma.", @@ -1437,7 +1429,6 @@ }, "disallowSpaceBeforeSemicolon": { "description": "Disallows spaces before semicolons.", - "type": ["boolean", "null", "object"], "oneOf": [ { "description": "A value of true will disallow any spaces before any semicolon.", @@ -1505,7 +1496,6 @@ }, "disallowSpacesInConditionalExpression": { "description": "Disallows space before and/or after ? or : in conditional expressions.", - "type": ["boolean", "null", "object"], "anyOf": [ { "description": "A value of true will set all properties [afterTest, beforeConsequent, afterConsequent, beforeAlternate] to true.", @@ -1515,6 +1505,7 @@ "$ref": "#/definitions/nullRule" }, { + "type": "object", "description": "An object that contains keys of type boolean.", "properties": { "afterConsequent": { @@ -1649,7 +1640,6 @@ }, "disallowSpacesInsideBrackets": { "description": "Disallows space after opening square bracket and before closing. Reports on all on brackets, even on property accessors. Use disallowSpacesInsideArrayBrackets to exclude property accessors.", - "type": ["boolean", "null", "object"], "oneOf": [ { "description": "Use true for strict mode.", @@ -1764,7 +1754,6 @@ }, "disallowSpacesInsideParenthesizedExpression": { "description": "Disallows space after opening and before closing grouping parentheses.", - "type": ["boolean", "null", "object"], "oneOf": [ { "description": "If true, always disallow spaces inside grouping parentheses.", @@ -2053,7 +2042,6 @@ }, "requireAnonymousFunctions": { "description": "Requires that a function expression be anonymous.", - "type": ["boolean", "null", "object"], "oneOf": [ { "type": "boolean" @@ -2211,7 +2199,6 @@ }, "requireCapitalizedComments": { "description": "Requires the first alphabetical character of a comment to be uppercase, unless it is part of a multi-line textblock. This rule automatically ignores jscs, jshint, eslint, and istanbul specific comments.", - "type": ["boolean", "null", "object"], "oneOf": [ { "type": "boolean" @@ -2246,7 +2233,6 @@ }, "requireCapitalizedConstructorsNew": { "description": "Requires capitalized constructors to to use the new keyword.", - "type": ["boolean", "null", "object"], "oneOf": [ { "type": "boolean" @@ -2277,7 +2263,6 @@ }, "requireCapitalizedConstructors": { "description": "Requires constructors to be capitalized (except for \"this\")", - "type": ["boolean", "null", "object"], "oneOf": [ { "type": "boolean" @@ -2483,7 +2468,6 @@ }, "requireMatchingFunctionName": { "description": "Requires function names to match member and property names. It doesn't affect anonymous functions nor functions assigned to members or properties named with a reserved word. Assigning to module.exports is also ignored, unless includeModuleExports: true is configured.", - "type": ["boolean", "null", "object"], "oneOf": [ { "type": "boolean" @@ -2558,7 +2542,6 @@ }, "requireNamedUnassignedFunctions": { "description": "Require unassigned functions to be named inline.", - "type": ["boolean", "null", "object"], "oneOf": [ { "type": "boolean" @@ -2616,7 +2599,6 @@ }, "requireObjectKeysOnNewLine": { "description": "Requires placing object keys on new line.", - "type": ["boolean", "null", "object"], "oneOf": [ { "type": "boolean" @@ -2669,7 +2651,6 @@ }, "requirePaddingNewLinesAfterBlocks": { "description": "Requires newline after blocks.", - "type": ["boolean", "null", "object"], "oneOf": [ { "description": "If true, always require a newline after blocks.", @@ -2715,7 +2696,6 @@ }, "requirePaddingNewLinesAfterUseStrict": { "description": "Requires a blank line after 'use strict'; statements.", - "type": ["boolean", "null", "object"], "oneOf": [ { "description": "If true, require blank line after 'use strict' statements.", @@ -2769,7 +2749,6 @@ }, "requirePaddingNewLinesBeforeLineComments": { "description": "Requires newline before line comments.", - "type": ["boolean", "null", "object"], "oneOf": [ { "description": "If true, always require a newline before line comments.", @@ -2928,7 +2907,6 @@ }, "requireSpaceAfterComma": { "description": "Requires space after comma.", - "type": ["boolean", "null", "object"], "oneOf": [ { "description": "If true, require a space after any comma.", @@ -3199,7 +3177,6 @@ }, "requireSpacesInConditionalExpression": { "description": "Requires space before and/or after `?` or `:` in conditional expressions.", - "type": ["boolean", "null", "object"], "oneOf": [ { "description": "If true, set all properties to true.", @@ -3341,7 +3318,6 @@ }, "requireSpacesInsideBrackets": { "description": "Requires space after opening square bracket and before closing. Reports on all on brackets, even on property accessors. Use requireSpacesInsideArrayBrackets to exclude property accessors.", - "type": ["boolean", "null", "object"], "oneOf": [ { "description": "For default behavior (strict mode).", @@ -3468,7 +3444,6 @@ }, "requireSpacesInsideParenthesizedExpression": { "description": "Requires space after opening and before closing grouping parentheses.", - "type": ["boolean", "null", "object"], "oneOf": [ { "description": "If true, always require spaces inside grouping parentheses.", @@ -3514,7 +3489,6 @@ }, "requireTemplateStrings": { "description": "Requires the use of template strings instead of string concatenation.", - "type": ["boolean", "null", "object"], "oneOf": [ { "type": "boolean" @@ -3547,7 +3521,6 @@ }, "requireTrailingComma": { "description": "Requires an extra comma following the final element of an array or object literal.", - "type": ["boolean", "null", "object"], "oneOf": [ { "description": "If true, validates all arrays and objects.", @@ -3629,7 +3602,6 @@ }, "validateAlignedFunctionParameters": { "description": "Validates proper alignment of function parameters.", - "type": ["boolean", "null", "object"], "oneOf": [ { "description": "If true, this is the same as validating the rule using `{lineBreakAfterOpeningBrace: true, lineBreakBeforeClosingBrace: true}`.", From 2f9b9ab5822f6fe695381d547682d4189c25518b Mon Sep 17 00:00:00 2001 From: Vessel9817 <151808241+Vessel9817@users.noreply.github.com> Date: Thu, 16 Jul 2026 17:08:39 -0400 Subject: [PATCH 6/8] Replaced nullish object type unions with stricter equivalents Signed-off-by: Vessel9817 <151808241+Vessel9817@users.noreply.github.com> --- src/schemas/json/jscsrc.json | 133 +++++++++++++---------------------- 1 file changed, 47 insertions(+), 86 deletions(-) diff --git a/src/schemas/json/jscsrc.json b/src/schemas/json/jscsrc.json index a798fe98b31..4f4c8bc378b 100644 --- a/src/schemas/json/jscsrc.json +++ b/src/schemas/json/jscsrc.json @@ -28,29 +28,36 @@ ] }, "braceRules": { - "type": ["null", "object"], - "properties": { - "beforeOpeningRoundBrace": { - "anyOf": [ - { - "type": "boolean" + "anyOf": [ + { + "type": "object", + "properties": { + "beforeOpeningRoundBrace": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ] }, - { - "type": "null" + "beforeOpeningCurlyBrace": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ] } - ] + } }, - "beforeOpeningCurlyBrace": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ] + { + "type": "null" } - } + ] }, "esprimaNodeTypes": { "anyOf": [ @@ -1475,13 +1482,8 @@ ] }, "disallowSpacesInAnonymousFunctionExpression": { - "description": "Disallows space before () or {} in anonymous function expressions.", - "type": ["null", "object"], - "oneOf": [ - { - "$ref": "#/definitions/braceRules" - } - ] + "$ref": "#/definitions/braceRules", + "description": "Disallows space before () or {} in anonymous function expressions." }, "disallowSpacesInCallExpression": { "description": "Disallows space before () in call expressions.", @@ -1536,35 +1538,19 @@ ] }, "disallowSpacesInFunction": { - "description": "Disallows space before `()` or `{}` in function expressions (both named and anonymous) and function declarations.", - "type": ["null", "object"], - "oneOf": [ - { - "$ref": "#/definitions/braceRules" - } - ] + "$ref": "#/definitions/braceRules", + "description": "Disallows space before `()` or `{}` in function expressions (both named and anonymous) and function declarations." }, "disallowSpacesInFunctionDeclaration": { - "description": "Disallows space before () or {} in function declarations.", - "type": ["null", "object"], - "oneOf": [ - { - "$ref": "#/definitions/braceRules" - } - ] + "$ref": "#/definitions/braceRules", + "description": "Disallows space before () or {} in function declarations." }, "disallowSpacesInFunctionExpression": { - "description": "Disallows space before `()` or `{}` in function expressions (both named and anonymous).", - "type": ["null", "object"], - "oneOf": [ - { - "$ref": "#/definitions/braceRules" - } - ] + "$ref": "#/definitions/braceRules", + "description": "Disallows space before `()` or `{}` in function expressions (both named and anonymous)." }, "disallowSpacesInGenerator": { "description": "Disallow space before or after * in generator functions.", - "type": ["null", "object"], "oneOf": [ { "$ref": "#/definitions/nullRule" @@ -1586,13 +1572,8 @@ ] }, "disallowSpacesInNamedFunctionExpression": { - "description": "Disallows space before () or {} in named function expressions", - "type": ["null", "object"], - "oneOf": [ - { - "$ref": "#/definitions/braceRules" - } - ] + "$ref": "#/definitions/braceRules", + "description": "Disallows space before () or {} in named function expressions" }, "disallowSpacesInsideArrayBrackets": { "description": "Disallows space after opening array square bracket and before closing. Reports only on arrays, not on property accessors. Use disallowSpacesInsideBrackets to report on all brackets.", @@ -3106,7 +3087,6 @@ }, "requireSpacesInAnonymousFunctionExpression": { "description": "Requires space before `()` or `{}` in function expressions (both named and anonymous).", - "type": ["null", "object"], "oneOf": [ { "description": "An object with the following properties (one of \"beforeOpeningRoundBrace\" and \"beforeOpeningCurlyBrace\" must be provided):", @@ -3161,6 +3141,9 @@ ] } } + }, + { + "type": "null" } ] }, @@ -3216,35 +3199,19 @@ ] }, "requireSpacesInFunction": { - "description": "Requires space before `()` or `{}` in function expressions (both named and anonymous) and function declarations.", - "type": ["null", "object"], - "oneOf": [ - { - "$ref": "#/definitions/braceRules" - } - ] + "$ref": "#/definitions/braceRules", + "description": "Requires space before `()` or `{}` in function expressions (both named and anonymous) and function declarations." }, "requireSpacesInFunctionDeclaration": { - "description": "Requires space before `()` or `{}` in function declarations.", - "type": ["null", "object"], - "oneOf": [ - { - "$ref": "#/definitions/braceRules" - } - ] + "$ref": "#/definitions/braceRules", + "description": "Requires space before `()` or `{}` in function declarations." }, "requireSpacesInFunctionExpression": { - "description": "Requires space before `()` or `{}` in function expressions (both named and anonymous).", - "type": ["null", "object"], - "oneOf": [ - { - "$ref": "#/definitions/braceRules" - } - ] + "$ref": "#/definitions/braceRules", + "description": "Requires space before `()` or `{}` in function expressions (both named and anonymous)." }, "requireSpacesInGenerator": { "description": "Requires space before and after `*` in generator functions.", - "type": ["null", "object"], "oneOf": [ { "$ref": "#/definitions/nullRule" @@ -3266,13 +3233,8 @@ ] }, "requireSpacesInNamedFunctionExpression": { - "description": "Requires space before `()` or `{}` in named function expressions.", - "type": ["null", "object"], - "oneOf": [ - { - "$ref": "#/definitions/braceRules" - } - ] + "$ref": "#/definitions/braceRules", + "description": "Requires space before `()` or `{}` in named function expressions." }, "requireSpacesInsideArrayBrackets": { "description": "Requires space after opening array square bracket and before closing. Reports only on arrays, not on property accessors. Use requireSpacesInsideBrackets to report on all brackets.", @@ -3627,7 +3589,6 @@ }, "validateCommentPosition": { "description": "This rule is for validating the positioning of line comments. Block comments are ignored. Comments that start with the following keywords are also ignored: `eslint`, `jshint`, `jslint`, `istanbul`, `global`, `exported`, `jscs`, `falls through` eg. // jshint strict: true", - "type": ["null", "object"], "oneOf": [ { "$ref": "#/definitions/nullRule" From 343d71d87df1332ccebbde45742c83f5cb37d795 Mon Sep 17 00:00:00 2001 From: Vessel9817 <151808241+Vessel9817@users.noreply.github.com> Date: Thu, 16 Jul 2026 17:22:16 -0400 Subject: [PATCH 7/8] Replaced type unions with stricter equivalents Signed-off-by: Vessel9817 <151808241+Vessel9817@users.noreply.github.com> --- src/schemas/json/jscsrc.json | 446 +++++++++++++++-------------------- 1 file changed, 191 insertions(+), 255 deletions(-) diff --git a/src/schemas/json/jscsrc.json b/src/schemas/json/jscsrc.json index 4f4c8bc378b..fd142baee60 100644 --- a/src/schemas/json/jscsrc.json +++ b/src/schemas/json/jscsrc.json @@ -143,7 +143,6 @@ "properties": { "checkAnnotations": { "description": "Checks whether tag names are valid.", - "type": ["boolean", "null", "object", "string"], "oneOf": [ { "type": "boolean" @@ -178,8 +177,11 @@ "additionalProperties": { "oneOf": [ { - "type": ["boolean", "string"], - "enum": [true, false, "some"] + "type": "boolean" + }, + { + "type": "string", + "const": "some" } ] } @@ -285,7 +287,6 @@ }, "checkTypes": { "description": "Reports invalid types for bunch of tags.", - "type": ["boolean", "null", "string"], "oneOf": [ { "type": "boolean" @@ -311,7 +312,6 @@ }, "checkRedundantAccess": { "description": "Reports redundant access declarations.", - "type": ["boolean", "null", "string"], "oneOf": [ { "type": "boolean" @@ -336,7 +336,6 @@ }, "leadingUnderscoreAccess": { "description": "Checks whether access declaration is set for _underscored function names. Ignores a bunch of popular identifiers: __filename, __dirname, __proto__, __defineGetter__, super_, __constructor, etc.", - "type": ["boolean", "null", "string"], "oneOf": [ { "description": "true (means not public). Report if @private or @protected is absent from _underscored function names.", @@ -362,7 +361,6 @@ }, "enforceExistence": { "description": "Checks whether jsdoc block exists.", - "type": ["boolean", "null", "object", "string"], "oneOf": [ { "type": "boolean" @@ -521,7 +519,6 @@ ] }, "keywords2": { - "type": ["array", "boolean", "null"], "oneOf": [ { "$ref": "#/definitions/keywords" @@ -536,63 +533,93 @@ "type": "null" }, "operators": { - "type": ["array", "boolean", "null"], - "items": { - "enum": [ - ",", - ":", - "?", - "^", - "^=", - "|", - "||", - "|=", - "&", - "&&", - "&=", - "+", - "+=", - "-", - "-=", - "%", - "%=", - "/", - "/=", - "*", - "*=", - "=", - "==", - "===", - "!=", - "!==", - ">", - ">>", - ">>>", - ">=", - ">>=", - ">>>=", - "<", - "<<", - "<=", - "<<=", - null - ] - }, - "uniqueItems": true + "anyOf": [ + { + "type": "array", + "items": { + "enum": [ + ",", + ":", + "?", + "^", + "^=", + "|", + "||", + "|=", + "&", + "&&", + "&=", + "+", + "+=", + "-", + "-=", + "%", + "%=", + "/", + "/=", + "*", + "*=", + "=", + "==", + "===", + "!=", + "!==", + ">", + ">>", + ">>>", + ">=", + ">>=", + ">>>=", + "<", + "<<", + "<=", + "<<=", + null + ] + }, + "uniqueItems": true + }, + { + "type": "boolean" + }, + { + "type": "null" + } + ] }, "equalityOperators": { - "type": ["array", "boolean", "null"], - "items": { - "enum": ["==", "===", "!=", "!==", null] - }, - "uniqueItems": true + "anyOf": [ + { + "type": "array", + "items": { + "enum": ["==", "===", "!=", "!==", null] + }, + "uniqueItems": true + }, + { + "type": "boolean" + }, + { + "type": "null" + } + ] }, "unaryOperators": { - "type": ["array", "boolean", "null"], - "items": { - "enum": ["++", "--", "+", "-", "~", "!"] - }, - "uniqueItems": true + "anyOf": [ + { + "type": "array", + "items": { + "enum": ["++", "--", "+", "-", "~", "!"] + }, + "uniqueItems": true + }, + { + "type": "boolean" + }, + { + "type": "null" + } + ] } }, "properties": { @@ -665,13 +692,8 @@ ] }, "disallowCurlyBraces": { - "description": "Disallows curly braces after statements.", - "type": ["array", "boolean", "null"], - "oneOf": [ - { - "$ref": "#/definitions/keywords2" - } - ] + "$ref": "#/definitions/keywords2", + "description": "Disallows curly braces after statements." }, "disallowDanglingUnderscores": { "description": "Disallows identifiers that start or end in _. Some popular identifiers are automatically listed as exceptions: __proto__ (javascript), _ (underscore.js), __filename (node.js global), __dirname (node.js global), super_ (node.js, used by util.inherits).", @@ -782,7 +804,6 @@ }, "disallowKeywordsInComments": { "description": "Disallows one or more keywords in comments.", - "type": ["array", "boolean", "null", "string"], "oneOf": [ { "description": "An array of strings, which should be disallowed keywords in comments.", @@ -815,9 +836,19 @@ "description": "Disallows usage of the specified keywords." }, "disallowMixedSpacesAndTabs": { - "description": "Requires lines to not contain both spaces and tabs consecutively, or spaces after tabs only for alignment if \"smart", - "type": ["boolean", "null", "string"], - "enum": [true, false, null, "smart"] + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + }, + { + "type": "string", + "const": "smart" + } + ], + "description": "Requires lines to not contain both spaces and tabs consecutively, or spaces after tabs only for alignment if \"smart" }, "disallowMultiLineTernary": { "description": "Disallows the test, consequent and alternate to be on separate lines when using the ternary operator.", @@ -960,7 +991,6 @@ }, "disallowNewlineBeforeBlockStatements": { "description": "Disallows newline before opening curly brace of all block statements.", - "type": ["array", "boolean", "null", "object"], "oneOf": [ { "$ref": "#/definitions/blockKeywords" @@ -977,7 +1007,14 @@ "type": "object", "properties": { "value": { - "type": ["array", "boolean"] + "anyOf": [ + { + "type": "array" + }, + { + "type": "boolean" + } + ] }, "allExcept": { "description": "Array of quoted keywords to exempt. If `multiline` is specified, when the conditions span on multiple lines, require a new line before the curly brace.", @@ -1026,13 +1063,8 @@ ] }, "disallowOperatorBeforeLineBreak": { - "description": "Requires putting certain operators on the next line rather than on the current line before a line break.", - "type": ["array", "boolean", "null"], - "oneOf": [ - { - "$ref": "#/definitions/operators" - } - ] + "$ref": "#/definitions/operators", + "description": "Requires putting certain operators on the next line rather than on the current line before a line break." }, "disallowPaddingNewLinesAfterBlocks": { "description": "Disallow a newline after blocks.", @@ -1068,13 +1100,8 @@ ] }, "disallowPaddingNewlinesBeforeKeywords": { - "description": "Disallow an empty line above the specified keywords.", - "type": ["array", "boolean", "null"], - "oneOf": [ - { - "$ref": "#/definitions/keywords2" - } - ] + "$ref": "#/definitions/keywords2", + "description": "Disallow an empty line above the specified keywords." }, "disallowPaddingNewLinesBeforeLineComments": { "description": "Disallows newline before line comments.", @@ -1146,7 +1173,6 @@ }, "disallowQuotedKeysInObjects": { "description": "Disallows quoted keys in object if possible.", - "type": ["boolean", "null", "object", "string"], "oneOf": [ { "description": "Set to true for strict mode.", @@ -1181,11 +1207,7 @@ { "description": "Deprecated in favor of the object \"allExcept\": [\"reserved\"] rule format.", "type": "string", - "oneOf": [ - { - "const": "allButReserved" - } - ] + "const": "allButReserved" } ] }, @@ -1212,13 +1234,8 @@ ] }, "disallowSpaceAfterBinaryOperators": { - "description": "Requires sticking binary operators to the right.", - "type": ["array", "boolean", "null"], - "oneOf": [ - { - "$ref": "#/definitions/operators" - } - ] + "$ref": "#/definitions/operators", + "description": "Requires sticking binary operators to the right." }, "disallowSpaceAfterComma": { "description": "Disallows spaces after commas.", @@ -1254,13 +1271,8 @@ ] }, "disallowSpaceAfterKeywords": { - "description": "Disallows space after the specified keywords. A value of true will require spaces after all possible keywords.", - "type": ["array", "boolean", "null"], - "oneOf": [ - { - "$ref": "#/definitions/keywords2" - } - ] + "$ref": "#/definitions/keywords2", + "description": "Disallows space after the specified keywords. A value of true will require spaces after all possible keywords." }, "disallowSpaceAfterLineComment": { "description": "Requires that a line comment (//) not be followed by a space.", @@ -1275,7 +1287,6 @@ }, "disallowSpaceAfterObjectKeys": { "description": "Disallows space after object keys.", - "type": ["boolean", "null", "object", "string"], "oneOf": [ { "type": "boolean" @@ -1333,22 +1344,12 @@ ] }, "disallowSpaceAfterPrefixUnaryOperators": { - "description": "Requires sticking unary operators to the right.", - "type": ["array", "boolean", "null"], - "oneOf": [ - { - "$ref": "#/definitions/unaryOperators" - } - ] + "$ref": "#/definitions/unaryOperators", + "description": "Requires sticking unary operators to the right." }, "disallowSpaceBeforeBinaryOperators": { - "description": "Requires sticking binary operators to the left.", - "type": ["array", "boolean", "null"], - "oneOf": [ - { - "$ref": "#/definitions/operators" - } - ] + "$ref": "#/definitions/operators", + "description": "Requires sticking binary operators to the left." }, "disallowSpaceBeforeBlockStatements": { "description": "Disallows space before block statements (for loops, control structures).", @@ -1363,7 +1364,6 @@ }, "disallowSpaceBeforeComma": { "description": "Disallows spaces before commas.", - "type": ["boolean", "null", "object", "string"], "oneOf": [ { "description": "A value of true will disallow any spaces before any comma.", @@ -1406,13 +1406,8 @@ ] }, "disallowSpaceBeforeKeywords": { - "description": "Disallows space before keyword.", - "type": ["array", "boolean", "null"], - "oneOf": [ - { - "$ref": "#/definitions/keywords2" - } - ] + "$ref": "#/definitions/keywords2", + "description": "Disallows space before keyword." }, "disallowSpaceBeforeObjectValues": { "description": "Disallows space before object values.", @@ -1426,13 +1421,8 @@ ] }, "disallowSpaceBeforePostfixUnaryOperators": { - "description": "Requires sticking unary operators to the left.", - "type": ["array", "boolean", "null"], - "oneOf": [ - { - "$ref": "#/definitions/unaryOperators" - } - ] + "$ref": "#/definitions/unaryOperators", + "description": "Requires sticking unary operators to the left." }, "disallowSpaceBeforeSemicolon": { "description": "Disallows spaces before semicolons.", @@ -1577,12 +1567,18 @@ }, "disallowSpacesInsideArrayBrackets": { "description": "Disallows space after opening array square bracket and before closing. Reports only on arrays, not on property accessors. Use disallowSpacesInsideBrackets to report on all brackets.", - "type": ["boolean", "null", "object", "string"], "oneOf": [ { "description": "Use \"all\" or true for strict mode.", - "type": ["boolean", "string"], - "enum": [true, false, "all"] + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "string", + "const": "all" + } + ] }, { "$ref": "#/definitions/nullRule" @@ -1654,12 +1650,18 @@ }, "disallowSpacesInsideObjectBrackets": { "description": "Disallows space after opening object curly brace and before closing.", - "type": ["boolean", "null", "object", "string"], "oneOf": [ { "description": "Use \"all\" or true for strict mode.", - "type": ["boolean", "string"], - "enum": [true, false, "all"] + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "string", + "const": "all" + } + ] }, { "$ref": "#/definitions/nullRule" @@ -1698,11 +1700,17 @@ }, "disallowSpacesInsideParentheses": { "description": "Disallows space after opening round bracket and before closing.", - "type": ["boolean", "null", "string", "object"], "oneOf": [ { - "type": ["boolean", "string"], - "enum": [true, false, "all"] + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "string", + "const": "all" + } + ] }, { "$ref": "#/definitions/nullRule" @@ -1800,13 +1808,15 @@ ] }, "disallowTrailingWhitespace": { - "description": "Requires all lines to end on a non-whitespace character.", - "type": ["boolean", "null", "string"], + "description": "Requires all lines to end on a non-whitespace character. Use \"ignoreEmptyLines\" to allow whitespace on empty lines (default is false).", + "default": false, "oneOf": [ { - "description": "Use \"ignoreEmptyLines\" to allow whitespace on empty lines (default is false).", - "type": ["boolean", "string"], - "enum": [true, false, "ignoreEmptyLines"] + "type": "boolean" + }, + { + "type": "string", + "const": "ignoreEmptyLines" }, { "$ref": "#/definitions/nullRule" @@ -1836,13 +1846,8 @@ ] }, "disallowYodaConditions": { - "description": "Requires the variable to be the left hand operator when doing a boolean comparison. Array of quoted operators or true to disallow yoda conditions for most possible comparison operators.", - "type": ["array", "boolean", "null"], - "oneOf": [ - { - "$ref": "#/definitions/equalityOperators" - } - ] + "$ref": "#/definitions/equalityOperators", + "description": "Requires the variable to be the left hand operator when doing a boolean comparison. Array of quoted operators or true to disallow yoda conditions for most possible comparison operators." }, "excludeFiles": { "description": "Disables style checking for specified paths.", @@ -1857,7 +1862,6 @@ }, "maximumLineLength": { "description": "Requires all lines to be at most the number of characters specified.", - "type": ["integer", "null", "object"], "oneOf": [ { "description": "Lines should be at most the number of characters specified.", @@ -1918,7 +1922,6 @@ }, "maximumNumberOfLines": { "description": "Requires the file to be at most the number of lines specified.", - "type": ["integer", "null", "object"], "oneOf": [ { "description": "File should be at most the number of lines specified.", @@ -1975,7 +1978,6 @@ }, "requireAlignedMultilineParams": { "description": "Enforces indentation of parameters in multiline functions.", - "type": ["boolean", "integer", "null", "string"], "oneOf": [ { "description": "If true, require parameters to align with the body of the function.", @@ -1997,7 +1999,6 @@ }, "requireAlignedObjectValues": { "description": "Requires proper alignment in object literals.", - "type": ["null", "string"], "oneOf": [ { "$ref": "#/definitions/nullRule" @@ -2076,7 +2077,6 @@ }, "requireBlocksOnNewline": { "description": "Requires blocks to begin and end with a newline.", - "type": ["boolean", "integer", "null", "object"], "oneOf": [ { "description": "If true, validates all non-empty blocks.", @@ -2106,7 +2106,6 @@ }, "requireCamelCaseOrUpperCaseIdentifiers": { "description": "Requires identifiers to be camelCased or UPPERCASE_WITH_UNDERSCORES.", - "type": ["boolean", "null", "object", "string"], "oneOf": [ { "type": "boolean" @@ -2170,11 +2169,7 @@ { "description": "Deprecated in favor of the object \"ignoreProperties\" rule format.", "type": "string", - "oneOf": [ - { - "const": "ignoreProperties" - } - ] + "const": "ignoreProperties" } ] }, @@ -2285,7 +2280,6 @@ }, "requireCurlyBraces": { "description": "Requires curly braces after statements. A value of true will require curly braces for all the necessary keywords: if, else, for, while do, try, catch, case, and default.", - "type": ["array", "boolean", "null", "object"], "oneOf": [ { "$ref": "#/definitions/keywords2" @@ -2318,11 +2312,13 @@ }, "requireDollarBeforejQueryAssignment": { "description": "Require a $ before variable names that are jquery assignments.", - "type": ["boolean", "null", "string"], "oneOf": [ { - "type": ["boolean", "string"], - "enum": [true, false, "ignoreProperties"] + "type": "boolean" + }, + { + "type": "string", + "const": "ignoreProperties" }, { "$ref": "#/definitions/nullRule" @@ -2331,7 +2327,6 @@ }, "requireDotNotation": { "description": "Requires member expressions to use dot notation when possible.", - "type": ["boolean", "null", "object", "string"], "oneOf": [ { "type": "boolean" @@ -2480,7 +2475,6 @@ }, "requireMultipleVarDecl": { "description": "Requires multiple `var` declaration.", - "type": ["boolean", "null", "object", "string"], "oneOf": [ { "description": "If true, it will report only consecutive vars.", @@ -2512,12 +2506,8 @@ }, { "type": "string", - "oneOf": [ - { - "description": "If equal to 'onevar', requireMultipleVarDecl will allow only one var per function scope.", - "const": "onevar" - } - ] + "description": "If equal to 'onevar', requireMultipleVarDecl will allow only one var per function scope.", + "const": "onevar" } ] }, @@ -2548,13 +2538,8 @@ ] }, "requireNewlineBeforeBlockStatements": { - "description": "Requires newline before opening curly brace of all block statements. If true, always requires newline before curly brace of block statements. Array specifies block-type keywords after which newlines are required before curly brace.", - "type": ["array", "boolean", "null"], - "oneOf": [ - { - "$ref": "#/definitions/keywords2" - } - ] + "$ref": "#/definitions/keywords2", + "description": "Requires newline before opening curly brace of all block statements. If true, always requires newline before curly brace of block statements. Array specifies block-type keywords after which newlines are required before curly brace." }, "requireNumericLiterals": { "description": "Requires use of binary, hexadecimal, and octal literals instead of parseInt.", @@ -2611,13 +2596,8 @@ ] }, "requireOperatorBeforeLineBreak": { - "description": "Requires operators to appear before line breaks and not after.", - "type": ["array", "boolean", "null"], - "oneOf": [ - { - "$ref": "#/definitions/operators" - } - ] + "$ref": "#/definitions/operators", + "description": "Requires operators to appear before line breaks and not after." }, "requirePaddingNewLineAfterVariableDeclaration": { "description": "Requires an extra blank newline after var declarations, as long as it is not the last expression in the current block.", @@ -2720,13 +2700,8 @@ ] }, "requirePaddingNewlinesBeforeKeywords": { - "description": "Requires an empty line above the specified keywords unless the keyword is the first expression in a block. If true, specifies that the spacedKeywords found in the utils module require an empty line above it. Array values indicate keywords that require an empty line above it.", - "type": ["array", "boolean", "null"], - "oneOf": [ - { - "$ref": "#/definitions/keywords2" - } - ] + "$ref": "#/definitions/keywords2", + "description": "Requires an empty line above the specified keywords unless the keyword is the first expression in a block. If true, specifies that the spacedKeywords found in the utils module require an empty line above it. Array values indicate keywords that require an empty line above it." }, "requirePaddingNewLinesBeforeLineComments": { "description": "Requires newline before line comments.", @@ -2763,7 +2738,6 @@ }, "requirePaddingNewlinesInBlocks": { "description": "Requires blocks to begin and end with 2 newlines.", - "type": ["boolean", "integer", "null", "object"], "oneOf": [ { "description": "If true, validates all non-empty blocks.", @@ -2878,13 +2852,8 @@ ] }, "requireSpaceAfterBinaryOperators": { - "description": "Disallows sticking binary operators to the right.", - "type": ["array", "boolean", "null"], - "oneOf": [ - { - "$ref": "#/definitions/operators" - } - ] + "$ref": "#/definitions/operators", + "description": "Disallows sticking binary operators to the right." }, "requireSpaceAfterComma": { "description": "Requires space after comma.", @@ -2920,17 +2889,11 @@ ] }, "requireSpaceAfterKeywords": { - "description": "Requires space after the specified keywords. A value of true will disallow spaces after all possible keywords.", - "type": ["array", "boolean", "null"], - "oneOf": [ - { - "$ref": "#/definitions/keywords2" - } - ] + "$ref": "#/definitions/keywords2", + "description": "Requires space after the specified keywords. A value of true will disallow spaces after all possible keywords." }, "requireSpaceAfterLineComment": { "description": "Requires that a line comment (`//`) be followed by a space.", - "type": ["boolean", "null", "object", "string"], "oneOf": [ { "type": "boolean" @@ -2976,26 +2939,15 @@ ] }, "requireSpaceAfterPrefixUnaryOperators": { - "description": "Disallows sticking unary operators to the right.", - "type": ["array", "boolean", "null"], - "oneOf": [ - { - "$ref": "#/definitions/unaryOperators" - } - ] + "$ref": "#/definitions/unaryOperators", + "description": "Disallows sticking unary operators to the right." }, "requireSpaceBeforeBinaryOperators": { - "description": "Disallows sticking binary operators to the left.", - "type": ["array", "boolean", "null"], - "oneOf": [ - { - "$ref": "#/definitions/operators" - } - ] + "$ref": "#/definitions/operators", + "description": "Disallows sticking binary operators to the left." }, "requireSpaceBeforeBlockStatements": { "description": "Requires space before block statements (for loops, control structures).", - "type": ["boolean", "null", "integer"], "oneOf": [ { "description": "If true, require at least a single space.", @@ -3025,7 +2977,6 @@ }, "requireSpaceBeforeKeywords": { "description": "Requires a space before a keyword.", - "type": ["array", "boolean", "null", "object"], "oneOf": [ { "$ref": "#/definitions/blockKeywords" @@ -3066,13 +3017,8 @@ ] }, "requireSpaceBeforePostfixUnaryOperators": { - "description": "Disallows sticking unary operators to the left.", - "type": ["array", "boolean", "null"], - "oneOf": [ - { - "$ref": "#/definitions/unaryOperators" - } - ] + "$ref": "#/definitions/unaryOperators", + "description": "Disallows sticking unary operators to the left." }, "requireSpaceBetweenArguments": { "description": "Ensure there are spaces after argument separators in call expressions.", @@ -3114,7 +3060,6 @@ }, "allExcept": { "description": "A boolean or an array of quoted exceptions.", - "type": ["boolean", "null", "array"], "oneOf": [ { "description": "If true, enable all configuration exceptions.", @@ -3238,7 +3183,6 @@ }, "requireSpacesInsideArrayBrackets": { "description": "Requires space after opening array square bracket and before closing. Reports only on arrays, not on property accessors. Use requireSpacesInsideBrackets to report on all brackets.", - "type": ["null", "object", "string"], "oneOf": [ { "$ref": "#/definitions/nullRule" @@ -3312,7 +3256,6 @@ }, "requireSpacesInsideObjectBrackets": { "description": "Requires space after opening object curly brace and before closing.", - "type": ["null", "object", "string"], "oneOf": [ { "$ref": "#/definitions/nullRule" @@ -3354,7 +3297,6 @@ }, "requireSpacesInsideParentheses": { "description": "Requires space after opening round bracket and before closing.", - "type": ["null", "object", "string"], "oneOf": [ { "$ref": "#/definitions/nullRule" @@ -3520,7 +3462,6 @@ }, "requireYodaConditions": { "description": "Requires the variable to be the right hand operator when doing a boolean comparison. An array of quoted operators can be supplied to indicate which operators requires yoda conditions.", - "type": ["array", "boolean", "null"], "oneOf": [ { "$ref": "#/definitions/equalityOperators" @@ -3536,7 +3477,6 @@ }, "safeContextKeyword": { "description": "Option to check `var that = this` expressions.", - "type": ["array", "null", "string"], "oneOf": [ { "description": "Array of quoted keywords that can be assigned to `this` context.", @@ -3615,8 +3555,10 @@ }, "validateIndentation": { "description": "Validates indentation for switch statements and block statements.", - "type": ["integer", "null", "object", "string"], "oneOf": [ + { + "type": "string" + }, { "description": "A positive number of spaces.", "type": "integer", @@ -3629,7 +3571,6 @@ "type": "object", "properties": { "value": { - "type": ["integer", "string"], "oneOf": [ { "type": "integer", @@ -3671,7 +3612,6 @@ }, "validateLineBreaks": { "description": "Option to check line break characters.", - "type": ["null", "object", "string"], "oneOf": [ { "$ref": "#/definitions/nullRule" @@ -3698,7 +3638,6 @@ }, "validateNewlineAfterArrayElements": { "description": "Requires each element in array on a single line when array length is more than passed maximum number or array fills more than one line.", - "type": ["boolean", "integer", "null", "object"], "oneOf": [ { "description": "If true, this is the same as validating the rule using `{maximum: Infinity, ignoreBrackets: false}`.", @@ -3729,7 +3668,6 @@ }, "validateOrderInObjectKeys": { "description": "Validates the order in object keys.", - "type": ["boolean", "null", "string"], "oneOf": [ { "description": "If true, alias to `asc`.", @@ -3771,7 +3709,6 @@ }, "validateParameterSeparator": { "description": "Enable validation of separators between function parameters. Will ignore newlines.", - "type": ["null", "string"], "oneOf": [ { "$ref": "#/definitions/nullRule" @@ -3801,7 +3738,6 @@ }, "validateQuoteMarks": { "description": "Requires all quote marks to be either the supplied value, or consistent if `true`.", - "type": ["boolean", "null", "object", "string"], "oneOf": [ { "description": "If true, all strings require the quote mark first encountered in the source code.", From db37b19dc2b3f38f6d708e6a25078168a1b6705a Mon Sep 17 00:00:00 2001 From: Vessel9817 <151808241+Vessel9817@users.noreply.github.com> Date: Thu, 16 Jul 2026 17:37:47 -0400 Subject: [PATCH 8/8] Enabled strict validation Signed-off-by: Vessel9817 <151808241+Vessel9817@users.noreply.github.com> --- src/schema-validation.jsonc | 1 - src/schemas/json/jscsrc.json | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/schema-validation.jsonc b/src/schema-validation.jsonc index cb1b30437e6..cd5339b291b 100644 --- a/src/schema-validation.jsonc +++ b/src/schema-validation.jsonc @@ -165,7 +165,6 @@ "jest.json", "jovo-language-model.json", "jsconfig.json", - "jscsrc.json", "jsdoc-1.0.0.json", "jshintrc.json", "json-api-1.0.json", diff --git a/src/schemas/json/jscsrc.json b/src/schemas/json/jscsrc.json index fd142baee60..c02679aa15f 100644 --- a/src/schemas/json/jscsrc.json +++ b/src/schemas/json/jscsrc.json @@ -3771,8 +3771,7 @@ "description": "Ignore JSX nodes.", "type": "boolean" } - }, - "required": ["value"] + } }, { "type": "string",