UNPKG

@ant-design/tools

Version:
22 lines 568 B
import * as fs from 'fs-extra'; import { getProjectPath } from "./utils/projectHelper"; export default function () { let my = {}; if (fs.existsSync(getProjectPath('tsconfig.json'))) { my = fs.readJsonSync(getProjectPath('tsconfig.json')); } const defaultOptions = { noUnusedParameters: true, noUnusedLocals: true, strictNullChecks: true, target: 'es2020', jsx: 'preserve', moduleResolution: 'node', declaration: true, allowSyntheticDefaultImports: true }; return { ...defaultOptions, ...my.compilerOptions }; }