Skip to content

Commit

Permalink
fix: issue #293
Browse files Browse the repository at this point in the history
  • Loading branch information
francoismassart committed Feb 5, 2024
1 parent c89e0ec commit 14e236e
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Expand Up @@ -40,6 +40,7 @@ You can can the same information on your favorite command line software as well.

## Latest changelog

- fix: [composable touch action classnames](https://github.com/francoismassart/eslint-plugin-tailwindcss/issues/293)
- fix: [`shadow-md` + `shadow-[#color]`can be used together 🤝](https://github.com/francoismassart/eslint-plugin-tailwindcss/issues/298)
- fix: [`tabular-nums` and `slashed-zero` can be used together 🤝](https://github.com/francoismassart/eslint-plugin-tailwindcss/issues/316)
- fix: [`size-*` based `size` 🤓](https://github.com/francoismassart/eslint-plugin-tailwindcss/issues/315)
Expand Down
19 changes: 18 additions & 1 deletion lib/config/groups.js
Expand Up @@ -1337,7 +1337,24 @@ module.exports.groups = [
},
{
type: 'Touch Action',
members: 'touch\\-(auto|none|pan\\-(x|left|right|y|up|down)|pinch\\-zoom|manipulation)',
members: [
{
type: 'Touch Action Mode',
members: 'touch\\-(auto|none|manipulation)',
},
{
type: 'Touch Action X',
members: 'touch\\-(pan\\-(x|left|right))',
},
{
type: 'Touch Action Y',
members: 'touch\\-(pan\\-(y|up|down))',
},
{
type: 'Touch Action Pinch Zoom',
members: 'touch\\-pinch\\-zoom',
},
],
},
{
type: 'User Select',
Expand Down
11 changes: 11 additions & 0 deletions tests/lib/rules/no-contradicting-classname.js
Expand Up @@ -313,6 +313,9 @@ ruleTester.run("no-contradicting-classname", rule, {
{
code: `<div class="shadow-md shadow-[#aabbcc]">Issue #298</div>`,
},
{
code: `<pre class="touch-pan-left touch-pan-y touch-pinch-zoom touch-manipulation">valid combo for issue #293</pre>`,
},
],

invalid: [
Expand Down Expand Up @@ -751,6 +754,14 @@ ruleTester.run("no-contradicting-classname", rule, {
code: `<div class="diagonal-fractions stacked-fractions">Font Variant Numeric #316</div>`,
errors: generateErrors(["diagonal-fractions stacked-fractions"]),
},
{
code: `<pre class="touch-auto touch-none touch-pan-x touch-pan-left touch-pan-right touch-pan-y touch-pan-up touch-pan-down touch-pinch-zoom touch-manipulation">KitchenSink with errors for issue #293</pre>`,
errors: generateErrors([
"touch-auto touch-none touch-manipulation",
"touch-pan-x touch-pan-left touch-pan-right",
"touch-pan-y touch-pan-up touch-pan-down",
]),
},
// {
// code: `
// <div class="scale-75 transform-none">
Expand Down

0 comments on commit 14e236e

Please sign in to comment.