eslint / eslint/markdown

Bug: `Custom getLoc() method must be implemented in the subclass.` error when using GFM language and error found for markdown/no-missing-label-refs

Open
#619 4 comments 0 reactions 1 assignee Claimed by @DMartens View on GitHub
accepted bug repro:yes
Dominant language
JavaScript
Stars
581
Forks
92
Avg merge
1d 4h
Merged PRs (30d)
11

Description

### Environment

ESLint version: 10.0.0
@eslint/markdown version: 7.5.1
Node version: 24.12.0
npm version: 11.6.2
Operating System: Linux

### Which language are you using?

gfm

### What did you do?

Configuration

```
import markdown from '@eslint/markdown';
import { defineConfig } from 'eslint/config';

export default defineConfig([
{
files: ['**/*.md'],
plugins: { markdown },
language: 'markdown/gfm',
extends: ['markdown/recommended'],
},
]);
```

```js
Hello [World][https://example.com]
```

### What did you expect to happen?

Markdown is incorrect, I was expecting to see an error message from `markdown/no-missing-label-refs`.

### What actually happened?

```
Oops! Something went wrong! :(

ESLint: 10.0.0

Error: Custom getLoc() method must be implemented in the subclass.
at MarkdownSourceCode.getLoc (file://…/node_modules/@eslint/plugin-kit/dist/esm/index.js:646:9)
at #flatVerifyWithoutProcessors (…/node_modules/eslint/lib/linter/linter.js:1269:33)
at Linter._verifyWithFlatConfigArrayAndWithoutProcessors (…/node_modules/eslint/lib/linter/linter.js:1333:43)
at Linter._verifyWithFlatConfigArray (…/node_modules/eslint/lib/linter/linter.js:1400:15)
at Linter.verify (…/node_modules/eslint/lib/linter/linter.js:861:9)
at Linter.verifyAndFix (…/node_modules/eslint/lib/linter/linter.js:1518:20)
at verifyText (…/node_modules/eslint/lib/eslint/eslint-helpers.js:1179:45)
at readAndVerifyFile (…/node_modules/eslint/lib/eslint/eslint-helpers.js:1320:10)
```

### Link to Minimal Reproducible Example

https://stackblitz.com/edit/stackblitz-starters-ywvxaxvu

### Participation

- [ ] I am willing to submit a pull request for this issue.

### Additional comments

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.