Skip to content

Commit

Permalink
fix: cli-suggest-remove-files (#418)
Browse files Browse the repository at this point in the history
  • Loading branch information
injurka committed Mar 13, 2024
1 parent cda35da commit 30229d3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/cli/run.ts
Expand Up @@ -99,7 +99,8 @@ module.exports = antfu({\n${antfuConfig}\n})
const files = fs.readdirSync(cwd)
const legacyConfig: string[] = []
files.forEach((file) => {
if (file.includes('eslint') || file.includes('prettier'))
if (/eslint|prettier/.test(file)
&& !/eslint.config./.test(file))
legacyConfig.push(file)
})
if (legacyConfig.length) {
Expand Down
2 changes: 1 addition & 1 deletion test/cli.spec.ts
Expand Up @@ -86,5 +86,5 @@ it('suggest remove unnecessary files', async () => {
const { stdout } = await run()

expect(stdout).toContain('you can now remove those files manually')
expect(stdout).toContain('.eslintignore, .eslintrc.yml, .prettierc, .prettierignore, eslint.config.js')
expect(stdout).toContain('.eslintignore, .eslintrc.yml, .prettierc, .prettierignore')
})

0 comments on commit 30229d3

Please sign in to comment.