eslint-config-turbo
eslint-config-turbo
软件包 帮助你查找代码中使用的、不属于 Turborepo 哈希计算的环境变量。源代码中使用的、在 turbo.json
中未考虑的环境变量将在编辑器中高亮显示,错误将显示为 ESLint 输出。
¥The eslint-config-turbo
package helps you find environment variables that are used in your code that are not a part of Turborepo's hashing. Environment variables used in your source code that are not accounted for in turbo.json
will be highlighted in your editor and errors will show as ESLint output.
安装
¥Installation
将 eslint-config-turbo
安装到保存 ESLint 配置的位置:
¥Install eslint-config-turbo
into the location where your ESLint configuration is held:
用法(扁平配置 eslint.config.js
)
¥Usage (Flat Config eslint.config.js
)
你还可以配置配置中可用的规则:
¥You can also configure rules available in the configuration:
用法(旧版 eslintrc*
)
¥Usage (Legacy eslintrc*
)
将 turbo
添加到 eslint 配置文件的 extends 部分。你可以省略 eslint-config-
前缀:
¥Add turbo
to the extends section of your eslint configuration file. You can omit the eslint-config-
prefix:
你还可以配置配置中可用的规则:
¥You can also configure rules available in the configuration: