Skip to content

Commit

Permalink
add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
yeonjuan committed Dec 14, 2024
1 parent 00b239f commit f775902
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions packages/eslint-plugin/tests/rules/indent.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -1366,5 +1366,37 @@ class Component extends LitElement {
options: [2, { Attribute: 2 }],
errors: wrongIndentErrors(2),
},
{
code: `
class Component extends LitElement {
\trender() {
\t\treturn html\`
\t\t\t<div>
\t\t\t\t<span></span>
\t\t\t</div>
\t\t\t<span>
\t\t\t\t<div></div>
\t\t\t</span>
\`;
}
}
`,
output: `
class Component extends LitElement {
\trender() {
\t\treturn html\`
\t\t\t<div>
\t\t\t\t<span></span>
\t\t\t</div>
\t\t\t<span>
\t\t\t\t\t<div></div>
\t\t\t</span>
\`;
}
}
`,
options: ["tab", { Attribute: 2, tagChildrenIndent: { span: 2 } }],
errors: wrongIndentErrors(1),
},
],
});

0 comments on commit f775902

Please sign in to comment.