You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For the sake of brevity, I didn't include all of my local includes and rules. This is an abbreviated version of the shared config I am using. Ignore the random trailing commas, I don't use trailing commas, but I copy and pasted parts of the shared config I use and VS Code insisted on putting in trailing commas.
I expected to get a report of any code format issues in my code base.
What actually happened?
I got an error from ESLint :(
website on main [✘!?] via v18.17.1 took 17s
❯ pnpm eslint .
Oops! Something went wrong! :(
ESLint: 8.50.0
TypeError: Cannot read properties of undefined (reading 'includes')
at C:\Users\Seth Murphy\sources\website\node_modules\.pnpm\eslint-plugin-prettier@5.0.0_eslint-config-prettier@9.0.0_eslint@8.50.0_prettier@3.0.3\node_modules\eslint-plugin-prettier\worker.js:115:27
Crazy thing is, I don't know why this error is being thrown. The plugin is reading context.parserPath which is correct for a flat config. For reference, this is the line that is causing the error. Everything else works fine, but then again Svelte is the only case I have where this plugin specifically needs to check which parser is used. I know ESLint is reading the config correctly because everything else works fine, just not this. If I change the config to remove Prettier, everything is fine. I'm kinda stumped, but I don't know much about creating ESLint plugins.
I now know the issue. Everyone say it with me now..."Flat Config". Ugh. I hate paying the early adopter tax sometimes. I don't really know how to get around this one either. I guess, I'll just have to tell this plugin to avoid .svelte files for the time being.
The text was updated successfully, but these errors were encountered:
What version of
eslint
are you using?:8.50.0
What version of
prettier
are you using?:3.0.3
What version of
eslint-plugin-prettier
are you using?:5.0.0
Please paste any applicable config files that you're using (e.g.
.prettierrc
or.eslintrc
files)prettier.config.js
eslint.config.js
For the sake of brevity, I didn't include all of my local includes and rules. This is an abbreviated version of the shared config I am using. Ignore the random trailing commas, I don't use trailing commas, but I copy and pasted parts of the shared config I use and VS Code insisted on putting in trailing commas.
If you wish to see my actual
eslint.config.js
, this is itWhat source code are you linting?
.svelte
files in a SvelteKit project.What did you expect to happen?
I expected to get a report of any code format issues in my code base.
What actually happened?
I got an error from ESLint :(
Crazy thing is, I don't know why this error is being thrown. The plugin is readingcontext.parserPath
which is correct for a flat config. For reference, this is the line that is causing the error. Everything else works fine, but then again Svelte is the only case I have where this plugin specifically needs to check which parser is used. I know ESLint is reading the config correctly because everything else works fine, just not this. If I change the config to remove Prettier, everything is fine. I'm kinda stumped, but I don't know much about creating ESLint plugins.I now know the issue. Everyone say it with me now..."Flat Config". Ugh. I hate paying the early adopter tax sometimes. I don't really know how to get around this one either. I guess, I'll just have to tell this plugin to avoid
.svelte
files for the time being.The text was updated successfully, but these errors were encountered: