-
-
Notifications
You must be signed in to change notification settings - Fork 99
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
When using the color-object-syntax, this plugin fails to correctly detect unnecessary arbitrary values.
To Reproduce
var config = [
{
config: {
theme: {
colors: {
blue: {
50: "#abcdef",
},
"blue-100": "#123456",
},
},
},
},
];
ruleTester.run("arbitrary-values", rule, {
valid: [],
invalid: [
{
// AssertionError [ERR_ASSERTION]: Should have 1 error but had 0: []
code: `<pre class="text-[#abcdef]">text-[#abcdef]</pre>`,
options: config,
output: `<pre class="text-blue-50">text-[#abcdef]</pre>`,
errors: generateErrors(["text-[#abcdef]"], [["text-blue-50"]]),
},
{
// This works correctly
code: `<pre class="text-[#123456]">text-[#123456]</pre>`,
options: config,
output: `<pre class="text-blue-100">text-[#123456]</pre>`,
errors: generateErrors(["text-[#123456]"], [["text-blue-100"]]),
},
],
});
Screenshots



Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working