-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Don't match path on prefix alone #68
Conversation
would love to see this merged if it passes tests. I have the same issue. |
if anyone else ends up here, I ended up for now just using pnpm's built in |
Thanks for contribution! Published with |
Hey. My use case was to use exact file path like |
@solomkinmv If you want to contribute, I think a fix would be: const posixFilePath = getPosixFilePath(filePath);
const posixStrictPath = getPosixFilePath(absolutePathToStrictFiles);
return posixFilePath === posixStrictPath || posixFilePath.startsWith(posixStrictPath + path.posix.sep); |
This breaks every file paths. So the {
"compilerOptions": {
...
"strict": false,
"plugins": [
{
"name": "typescript-strict-plugin",
"paths": [
"./src",
"/absolute/path/to/source/"
],
"exclude": [
"./src/tests",
"./src/fileToExclude.ts"
],
"excludePattern": [
"**/*.spec.ts"
]
}
]
}
} |
Submitted a PR (#86) to fix this. Thanks @heyimalex! |
Noticed that
path/to/good
was matchingpath/to/goodness-no/file.ts
, so just the prefix and not the exact directory. I will maybe add tests this weekend.