Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/antfu/eslint-config into fe…
Browse files Browse the repository at this point in the history
…at/cli-presets
  • Loading branch information
injurka committed Mar 13, 2024
2 parents 1561293 + d41a5f0 commit b5999f7
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/cli/stages/update-eslint-files.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ ${result.template !== Template.Vanilla ? `${result.template}: true,` : ''}
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)
})

Expand Down
1 change: 1 addition & 0 deletions src/globs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ export const GLOB_EXCLUDE = [
'**/.cache',
'**/.output',
'**/.vite-inspect',
'**/.yarn',

'**/CHANGELOG*.md',
'**/*.min.*',
Expand Down
2 changes: 1 addition & 1 deletion test/cli.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ 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')
})

it('react template', async () => {
Expand Down

0 comments on commit b5999f7

Please sign in to comment.