[Bug]: `unused_variable` throws when import is only used for Luau type
TreehouseFalcon opened this issue · 1 comments
TreehouseFalcon commented
Selene currently throws an unused_variable
lint when an imported module is only used for its exported Luau types. Specifically, this only seems to occur when the usage is wrapped in a typeof()
call.
Reproduction:
package.lua
return {
Bar = "hello",
}
impl.lua
local Foo = require("package.lua")
type Bar = typeof(Foo.Bar)
The Selene VSCode extension immediately starts linting when these two files are set up.
I believe this is related to #423.
TreehouseFalcon commented
Just realized with updated context that this is a duplicate of #337