UNPKG

increment-type-check

Version:

用于 TS 项目的增量检查工具,可以帮助你管理存量错误并专注于新代码的质量。

22 lines 1.38 kB
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.isUpdateTsCheckIgnore = exports.tsCheckIgnorePath = exports.tempTsConfigTip = exports.tempConfigPath = exports.rootDir = exports.root = void 0; const path_1 = __importDefault(require("path")); exports.root = process.cwd(); exports.rootDir = exports.root + path_1.default.sep; exports.tempConfigPath = path_1.default.join(exports.root, "tsCheckConfig.json"); /** * 生成校验时的临时tsconfig配置,(为什么需要生成临时配置文件来校验,主要是为了支持能在lint-staged中对部分文件进行校验) * 但是目前tsc不支持-p 与 指定文件同时指定,有关方案仍在讨论中:https://github.com/microsoft/TypeScript/issues/27379 */ exports.tempTsConfigTip = `// 该文件为增TS校验生成的临时配置文件,请勿修改 \n`; exports.tsCheckIgnorePath = path_1.default.join(exports.root, ".tsCheckIgnore"); /** * 当许多存量文件已经修复了 TypeScript 问题,但这些文件仍然被记录在 .tsCheckIgnore 文件中时, * 可以启用此配置项,并触发对 .tsCheckIgnore 文件内容的更新。 */ exports.isUpdateTsCheckIgnore = false; //# sourceMappingURL=constants.js.map