Skip to content

Commit

Permalink
Make stricter
Browse files Browse the repository at this point in the history
  • Loading branch information
mirka committed Aug 10, 2024
1 parent 4ee2112 commit 0fc2b7e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,8 @@ module.exports = {
'DimensionControl',
'FontSizePicker',
].map( ( componentName ) => ( {
selector: `JSXOpeningElement[name.name="${ componentName }"]:not(:has(JSXAttribute[name.name="__next40pxDefaultSize"])):not(:has(JSXAttribute[name.name="size"][value.value!="default"]))`,
// Falsy `__next40pxDefaultSize` without a non-default `size` prop.
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.',
Expand Down

0 comments on commit 0fc2b7e

Please sign in to comment.