Skip to content

Commit

Permalink
chore: clear code
Browse files Browse the repository at this point in the history
  • Loading branch information
vitonsky committed Apr 13, 2024
1 parent 57c02c1 commit 7cb0326
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
3 changes: 1 addition & 2 deletions src/rules/alias.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ function findAlias(
filePath: string,
ignoredPaths: string[] = [],
) {
const { paths } = compilerOptions;
for (const [alias, aliasPaths] of Object.entries(paths)) {
for (const [alias, aliasPaths] of Object.entries(compilerOptions.paths)) {
// TODO: support full featured glob patterns instead of trivial cases like `@utils/*` and `src/utils/*`
const matchedPath = aliasPaths.find((dirPath) => {
// Remove last asterisk
Expand Down
1 change: 1 addition & 0 deletions testFiles/custom-tsconfig-with-foo-and-qux.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"compilerOptions": {
// Test comment, that must not break a parsing of config file
// See more info in https://github.com/vitonsky/eslint-plugin-paths/issues/37#issuecomment-2052542343
"baseUrl": ".",
"paths": {
"@foo/*": ["src/foo/*"],
Expand Down

0 comments on commit 7cb0326

Please sign in to comment.