fix: preserve lint migration contracts

This commit is contained in:
Tianyi Cui
2026-07-29 22:38:20 +08:00
parent 5fb4bd66d7
commit e91ef39f5a
22 changed files with 401 additions and 214 deletions

View File

@@ -121,7 +121,7 @@ describe('Oxlint gate', () => {
})
})
it('passes the configured native thread bound to Oxlint', () => {
it('passes the configured worker bound to both Oxlint backends', () => {
const subject = withEnv('DSH_OXLINT_THREADS', '4', () =>
withPnpmEntrypoint(() => gatesForMode('ci-lint')[0]))
@@ -130,10 +130,11 @@ describe('Oxlint gate', () => {
displayCommand: 'pnpm exec oxlint . --threads=4',
command: process.execPath,
args: ['/private/pnpm.cjs', 'exec', 'oxlint', '.', '--threads=4'],
env: { GOMAXPROCS: '4' },
})
})
it('rejects a non-positive or non-integer native thread bound', () => {
it('rejects a non-positive or non-integer worker bound', () => {
expect(() => withEnv('DSH_OXLINT_THREADS', 'auto', () =>
withPnpmEntrypoint(() => gatesForMode('ci-lint'))))
.toThrow('DSH_OXLINT_THREADS must be a positive integer')