TypeScript-ESLint is trying to parse markdown files
I've not tried to setup ESLint like this before; I want to have a single source of truth at the root of a monorepo, and from there I'll be formatting
*.ts
, *.svelte
, *.md
, and *.[c|m]?js
.
Basically, I have no idea what I'm doing, and the documentation doesn't have a section on "what to do when a TS parser parses markdown". I've tried looking online, but I must be using the wrong search terms, all im getting is the packages, not any info on the conflict between them.
The plugins I'm using are (from package.json devDeps);
In my .eslintrc.cjs
I've set parser: "@typescript-eslint/parser"
, however in the overrides
I've added the following object to the array;
Which I thought would override
the parser
for *.md
files, apparently not.
This error is produced for the first (alphabetically) markdown file in the project, with the first (alphabetically) rule from plugin:@typescript-eslint/recommended-requiring-type-checking
.
Interestingly, even if I explicitly exclude the file in the top-level tsconfig via "exclude": ["./README.md"]
(or whatever name I want to exclude), TS ESLint will still try to parse it, and of course fail.
Full config files;
TSConfig: https://pastebin.com/0RGBfAru
ESLintRC: https://pastebin.com/nTCW0vjc
PrettierRC: https://pastebin.com/bK0NjR0N
Package.json: https://pastebin.com/H0fiQ5wM1 Reply
I managed to sort it out, but it took way more effort than it should. I think the config has been patch ontop of patch for some time and is probably due an overhaul