Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/visual-studio-code/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Typescript VSCode/w。字体脚本Monorepo中更漂亮_Typescript_Visual Studio Code_Prettier - Fatal编程技术网

Typescript VSCode/w。字体脚本Monorepo中更漂亮

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": [

我目前正在Monorepo设置中通过VSCode扩展使用Prettier。问题是Prettier在我的
api
文件夹中不能完全工作。它不尊重默认的线宽,分号不会自动变为空。奇怪的是,我的
www
文件夹照常工作,我没有任何遗漏的更漂亮的功能

Prettier配置通过VSCode中的“用户设置”设置为全局

  • www
    -NextJS
  • api
    -阿波罗服务器
www/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/*"]
    }
  }
}
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/*"]
    }
  }
}
尝试将添加到项目的根目录中,并提供您想要的所有选项