Skip to content

Commit e0192ff

Browse files
fix: size-* using size
1 parent c5ce402 commit e0192ff

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ You can can the same information on your favorite command line software as well.
4141
## Latest changelog
4242

4343
- fix: [`tabular-nums` and `slashed-zero` can be used together 🤝](https://github.com/francoismassart/eslint-plugin-tailwindcss/issues/316)
44-
- fix: [`size-*` is based on `spacing` 🤓](https://github.com/francoismassart/eslint-plugin-tailwindcss/issues/315)
44+
- fix: [`size-*` based `size` 🤓](https://github.com/francoismassart/eslint-plugin-tailwindcss/issues/315)
4545
- fix: [there is no `size-screen` 😅](https://github.com/francoismassart/eslint-plugin-tailwindcss/issues/307)
4646
- fix: [edge cases with whitespace in `enforces-shorthand`](https://github.com/francoismassart/eslint-plugin-tailwindcss/pull/308)(by [kachkaev](https://github.com/kachkaev) 🙏)
4747
- fix: [parsing spreads in function call returns](https://github.com/francoismassart/eslint-plugin-tailwindcss/pull/285)(by [egorpavlikhin](https://github.com/egorpavlikhin) 🙏)

lib/rules/enforces-shorthand.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -245,9 +245,9 @@ module.exports = {
245245
if (mode === 'value') {
246246
const bodyMatch = inputSet.some((inputClassPattern) => inputClassPattern === remainingClass.body);
247247
// w-screen + h-screen ≠ size-screen (Issue #307)
248-
const spacingKeys = Object.keys(mergedConfig.theme.spacing);
248+
const sizeKeys = Object.keys(mergedConfig.theme.size);
249249
const isSize = ['w-', 'h-'].includes(remainingClass.body);
250-
const isValidSize = spacingKeys.includes(remainingClass.value);
250+
const isValidSize = sizeKeys.includes(remainingClass.value);
251251
const validValue = bodyMatch && !(isSize && !isValidSize);
252252
return validValue;
253253
}

0 commit comments

Comments
 (0)