Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix(typescript-estree): factor tsconfigRootDir into allowDefaultProject#9675

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -202,8 +202,12 @@ export function useProgramFromProjectService(
filePathAbsolute,
);

const filePathRelative = path.relative(
parseSettings.tsconfigRootDir,
filePathAbsolute,
);
const isDefaultProjectAllowed = filePathMatchedBy(
parseSettings.filePath,
filePathRelative,
serviceSettings.allowDefaultProject,
);

Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -57,6 +57,7 @@ const mockFileName = 'camelCaseFile.ts';
const mockParseSettings = {
filePath: `path/PascalCaseDirectory/${mockFileName}`,
extraFileExtensions: [] as readonly string[],
tsconfigRootDir: currentDirectory,
} as ParseSettings;

const createProjectServiceSettings = <
Expand DownExpand Up@@ -106,10 +107,12 @@ describe('useProgramFromProjectService', () => {
);

expect(service.openClientFile).toHaveBeenCalledWith(
path.normalize('/repos/repo/path/PascalCaseDirectory/camelCaseFile.ts'),
undefined,
path.normalize(
`${currentDirectory}/path/PascalCaseDirectory/camelCaseFile.ts`,
),
undefined,
undefined,
currentDirectory,
);
});

Expand DownExpand Up@@ -184,7 +187,7 @@ See https://typescript-eslint.io/troubleshooting/typed-linting#allowdefaultproje
Matching files:
- a
- b
- ${path.normalize('/repos/repo/path/PascalCaseDirectory/camelCaseFile.ts')}
- ${path.normalize(`${currentDirectory}/path/PascalCaseDirectory/camelCaseFile.ts`)}

If you absolutely need more files included, set parserOptions.projectService.maximumDefaultProjectFileMatchCount_THIS_WILL_SLOW_DOWN_LINTING to a larger value.
`);
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp