Skip to content

testCaseOnlyFlags

Reports test cases that are marked only: true.

✅ This rule is included in the flint logical presets.

Rule tester cases can temporarily use only: true during local debugging. That flag should not be committed, because it prevents the rest of the rule test suite from running.

ruleTester.describe(rule, {
valid: [{ code: "a", only: true }],
invalid: [],
});
ruleTester.describe(rule, {
valid: [],
invalid: [{ code: "a", only: true, snapshot: "..." }],
});

This rule is not configurable.

Made with ❤️‍🔥 around the world by the Flint team and contributors.