Skip to content

Commit

Permalink
chore: enable unicorn/no-useless-spread (#9687)
Browse files Browse the repository at this point in the history
  • Loading branch information
abrahamguo authored Aug 5, 2024
1 parent aba6e37 commit fbcfaba
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 28 deletions.
1 change: 1 addition & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,7 @@ export default tseslint.config(

'jsdoc/informative-docs': 'error',
'unicorn/no-typeof-undefined': 'error',
'unicorn/no-useless-spread': 'error',
},
},
{
Expand Down
54 changes: 26 additions & 28 deletions packages/eslint-plugin/src/rules/naming-convention-utils/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'],
Expand Down

0 comments on commit fbcfaba

Please sign in to comment.