Skip to content

Commit cfa69cd

Browse files
fix
1 parent aec5d57 commit cfa69cd

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

src/rules/classnames-order.spec.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,12 @@ ruleTester.run(RULE_NAME, classnamesOrder, {
279279
`<h1 class="block group/edit:stroke-0">support named group/peer syntax</h1>`,
280280
`<h1 class="group/edit:stroke-0 block">support named group/peer syntax</h1>`,
281281
],
282+
[
283+
/* prettier-ignore */
284+
"tw`flex unknown relative`",
285+
/* prettier-ignore */
286+
"tw`unknown relative flex`",
287+
],
282288
].map(([input, result]) => ({
283289
code: input,
284290
output: result,

src/utils/parser/node.spec.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,15 +79,15 @@ test("getRangeFromNode", () => {
7979
const jsx = getFirstJSXOpeningElement(`<h1 class={'flex'}>html</h1>`);
8080
const jsxAttribute = getJSXAttribute(jsx);
8181
expect(getRangeFromNode(jsxAttribute)).toStrictEqual([
82-
`<h1 class={`.length,
83-
`<h1 class={'flex'`.length,
82+
`<h1 class={'`.length,
83+
`<h1 class={'flex`.length,
8484
]);
8585
// default
8686
const defaultJsx = getFirstJSXOpeningElement(`<h1 class="flex">html</h1>`);
8787
const defaultJsxAttribute = getJSXAttribute(defaultJsx);
8888
expect(getRangeFromNode(defaultJsxAttribute)).toStrictEqual([
89-
`<h1 class=`.length,
90-
`<h1 class="flex'`.length,
89+
`<h1 class="`.length,
90+
`<h1 class="flex`.length,
9191
]);
9292
});
9393

0 commit comments

Comments
 (0)