Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: parserPath type might be undefined on Eslint Flat Config #588

Merged
merged 3 commits into from Oct 11, 2023

Conversation

krist7599555
Copy link
Contributor

Fix this issue #584

to compatibility with Eslint Flat Config.
parserPath might be undefined and will throw error on worker. so check parserPath is string type before usage.

Maybe we can remove whole svelte block since eslint-plugin-svelte3 is deprecated

Compatibility with Eslint Flat Config.
parserPath might be undefined it will fail on worker
@changeset-bot
Copy link

changeset-bot bot commented Oct 7, 2023

🦋 Changeset detected

Latest commit: 092a6dd

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
eslint-plugin-prettier Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@krist7599555 krist7599555 changed the title fix: parserPath type might be undefined on Eslint Falt Config fix: parserPath type might be undefined on Eslint Flat Config Oct 7, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Oct 7, 2023

📊 Package size report   No changes

File Before After
Total (Includes all files) 24.7 kB 24.7 kB
Tarball size 8.2 kB 8.2 kB
Unchanged files
File Size
eslint-plugin-prettier.d.ts 117 B
eslint-plugin-prettier.js 7.4 kB
LICENSE.md 1.1 kB
package.json 2.6 kB
README.md 7.9 kB
worker.js 5.6 kB

🤖 This report was automatically generated by pkg-size-action

@JounQin
Copy link
Member

JounQin commented Oct 7, 2023

@krist7599555 Thanks for raising PR to fix the issue, but CI is broken unexpectedly, can you fix it?

@krist7599555
Copy link
Contributor Author

@JounQin might need a workflow approval

@JounQin JounQin merged commit 21a7146 into prettier:master Oct 11, 2023
4 of 5 checks passed
Woodpile37 added a commit to Woodpile37/EIPs that referenced this pull request Nov 11, 2023
<p>This PR was automatically created by Snyk using the credentials of a
real user.</p><br /><h3>Snyk has created this PR to upgrade
eslint-plugin-prettier from 4.2.1 to 5.0.1.</h3>

:information_source: Keep your dependencies up-to-date. This makes it
easier to fix existing vulnerabilities and to more quickly identify and
fix newly disclosed vulnerabilities when they affect your project.
<hr/>

*Warning:* This is a major version upgrade, and may be a breaking
change.
- The recommended version is **5 versions** ahead of your current
version.
- The recommended version was released **a month ago**, on 2023-10-11.


<details>
<summary><b>Release notes</b></summary>
<br/>
  <details>
    <summary>Package name: <b>eslint-plugin-prettier</b></summary>
    <ul>
      <li>
<b>5.0.1</b> - <a
href="https://snyk.io/redirect/github/prettier/eslint-plugin-prettier/releases/tag/v5.0.1">2023-10-11</a></br><h2>What's
Changed</h2>
<ul>
<li>fix: <code>parserPath</code> type might be <code>undefined</code> on
Eslint Flat Config by <a class="user-mention notranslate"
data-hovercard-type="user"
data-hovercard-url="/users/krist7599555/hovercard"
data-octo-click="hovercard-link-click"
data-octo-dimensions="link_type:self"
href="https://snyk.io/redirect/github/krist7599555">@ krist7599555</a>
in <a class="issue-link js-issue-link" data-error-text="Failed to load
title" data-id="1931357546" data-permission-text="Title is private"
data-url="prettier/eslint-plugin-prettier#588"
data-hovercard-type="pull_request"
data-hovercard-url="/prettier/eslint-plugin-prettier/pull/588/hovercard"
href="https://snyk.io/redirect/github/prettier/eslint-plugin-prettier/pull/588">#588</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a class="user-mention notranslate" data-hovercard-type="user"
data-hovercard-url="/users/krist7599555/hovercard"
data-octo-click="hovercard-link-click"
data-octo-dimensions="link_type:self"
href="https://snyk.io/redirect/github/krist7599555">@ krist7599555</a>
made their first contribution in <a class="issue-link js-issue-link"
data-error-text="Failed to load title" data-id="1931357546"
data-permission-text="Title is private"
data-url="prettier/eslint-plugin-prettier#588"
data-hovercard-type="pull_request"
data-hovercard-url="/prettier/eslint-plugin-prettier/pull/588/hovercard"
href="https://snyk.io/redirect/github/prettier/eslint-plugin-prettier/pull/588">#588</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a class="commit-link"
href="https://snyk.io/redirect/github/prettier/eslint-plugin-prettier/compare/v5.0.0...v5.0.1"><tt>v5.0.0...v5.0.1</tt></a></p>
      </li>
      <li>
<b>5.0.0</b> - <a
href="https://snyk.io/redirect/github/prettier/eslint-plugin-prettier/releases/tag/v5.0.0">2023-07-11</a></br><h2>What's
Changed</h2>
<ul>
<li>feat!: bump eslint, node and prettier versions, add types support by
<a class="user-mention notranslate" data-hovercard-type="user"
data-hovercard-url="/users/JounQin/hovercard"
data-octo-click="hovercard-link-click"
data-octo-dimensions="link_type:self"
href="https://snyk.io/redirect/github/JounQin">@ JounQin</a> in <a
class="issue-link js-issue-link" data-error-text="Failed to load title"
data-id="1357315471" data-permission-text="Title is private"
data-url="prettier/eslint-plugin-prettier#508"
data-hovercard-type="pull_request"
data-hovercard-url="/prettier/eslint-plugin-prettier/pull/508/hovercard"
href="https://snyk.io/redirect/github/prettier/eslint-plugin-prettier/pull/508">#508</a></li>
<li>fix: add missing dependency <code>synckit</code> by <a
class="user-mention notranslate" data-hovercard-type="user"
data-hovercard-url="/users/fisker/hovercard"
data-octo-click="hovercard-link-click"
data-octo-dimensions="link_type:self"
href="https://snyk.io/redirect/github/fisker">@ fisker</a> in <a
class="issue-link js-issue-link" data-error-text="Failed to load title"
data-id="1604733300" data-permission-text="Title is private"
data-url="prettier/eslint-plugin-prettier#548"
data-hovercard-type="pull_request"
data-hovercard-url="/prettier/eslint-plugin-prettier/pull/548/hovercard"
href="https://snyk.io/redirect/github/prettier/eslint-plugin-prettier/pull/548">#548</a></li>
<li>fix: compatibility with prettier@3 without plugins by <a
class="user-mention notranslate" data-hovercard-type="user"
data-hovercard-url="/users/auvred/hovercard"
data-octo-click="hovercard-link-click"
data-octo-dimensions="link_type:self"
href="https://snyk.io/redirect/github/auvred">@ auvred</a> in <a
class="issue-link js-issue-link" data-error-text="Failed to load title"
data-id="1790101584" data-permission-text="Title is private"
data-url="prettier/eslint-plugin-prettier#564"
data-hovercard-type="pull_request"
data-hovercard-url="/prettier/eslint-plugin-prettier/pull/564/hovercard"
href="https://snyk.io/redirect/github/prettier/eslint-plugin-prettier/pull/564">#564</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a class="user-mention notranslate" data-hovercard-type="user"
data-hovercard-url="/users/auvred/hovercard"
data-octo-click="hovercard-link-click"
data-octo-dimensions="link_type:self"
href="https://snyk.io/redirect/github/auvred">@ auvred</a> made their
first contribution in <a class="issue-link js-issue-link"
data-error-text="Failed to load title" data-id="1790101584"
data-permission-text="Title is private"
data-url="prettier/eslint-plugin-prettier#564"
data-hovercard-type="pull_request"
data-hovercard-url="/prettier/eslint-plugin-prettier/pull/564/hovercard"
href="https://snyk.io/redirect/github/prettier/eslint-plugin-prettier/pull/564">#564</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a class="commit-link"
href="https://snyk.io/redirect/github/prettier/eslint-plugin-prettier/compare/v4.2.1...v5.0.0"><tt>v4.2.1...v5.0.0</tt></a></p>
      </li>
      <li>
        <b>5.0.0-alpha.2</b> - 2023-07-06
      </li>
      <li>
        <b>5.0.0-alpha.1</b> - 2023-03-10
      </li>
      <li>
<b>5.0.0-alpha.0</b> - <a
href="https://snyk.io/redirect/github/prettier/eslint-plugin-prettier/releases/tag/v5.0.0-alpha.0">2022-09-02</a></br><ul
class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled=""
class="task-list-item-checkbox" checked=""> drop Node v12 - <a
class="issue-link js-issue-link" data-error-text="Failed to load title"
data-id="1290422454" data-permission-text="Title is private"
data-url="prettier/eslint-plugin-prettier#488"
data-hovercard-type="pull_request"
data-hovercard-url="/prettier/eslint-plugin-prettier/pull/488/hovercard"
href="https://snyk.io/redirect/github/prettier/eslint-plugin-prettier/pull/488">#488</a></li>
<li class="task-list-item"><input type="checkbox" id="" disabled=""
class="task-list-item-checkbox" checked=""> drop ESLint v7 - <a
class="issue-link js-issue-link" data-error-text="Failed to load title"
data-id="1290422454" data-permission-text="Title is private"
data-url="prettier/eslint-plugin-prettier#488"
data-hovercard-type="pull_request"
data-hovercard-url="/prettier/eslint-plugin-prettier/pull/488/hovercard"
href="https://snyk.io/redirect/github/prettier/eslint-plugin-prettier/pull/488">#488</a></li>
<li class="task-list-item"><input type="checkbox" id="" disabled=""
class="task-list-item-checkbox" checked=""> improve jsdoc inside,
generate .d.ts typings - <a class="issue-link js-issue-link"
data-error-text="Failed to load title" data-id="1357358441"
data-permission-text="Title is private"
data-url="prettier/eslint-plugin-prettier#509"
data-hovercard-type="pull_request"
data-hovercard-url="/prettier/eslint-plugin-prettier/pull/509/hovercard"
href="https://snyk.io/redirect/github/prettier/eslint-plugin-prettier/pull/509">#509</a></li>
<li class="task-list-item"><input type="checkbox" id="" disabled=""
class="task-list-item-checkbox" checked=""> docs: improve why
<code>usePrettierrc</code> option is needed</li>
<li class="task-list-item"><input type="checkbox" id="" disabled=""
class="task-list-item-checkbox" checked=""> upgrade to prettier v3</li>
</ul>
      </li>
      <li>
<b>4.2.1</b> - <a
href="https://snyk.io/redirect/github/prettier/eslint-plugin-prettier/releases/tag/v4.2.1">2022-06-30</a></br><h2>4.2.1</h2>
<h3>Patch Changes</h3>
<ul>
<li><a
href="https://snyk.io/redirect/github/prettier/eslint-plugin-prettier/pull/485"
data-hovercard-type="pull_request"
data-hovercard-url="/prettier/eslint-plugin-prettier/pull/485/hovercard">ethereum#485</a>
<a
href="https://snyk.io/redirect/github/prettier/eslint-plugin-prettier/commit/5736ed5224b06507374e21c626e8c462552cacf2"><code>5736ed5</code></a>
Thanks <a href="https://snyk.io/redirect/github/JounQin">@ JounQin</a>!
- chore: reuse prettierRcOptions instead of resolveConfig again</li>
</ul>
      </li>
    </ul>
from <a
href="https://snyk.io/redirect/github/prettier/eslint-plugin-prettier/releases">eslint-plugin-prettier
GitHub release notes</a>
  </details>
</details>


<details>
  <summary><b>Commit messages</b></summary>
  </br>
  <details>
    <summary>Package name: <b>eslint-plugin-prettier</b></summary>
    <ul>
