Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test lint config after first-time setup #67146

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 0 additions & 17 deletions test/integration/eslint/test/next-build.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { join } from 'path'

import { nextBuild } from 'next-test-utils'

const dirFirstTimeSetup = join(__dirname, '../first-time-setup')
const dirCustomConfig = join(__dirname, '../custom-config')
const dirIgnoreDuringBuilds = join(__dirname, '../ignore-during-builds')
const dirBaseDirectories = join(__dirname, '../base-directories')
Expand All @@ -23,22 +22,6 @@ describe('Next Build', () => {
;(process.env.TURBOPACK_DEV ? describe.skip : describe)(
'production mode',
() => {
test('first time setup', async () => {
const eslintrcJson = join(dirFirstTimeSetup, '.eslintrc.json')
await fs.writeFile(eslintrcJson, '')

const { stdout, stderr } = await nextBuild(dirFirstTimeSetup, [], {
stdout: true,
stderr: true,
lint: true,
})
const output = stdout + stderr

expect(output).toContain(
'No ESLint configuration detected. Run next lint to begin setup'
)
})

test('shows warnings and errors', async () => {
const { stdout, stderr } = await nextBuild(dirCustomConfig, [], {
stdout: true,
Expand Down
7 changes: 7 additions & 0 deletions test/production/eslint/first-time-setup-ts/pages/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
export default function Test() {
return (
<div>
<h1>Hello title</h1>
</div>
)
}
7 changes: 7 additions & 0 deletions test/production/eslint/first-time-setup/pages/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
export default function Test() {
return (
<div>
<h1>Hello title</h1>
</div>
)
}
Loading
Loading