Description
What version of eslint
are you using?
8.57.0
What version of prettier
are you using?
Not installed as a dep of our project, but npx prettier --version
returns 3.2.5
What version of eslint-plugin-prettier
are you using?
5.2.1
Please paste any applicable config files that you're using (e.g. .prettierrc
or .eslintrc
files)
What source code are you linting?
.vue/.ts
What did you expect to happen?
For the linter to succeed
What actually happened?
In our the CI build, we have (seemingly random - as repeated runs causes it to pass) errors during linting.
Local runs of the linter do not fail, only in the CI.
Our error looks something similar to this (I've removed some details to make it more readable) & mentions synckit
which was upgraded in the latest version of eslint-plugin-prettier
.
Oops! Something went wrong! :(
ESLint: 8.57.0
TypeError: Cannot read properties of undefined (reading 'message')
Occurred while linting /path/to/file.ts:2
Rule: "prettier/prettier"
at syncFn (/....../node_modules/.pnpm/[email protected]/node_modules/synckit/lib/index.cjs:362:59)
at Program (/....../node_modules/.pnpm/[email protected][email protected][email protected][email protected][email protected]/node_modules/eslint-plugin-prettier/eslint-plugin-prettier.js:191:32)
at ruleErrorHandler (/....../node_modules/.pnpm/[email protected]/node_modules/eslint/lib/linter/linter.js:1076:28)
at /....../node_modules/.pnpm/[email protected]/node_modules/eslint/lib/linter/safe-emitter.js:45:58
at Array.forEach (<anonymous>)
at Object.emit (/....../node_modules/.pnpm/[email protected]/node_modules/eslint/lib/linter/safe-emitter.js:45:38)
at NodeEventGenerator.applySelector (/....../node_modules/.pnpm/[email protected]/node_modules/eslint/lib/linter/node-event-generator.js:297:26)
at NodeEventGenerator.applySelectors (/....../node_modules/.pnpm/[email protected]/node_modules/eslint/lib/linter/node-event-generator.js:326:22)
at NodeEventGenerator.enterNode (/....../node_modules/.pnpm/[email protected]/node_modules/eslint/lib/linter/node-event-generator.js:340:14)
at CodePathAnalyzer.enterNode (/....../node_modules/.pnpm/[email protected]/node_modules/eslint/lib/linter/code-path-analysis/code-path-analyzer.js:803:23)
Downgrading to the previous version we had installed 5.1.3
, looks to fix the issue.