Skip to content

Commit

Permalink
ESLint: apply last changes from legacy config
Browse files Browse the repository at this point in the history
  • Loading branch information
shvlv committed Oct 14, 2024
1 parent cef3b27 commit 4f50a50
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -428,6 +428,7 @@ module.exports = [
'BorderBoxControl',
'BorderControl',
'BoxControl',
'Button',
'ComboboxControl',
'CustomSelectControl',
'DimensionControl',
Expand All @@ -449,7 +450,7 @@ module.exports = [
selector: `JSXOpeningElement[name.name="${ componentName }"]:not(:has(JSXAttribute[name.name="__next40pxDefaultSize"][value.expression.value!=false])):not(:has(JSXAttribute[name.name="size"][value.value!="default"]))`,
message:
componentName +
' should have the `__next40pxDefaultSize` prop to opt-in to the new default size.',
' should have the `__next40pxDefaultSize` prop when using the default size.',
} ) ),
{
// Falsy `__next40pxDefaultSize` without a `render` prop.
Expand All @@ -458,14 +459,6 @@ module.exports = [
message:
'FormFileUpload should have the `__next40pxDefaultSize` prop to opt-in to the new default size.',
},
// Temporary rules until all existing components have the `__next40pxDefaultSize` prop.
...[ 'Button' ].map( ( componentName ) => ( {
// Not strict. Allows pre-existing __next40pxDefaultSize={ false } usage until they are all manually updated.
selector: `JSXOpeningElement[name.name="${ componentName }"]:not(:has(JSXAttribute[name.name="__next40pxDefaultSize"])):not(:has(JSXAttribute[name.name="size"]))`,
message:
componentName +
' should have the `__next40pxDefaultSize` prop to opt-in to the new default size.',
} ) ),
],
},
},
Expand Down

0 comments on commit 4f50a50

Please sign in to comment.