Skip to content
Merged
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
7 changes: 6 additions & 1 deletion frontend/eslint.config.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,12 @@ describe('messages/failure-text', { timeout: 60_000 }, () => {
// The project service gives each file the text that the test lints, so the path must be a file of the app.
const fileThatTheExampleWipeKeeps = 'src/components/query-error.tsx'
const failureTextMessages = async (code, filePath = fileThatTheExampleWipeKeeps) => {
const eslint = new ESLint({ cwd: import.meta.dirname })
// With CI=true, typescript-eslint infers a single run. It then takes each lint of a path after the first for a --fix
// pass and gives it a program with no types. Each test lints the same path.
const eslint = new ESLint({
cwd: import.meta.dirname,
overrideConfig: { languageOptions: { parserOptions: { disallowAutomaticSingleRunInference: true } } },
})
const [result] = await eslint.lintText(code, { filePath })
return result.messages.filter((message) => message.ruleId === 'messages/failure-text').map((message) => message.messageId)
}
Expand Down
Loading