Skip to content

Commit ac927b0

Browse files
committed
fix: cli-suggest-remove-files
1 parent 459a726 commit ac927b0

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

src/cli/run.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,8 @@ module.exports = kirklin({\n${kirklinConfig}\n})
101101
const files = fs.readdirSync(cwd);
102102
const legacyConfig: string[] = [];
103103
files.forEach((file) => {
104-
if (file.includes("eslint") || file.includes("prettier")) {
104+
if (/eslint|prettier/.test(file)
105+
&& !/eslint.config./.test(file)) {
105106
legacyConfig.push(file);
106107
}
107108
});

src/globs.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ export const GLOB_EXCLUDE = [
7272
"**/.cache",
7373
"**/.output",
7474
"**/.vite-inspect",
75+
"**/.yarn",
7576

7677
"**/CHANGELOG*.md",
7778
"**/*.min.*",

test/cli.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,5 +86,5 @@ it("suggest remove unnecessary files", async () => {
8686
const { stdout } = await run();
8787

8888
expect(stdout).toContain("you can now remove those files manually");
89-
expect(stdout).toContain(".eslintignore, .eslintrc.yml, .prettierc, .prettierignore, eslint.config.js");
89+
expect(stdout).toContain(".eslintignore, .eslintrc.yml, .prettierc, .prettierignore");
9090
});

0 commit comments

Comments
 (0)