I noticed that the valid-title rule doesn't use typed linting to determine whether a title is a string. That means dynamic nodes such as Identifiers will always be detected as non-strings:
for (const {name, input, expected} of cases) {
it(name, () => expect(process(input)).toEqual(expected));
// ~~~~ Title must be a string
}
let nameBase = "My name: ";
const makeName = (suffix: string) => `first ${suffix}`;
describe(makeName("second"), () => { /* ... */ }
// ~~~~~ Title must be a string
ACK that this has been brought up before (see next list). But it's really quite inconvenient to have to eslint-disable for every dynamic test name. Could an option similar to the Vitest ESLint plugin to allow using type checking on test names be marked as accepting PRs, please?
Relevant other issues:
I noticed that the
valid-titlerule doesn't use typed linting to determine whether a title is a string. That means dynamic nodes such as Identifiers will always be detected as non-strings:ACK that this has been brought up before (see next list). But it's really quite inconvenient to have to eslint-disable for every dynamic test name. Could an option similar to the Vitest ESLint plugin to allow using type checking on test names be marked as accepting PRs, please?
Relevant other issues: