Skip to content

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

Description

@marek-saji

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'],
  },
]);
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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

  • Status
    Ready to Implement

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions