File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ " eslint-plugin-prettier " : patch
3+ ---
4+
5+ fix: ` parserPath ` type might be ` undefined ` on Eslint Falt Config
Original file line number Diff line number Diff line change 22
33/**
44 * @typedef {import('prettier').FileInfoOptions } FileInfoOptions
5- * @typedef {import('prettier').Options & { onDiskFilepath: string, parserPath: string, usePrettierrc?: boolean } } Options
5+ * @typedef {import('prettier').Options & { onDiskFilepath: string, parserPath? : string, usePrettierrc?: boolean } } Options
66 */
77
88const { runAsWorker } = require ( 'synckit' ) ;
@@ -112,7 +112,10 @@ runAsWorker(
112112 // it could be processed by `@ota-meshi/eslint-plugin-svelte`, `eslint-plugin-svelte` or `eslint-plugin-svelte3`
113113 case 'svelte' : {
114114 // The `source` would be modified by `eslint-plugin-svelte3`
115- if ( ! parserPath . includes ( 'svelte-eslint-parser' ) ) {
115+ if (
116+ typeof parserPath === 'string' &&
117+ ! parserPath . includes ( 'svelte-eslint-parser' )
118+ ) {
116119 // We do not support `eslint-plugin-svelte3`,
117120 // the users should run `prettier` on `.svelte` files manually
118121 return ;
You can’t perform that action at this time.
0 commit comments