UNPKG

ffbt

Version:

Build a Typescript app without pain

25 lines (24 loc) 986 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.createTsLintConfig = void 0; const path = require("path"); const locate_1 = require("../../core/locate"); const project_config_1 = require("../../project-config"); function getDefaultConfigPath() { return locate_1.locateFile("tslint.json", __dirname); } function createTsLintConfig(options) { const config = project_config_1.ProjectConfig.loadFromFile(options.path); const customConfigPath = locate_1.locateFile("tslint.json", config.paths.projectRoot, false); const lintConfigPath = customConfigPath || getDefaultConfigPath(); return { config: lintConfigPath, exclude: ["node_modules/**"], files: [path.resolve(config.paths.projectWorkingDirectory, "./**/*.ts?(x)")], fix: options.fix, force: options.force, format: "stylish", project: config.paths.projectTsConfig, }; } exports.createTsLintConfig = createTsLintConfig;