jest/no-unnecessary-assertion
eslint-plugin-jest
No autofix
eslint.config.js
import jest from "eslint-plugin-jest";
export default [
{
plugins: { jest },
rules: {
"jest/no-unnecessary-assertion": "error",
},
},
];Disallow unnecessary assertions based on types
No code example for this rule
The linters' documentation does not include one we could extract.
No tracked preset enables this rule, so it has no reach yet.
None of the tracked presets enable this rule. Turn it on with the config below.
jest/no-unnecessary-assertion
eslint-plugin-jest
import jest from "eslint-plugin-jest";
export default [
{
plugins: { jest },
rules: {
"jest/no-unnecessary-assertion": "error",
},
},
];Oxlint does not have this rule.
Biome does not have this rule.
Enforce unbound methods are called with their expected scope
Require that resolve and reject modifiers are present (and only) for promise-like types