Bug?: type-utils > TypeOrValueSpecifier's file detection is case insensitive #6697
Closed
4 tasks done
Labels
accepting prs
Go ahead, send a pull request that resolves this issue
bug
Something isn't working
package: type-utils
Issues related to the @typescript-eslint/type-utils package
Milestone
Before You File a Proposal Please Confirm You Have Done The Following...
Relevant Package
type-utils
My proposal is suitable for this project
Description
Following up from https://github.com/typescript-eslint/typescript-eslint/pull/4436/files#r1134626465: in order to get the PR merged, the "is this type declared in one of these files?" logic (
typeDeclaredInFile
) logic was changed to be case insensitive. It.toLowerCase()
s all strings.That means this config:
...will match
./filename
,./Filename
,./FILENAME
, and so on.This case insensitivity probably won't matter in any projects. But most file systems are in fact case sensitive. So we really should get it to work at some point.
Additional Info
To start on this issue, remove the
.toLowerCase()
calls intypeDeclaredInFile
.typescript-eslint/packages/type-utils/src/TypeOrValueSpecifier.ts
Line 130 in 346fdbc
Re-run unit tests for
type-utils
andeslint-plugin
. You'll also want to add unit tests toTypeOrValueSpecifier.test.ts
to make sure that case sensitivity is respected.The text was updated successfully, but these errors were encountered: