From 6f0fbceaf213f523bc68d23ea28fd457499f3a75 Mon Sep 17 00:00:00 2001 From: Luca Casonato Date: Fri, 27 Sep 2024 16:14:17 +0200 Subject: fix(lint): correctly handle old jsx in linter (#25902) Previously the CLI was incorrectly reporting `React` as unused in a JSX file that uses the "old" transform. The LSP was already handling this correctly. --- tests/specs/lint/jsx/react-jsx.out | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 tests/specs/lint/jsx/react-jsx.out (limited to 'tests/specs/lint/jsx/react-jsx.out') diff --git a/tests/specs/lint/jsx/react-jsx.out b/tests/specs/lint/jsx/react-jsx.out new file mode 100644 index 000000000..c8c700779 --- /dev/null +++ b/tests/specs/lint/jsx/react-jsx.out @@ -0,0 +1,12 @@ +error[no-unused-vars]: `React` is never used + --> [WILDCARD]mod.tsx:1:7 + | +1 | const React = { createElement() {} }; + | ^^^^^ + = hint: If this is intentional, prefix it with an underscore like `_React` + + docs: https://lint.deno.land/rules/no-unused-vars + + +Found 1 problem +Checked 1 file -- cgit v1.2.3