# no-mixed-completion-style

Rule `sonarjs/no-mixed-completion-style`. Test and hook callbacks should use a single completion style

- Source: sonarjs
- Technologies: JavaScript
- Kind: correctness
- Needs type information: no
- Autofix: no
- Reach: 0 weekly downloads of presets that enable it
- Trend: 0% last quarter
- Rank: #2155 by reach

## Linters

| Linter | Rule name | Recommended | Autofix | Details | Docs |
| --- | --- | --- | --- | --- | --- |
| ESLint | `sonarjs/no-mixed-completion-style` | no | no | package `eslint-plugin-sonarjs` | [docs](https://rules.sonarsource.com/javascript/RSPEC-8960/) |

## Enable it

### ESLint: `eslint.config.js`

```js
export default [
  {
    rules: {
      "sonarjs/no-mixed-completion-style": "error",
    },
  },
];
```

## Related rules

- [sonarjs/no-nested-incdec](https://lintradar.dev/rules/sonarjs/no-nested-incdec.md): Increment (++) and decrement (--) operators should not be used in a method call or mixed with other operators in an expression
- [sonarjs/no-incorrect-string-concat](https://lintradar.dev/rules/sonarjs/no-incorrect-string-concat.md): Strings and non-strings should not be added
- [sonarjs/no-networkidle-wait](https://lintradar.dev/rules/sonarjs/no-networkidle-wait.md): Playwright "networkidle" waits should not be used
- [sonarjs/no-inconsistent-returns](https://lintradar.dev/rules/sonarjs/no-inconsistent-returns.md): Functions should use "return" consistently
- [sonarjs/no-implicit-dependencies](https://lintradar.dev/rules/sonarjs/no-implicit-dependencies.md): Dependencies should be explicit
- [sonarjs/no-reference-error](https://lintradar.dev/rules/sonarjs/no-reference-error.md): Variables should be defined before being used

---

Web page: https://lintradar.dev/rules/sonarjs/no-mixed-completion-style. Data from npm and the linters' documentation, collected Dec 4, 2026. Site guide for agents: https://lintradar.dev/llms.txt
