We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 558df30 commit cd03f03Copy full SHA for cd03f03
rules/noUnusedRule.ts
@@ -89,7 +89,7 @@ function containsJsx(node: ts.Node): boolean | undefined {
89
switch (node.kind) {
90
case ts.SyntaxKind.JsxElement:
91
case ts.SyntaxKind.JsxSelfClosingElement:
92
- // TODO add JsxFragment
+ case ts.SyntaxKind.JsxFragment:
93
return true;
94
default:
95
return ts.forEachChild(node, containsJsx);
test/rules/no-unused/default/jsx-fragment.tsx.lint
@@ -0,0 +1,4 @@
1
+import * as React from 'react';
2
+
3
+let foo = <></>;
4
+ ~~~ [Variable 'foo' is unused.]
0 commit comments