# links-identical-texts-different-targets

Rule `sonarjs/links-identical-texts-different-targets`. Links with identical accessible names should have identical targets

- Source: sonarjs
- Technologies: JavaScript
- Kind: style
- Needs type information: no
- Autofix: no
- Reach: 6.2M weekly downloads of presets that enable it
- Trend: +62.1% last quarter
- Rank: #1233 by reach, #534 by growth

## Linters

| Linter | Rule name | Recommended | Autofix | Details | Docs |
| --- | --- | --- | --- | --- | --- |
| ESLint | `sonarjs/links-identical-texts-different-targets` | yes | no | package `eslint-plugin-sonarjs` | [docs](https://rules.sonarsource.com/javascript/RSPEC-1101/) |

## Enable it

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

```js
export default [
  {
    rules: {
      "sonarjs/links-identical-texts-different-targets": "error",
    },
  },
];
```

## Presets that enable it

| Preset | Linter | Package | Rules | Weekly downloads | Trend |
| --- | --- | --- | --- | --- | --- |
| [SonarJS recommended](https://lintradar.dev/presets/sonarjs-recommended.md) | ESLint | `eslint-plugin-sonarjs` | 230 | 6.2M | +62.1% |

## Related rules

- [sonarjs/link-with-target-blank](https://lintradar.dev/rules/sonarjs/link-with-target-blank.md): Opened windows should not have access to the originating page
- [sonarjs/max-switch-cases](https://lintradar.dev/rules/sonarjs/max-switch-cases.md): "switch" statements should not have too many "case" clauses
- [sonarjs/label-position](https://lintradar.dev/rules/sonarjs/label-position.md): Only "while", "do", "for" and "switch" statements should be labelled
- [sonarjs/memoize-cache-key](https://lintradar.dev/rules/sonarjs/memoize-cache-key.md): Lodash and Underscore.js `memoize` calls on functions with multiple parameters should use an explicit cache key function
- [sonarjs/jsx-no-leaked-render](https://lintradar.dev/rules/sonarjs/jsx-no-leaked-render.md): React components should not render non-boolean condition values
- [sonarjs/misplaced-loop-counter](https://lintradar.dev/rules/sonarjs/misplaced-loop-counter.md): "for" loop increment clauses should modify the loops' counters

---

Web page: https://lintradar.dev/rules/sonarjs/links-identical-texts-different-targets. Data from npm and the linters' documentation, collected Dec 4, 2026. Site guide for agents: https://lintradar.dev/llms.txt
