diff --git a/eslint.config.mjs b/eslint.config.mjs index 0075efb9b536..6022344465a5 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -320,6 +320,7 @@ export default tseslint.config( 'jsdoc/informative-docs': 'error', 'unicorn/no-typeof-undefined': 'error', + 'unicorn/no-useless-spread': 'error', }, }, { diff --git a/packages/eslint-plugin/src/rules/naming-convention-utils/schema.ts b/packages/eslint-plugin/src/rules/naming-convention-utils/schema.ts index 91e5bfec36f3..d7016e217f2f 100644 --- a/packages/eslint-plugin/src/rules/naming-convention-utils/schema.ts +++ b/packages/eslint-plugin/src/rules/naming-convention-utils/schema.ts @@ -146,39 +146,37 @@ function selectorsSchema(): JSONSchema.JSONSchema4 { description: 'Multiple selectors in one config', properties: { ...FORMAT_OPTIONS_PROPERTIES, - ...{ - filter: { - oneOf: [ - { - type: 'string', - minLength: 1, - }, - MATCH_REGEX_SCHEMA, - ], - }, - selector: { - type: 'array', - items: { + filter: { + oneOf: [ + { type: 'string', - enum: [...getEnumNames(MetaSelectors), ...getEnumNames(Selectors)], + minLength: 1, }, - additionalItems: false, + MATCH_REGEX_SCHEMA, + ], + }, + selector: { + type: 'array', + items: { + type: 'string', + enum: [...getEnumNames(MetaSelectors), ...getEnumNames(Selectors)], }, - modifiers: { - type: 'array', - items: { - type: 'string', - enum: getEnumNames(Modifiers), - }, - additionalItems: false, + additionalItems: false, + }, + modifiers: { + type: 'array', + items: { + type: 'string', + enum: getEnumNames(Modifiers), }, - types: { - type: 'array', - items: { - $ref: '#/$defs/typeModifiers', - }, - additionalItems: false, + additionalItems: false, + }, + types: { + type: 'array', + items: { + $ref: '#/$defs/typeModifiers', }, + additionalItems: false, }, }, required: ['selector', 'format'],