Closed
Description
Does this issue occur when all extensions are disabled?: Yes
- VS Code Version: 1.74.2
- OS Version: macOS Monterey 12.6
Steps to Reproduce:
- Commented out all of my
settings.json
file, so uses the default settings - Restart VSCode with Extensions Disabled
- In certain
.ts
files in my project, when I go to import another.ts
file the autocomplete option for the import adds a.js
file extension. - The same import made in another
.ts
file in the same directory or another directory, does not append the.js
file extension. - Sometimes in the
.ts
file(s) that appends the.js
file extension on the auto import, when I remove all of the code and then try to import, it does not append the.js
extension. But if I close the file and re-open it again, it will. But this is intermittent. - See Videos below for issue
- Sorry, had to split in 2 due to file sizes
Screen.Recording.2022-12-29.at.21.16.32.mov
Screen.Recording.2022-12-29.at.21.18.10.mov
Not sure how much the tsconfig.json
file can affect this but this is my ts config.
{
"compilerOptions": {
"target": "es2017",
"lib": ["dom", "dom.iterable", "esnext"],
"allowJs": true,
"skipLibCheck": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
"noEmit": true,
"esModuleInterop": true,
"module": "esnext",
"moduleResolution": "node",
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "preserve",
"incremental": true,
"noUncheckedIndexedAccess": true,
"noUnusedLocals": true /* Report errors on unused locals. */,
"noUnusedParameters": true /* Report errors on unused parameters. */,
"allowSyntheticDefaultImports": true /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */,
"noImplicitAny": true,
"strictNullChecks": true,
"strictFunctionTypes": true,
"noImplicitThis": true,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true
},
"include": ["next-env.d.ts", "types/**/*.ts", "next-auth.d.ts", "**/*.ts", "**/*.tsx", "**/*.js", "**/*.cjs", "**/*.mjs"],
"exclude": ["node_modules"]
}