TSConfig
plugins
在编辑器内运行的语言服务插件列表。
🌐 List of language service plugins to run inside the editor.
语言服务插件是一种基于现有 TypeScript 文件向用户提供额外信息的方式。它们可以增强 TypeScript 与编辑器之间的现有消息,或提供自己的错误信息。
🌐 Language service plugins are a way to provide additional information to a user based on existing TypeScript files. They can enhance existing messages between TypeScript and an editor, or to provide their own error messages.
例如:
🌐 For example:
- ts-sql-plugin — 为模板字符串 SQL 构建器添加 SQL 检查功能。
- typescript-styled-plugin — 在模板字符串中提供 CSS 语法检查。
- typescript-eslint-language-service — 在编译器输出中提供 eslint 错误信息和自动修复功能。
- ts-graphql-plugin — 在 GraphQL 查询模板字符串中提供验证和自动补全。
VS Code 具有让扩展自动包含语言服务插件的功能,因此你可能在编辑器中已经有一些在运行,而无需在你的 tsconfig.json 中定义它们。
🌐 VS Code has the ability for a extension to automatically include language service plugins, and so you may have some running in your editor without needing to define them in your tsconfig.json.