Typescript VSCode/w。字体脚本Monorepo中更漂亮
我目前正在Monorepo设置中通过VSCode扩展使用Prettier。问题是Prettier在我的Typescript VSCode/w。字体脚本Monorepo中更漂亮,typescript,visual-studio-code,prettier,Typescript,Visual Studio Code,Prettier,我目前正在Monorepo设置中通过VSCode扩展使用Prettier。问题是Prettier在我的api文件夹中不能完全工作。它不尊重默认的线宽,分号不会自动变为空。奇怪的是,我的www文件夹照常工作,我没有任何遗漏的更漂亮的功能 Prettier配置通过VSCode中的“用户设置”设置为全局 www-NextJS api-阿波罗服务器 www/tsconfig.json { "compilerOptions": { "target": "es5", "lib": [
api
文件夹中不能完全工作。它不尊重默认的线宽,分号不会自动变为空。奇怪的是,我的www
文件夹照常工作,我没有任何遗漏的更漂亮的功能
Prettier配置通过VSCode中的“用户设置”设置为全局
-NextJSwww
-阿波罗服务器api
{
"compilerOptions": {
"target": "es5",
"lib": ["dom", "dom.iterable", "esnext"],
"allowJs": true,
"skipLibCheck": true,
"strict": true,
"allowSyntheticDefaultImports": true,
"forceConsistentCasingInFileNames": true,
"noUnusedLocals": true,
"noEmit": true,
"esModuleInterop": true,
"module": "esnext",
"moduleResolution": "node",
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "preserve"
}
}
{
"compilerOptions": {
"module": "commonjs",
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"target": "es6",
"moduleResolution": "node",
"sourceMap": true,
"outDir": "dist",
"baseUrl": ".",
"paths": {
"*": ["node_modules/*", "src/types/*"]
}
}
}
api/tsconfig.json
{
"compilerOptions": {
"target": "es5",
"lib": ["dom", "dom.iterable", "esnext"],
"allowJs": true,
"skipLibCheck": true,
"strict": true,
"allowSyntheticDefaultImports": true,
"forceConsistentCasingInFileNames": true,
"noUnusedLocals": true,
"noEmit": true,
"esModuleInterop": true,
"module": "esnext",
"moduleResolution": "node",
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "preserve"
}
}
{
"compilerOptions": {
"module": "commonjs",
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"target": "es6",
"moduleResolution": "node",
"sourceMap": true,
"outDir": "dist",
"baseUrl": ".",
"paths": {
"*": ["node_modules/*", "src/types/*"]
}
}
}
尝试将添加到项目的根目录中,并提供您想要的所有选项