Skip to content

Commit 084e817

Browse files
committed
Update test timeout and add no-restricted-import rule for commander imports
1 parent 823187b commit 084e817

File tree

3 files changed

+11
-2
lines changed

3 files changed

+11
-2
lines changed

eslint.config.mjs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,15 @@ export default tseslint.config(
2828
'import/order': 'warn',
2929

3030
'no-constant-condition': ['warn', { checkLoops: false }],
31+
'no-restricted-imports': [
32+
'error',
33+
{
34+
paths: [{
35+
name: 'commander',
36+
message: 'Import from @commander-js/extra-typings instead'
37+
}]
38+
}
39+
],
3140
'no-var': 'off', // TODO: Remove
3241
'object-shorthand': ['warn', 'properties'],
3342
'prefer-const': 'off', // TODO: Remove

src/runner/__tests__/modules.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ describe.each(describeCases)(
6262
return [`Testing ${chapterName}`, chapterVal, variant] as [string, Chapter, Variant]
6363
})
6464

65-
test.each(chapterCases)('%s', (_, chapter, variant) => {
65+
test.each(chapterCases)('%s', { timeout: 10_000 }, (_, chapter, variant) => {
6666
return expectFinishedResult(code, { chapter, variant }).toEqual('foo')
6767
})
6868
}

src/utils/testing/misc.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { expect, test, type TestContext as VitestTestContext } from 'vitest'
22
import type { Result } from '../..'
3-
import { Finished, Value, Node, NodeTypeToNode } from '../../types'
3+
import type { Finished, Value, Node, NodeTypeToNode } from '../../types'
44
import { Chapter } from '../../langs'
55
import { getChapterName } from '../misc'
66
import type { TestBuiltins, TestOptions } from './types'

0 commit comments

Comments
 (0)