<li><a
href="https://snyk.io/redirect/github/prettier/eslint-plugin-prettier/commit/aa81435000a5e163df07400fafb875aa8e3ea83b">aa81435</a>
chore: release eslint-plugin-prettier (ethereum#589)</li>
<li><a
href="https://snyk.io/redirect/github/prettier/eslint-plugin-prettier/commit/21a7146d78161307dcc7eaa96f41dac51f7ce89f">21a7146</a>
fix: &#x60;parserPath&#x60; type might be &#x60;undefined&#x60; on
Eslint Flat Config (ethereum#588)</li>
<li><a
href="https://snyk.io/redirect/github/prettier/eslint-plugin-prettier/commit/b2b93c30c5679d38a094589eb608d0f5d7615aaf">b2b93c3</a>
chore: release eslint-plugin-prettier (ethereum#569)</li>
<li><a
href="https://snyk.io/redirect/github/prettier/eslint-plugin-prettier/commit/370e88fd9c43716658c7be5576ee57f3235778cb">370e88f</a>
chore: bump deps, use pnpm instead (ethereum#568)</li>
<li><a
href="https://snyk.io/redirect/github/prettier/eslint-plugin-prettier/commit/6878434497d4b57fdcfa91f026c45eee5ffb24be">6878434</a>
chore: release eslint-plugin-prettier (alpha) (ethereum#566)</li>
<li><a
href="https://snyk.io/redirect/github/prettier/eslint-plugin-prettier/commit/ae7a73c6c4b306c617c5dd9baaaa2ae7c0f9f44b">ae7a73c</a>
fix: compatibility with prettier@3 without plugins (ethereum#564)</li>
<li><a
href="https://snyk.io/redirect/github/prettier/eslint-plugin-prettier/commit/00449dfd152dbdd5a0a52426bb538dddcf702328">00449df</a>
chore: release eslint-plugin-prettier (alpha) (ethereum#553)</li>
<li><a
href="https://snyk.io/redirect/github/prettier/eslint-plugin-prettier/commit/82a3db878baf1a8f8ef53393069fe23c3a80ce15">82a3db8</a>
fix: add missing dependency &#x60;synckit&#x60; (ethereum#548)</li>
<li><a
href="https://snyk.io/redirect/github/prettier/eslint-plugin-prettier/commit/ba490d76f6e41001cc3ed5d6afc3a02908ea3fbf">ba490d7</a>
chore: add missing worker.js into files</li>
<li><a
href="https://snyk.io/redirect/github/prettier/eslint-plugin-prettier/commit/477f8904eaf1c7924f15b6793c72efeb8c4b02a3">477f890</a>
chore: release eslint-plugin-prettier v5.0.0-alpha.0 (ethereum#517)</li>
<li><a
href="https://snyk.io/redirect/github/prettier/eslint-plugin-prettier/commit/910aeb60a7456beb6193c634bb8dec1b7181312d">910aeb6</a>
feat!: bump eslint, node and prettier versions, add types support
(ethereum#508)</li>
<li><a
href="https://snyk.io/redirect/github/prettier/eslint-plugin-prettier/commit/21d87abb5bebe69259a6f3aeaa0b20fa7e350bb2">21d87ab</a>
ci use pull_request_target event instead</li>
<li><a
href="https://snyk.io/redirect/github/prettier/eslint-plugin-prettier/commit/7cd0393e0a7b0bbcdde673c04f76c5692f134e9b">7cd0393</a>
docs: remove &#x60;Sponsors&#x60; and &#x60;Backers&#x60; section from
README.md (ethereum#504)</li>
<li><a
href="https://snyk.io/redirect/github/prettier/eslint-plugin-prettier/commit/c2d7367a4925099fe90256c36d78b3fab117557e">c2d7367</a>
chore: update @ 1stg/remark-config usage in favor of @ 1stg/config
package</li>
<li><a
href="https://snyk.io/redirect/github/prettier/eslint-plugin-prettier/commit/19c4173c67ae7c03a27cdb1121f1df8d0d20e413">19c4173</a>
chore: release eslint-plugin-prettier (ethereum#496)</li>
<li><a
href="https://snyk.io/redirect/github/prettier/eslint-plugin-prettier/commit/42e4b2b99c825e8bf739d0c8b9132bbb82aeaf37">42e4b2b</a>
ci: downgrade eslint-plugin-svelte for node 12</li>
<li><a
href="https://snyk.io/redirect/github/prettier/eslint-plugin-prettier/commit/599aba4e877d43d981cde2cfa29bfb68ce9d0960">599aba4</a>
ci: fix incorrect commit message nad PR title</li>
<li><a
href="https://snyk.io/redirect/github/prettier/eslint-plugin-prettier/commit/905c77ffc53d569f643d7945c5ee0881a5974ba3">905c77f</a>
chore: add FUNDING.yml</li>
<li><a
href="https://snyk.io/redirect/github/prettier/eslint-plugin-prettier/commit/2373d0c0c9f30aee30e6059ba386fdc4435ed333">2373d0c</a>
docs: add changeset for releasing</li>
<li><a
href="https://snyk.io/redirect/github/prettier/eslint-plugin-prettier/commit/2280b88439d3f3410039485247587a7682ad55ad">2280b88</a>
docs: add Sponsors and Backers sections</li>
<li><a
href="https://snyk.io/redirect/github/prettier/eslint-plugin-prettier/commit/2de34420b4c7be094c5f4c850f43b92043d764fb">2de3442</a>
chore: use eslint-plugin-svelte v2 (ethereum#487)</li>
    </ul>

<a
href="https://snyk.io/redirect/github/prettier/eslint-plugin-prettier/compare/19efb8a7f20e57c468d0fcc91f5396e4f850750e...aa81435000a5e163df07400fafb875aa8e3ea83b">Compare</a>
  </details>
</details>
<hr/>

**Note:** *You are seeing this because you or someone else with access
to this repository has authorized Snyk to open upgrade PRs.*

For more information: <img
src="https://api.segment.io/v1/pixel/track?data=eyJ3cml0ZUtleSI6InJyWmxZcEdHY2RyTHZsb0lYd0dUcVg4WkFRTnNCOUEwIiwiYW5vbnltb3VzSWQiOiI1ZTVlNWFlZi1mNzJkLTQxMWUtOWYyMy0zY2JiMGZmNmVkNmQiLCJldmVudCI6IlBSIHZpZXdlZCIsInByb3BlcnRpZXMiOnsicHJJZCI6IjVlNWU1YWVmLWY3MmQtNDExZS05ZjIzLTNjYmIwZmY2ZWQ2ZCJ9fQ=="
width="0" height="0"/>

🧐 [View latest project
report](https://app.snyk.io/org/woodpile37/project/f9f1a542-e77b-401b-9d83-577aad2ba722?utm_source&#x3D;github&amp;utm_medium&#x3D;referral&amp;page&#x3D;upgrade-pr)

🛠 [Adjust upgrade PR
settings](https://app.snyk.io/org/woodpile37/project/f9f1a542-e77b-401b-9d83-577aad2ba722/settings/integration?utm_source&#x3D;github&amp;utm_medium&#x3D;referral&amp;page&#x3D;upgrade-pr)

🔕 [Ignore this dependency or unsubscribe from future upgrade
PRs](https://app.snyk.io/org/woodpile37/project/f9f1a542-e77b-401b-9d83-577aad2ba722/settings/integration?pkg&#x3D;eslint-plugin-prettier&amp;utm_source&#x3D;github&amp;utm_medium&#x3D;referral&amp;page&#x3D;upgrade-pr#auto-dep-upgrades)

<!---
(snyk:metadata:{"prId":"5e5e5aef-f72d-411e-9f23-3cbb0ff6ed6d","prPublicId":"5e5e5aef-f72d-411e-9f23-3cbb0ff6ed6d","dependencies":[{"name":"eslint-plugin-prettier","from":"4.2.1","to":"5.0.1"}],"packageManager":"npm","type":"auto","projectUrl":"https://app.snyk.io/org/woodpile37/project/f9f1a542-e77b-401b-9d83-577aad2ba722?utm_source=github&utm_medium=referral&page=upgrade-pr","projectPublicId":"f9f1a542-e77b-401b-9d83-577aad2ba722","env":"prod","prType":"upgrade","vulns":[],"issuesToFix":[],"upgrade":[],"upgradeInfo":{"versionsDiff":5,"publishedDate":"2023-10-11T02:35:57.043Z"},"templateVariants":[],"hasFixes":false,"isMajorUpgrade":true,"isBreakingChange":true,"priorityScoreList":[]})
--->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants