Skip to content

Commit

Permalink
fix: dts lint --write-file
Browse files Browse the repository at this point in the history
refs: #148
  • Loading branch information
aladdin-add committed Apr 21, 2022
1 parent ba911f1 commit bc3c10d
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/createEslintConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,7 @@ export async function createEslintConfig({
const file = path.join(rootDir, '.eslintrc.js');
// if the path is an abs path(e.g. "/Users/user/my-project/.eslintrc.js"),
// need to convert a rel path to app root.
config.extends = config.extends.map((it) =>
/^\//u.test(it) ? path.relative(rootDir, it) : it
);
config.extends[0] = './' + path.relative(rootDir, config.extends[0]);
try {
await fs.writeFile(
file,
Expand Down

0 comments on commit bc3c10d

Please sign in to comment.