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(website): press the Report an Issue button makes error if eslintrc does not include rules #10367

Merged

Conversation

developer-bandi
Copy link
Contributor

PR Checklist

Overview

Fixed an error that occurred when pressing the Report an Issue button when eslintrc does not include rules.

@typescript-eslint
Copy link
Contributor

Thanks for the PR, @developer-bandi!

typescript-eslint is a 100% community driven project, and we are incredibly grateful that you are contributing to that community.

The core maintainers work on this in their personal time, so please understand that it may not be possible for them to review your work immediately.

Thanks again!


🙏 Please, if you or your company is finding typescript-eslint valuable, help us sustain the project by sponsoring it transparently on https://opencollective.com/typescript-eslint.

Copy link

netlify bot commented Nov 21, 2024

Deploy Preview for typescript-eslint ready!

Name Link
🔨 Latest commit 9634b83
🔍 Latest deploy log https://app.netlify.com/sites/typescript-eslint/deploys/6745049ffb40bd0008cbb885
😎 Deploy Preview https://deploy-preview-10367--typescript-eslint.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 99 (no change from production)
Accessibility: 100 (no change from production)
Best Practices: 92 (no change from production)
SEO: 98 (no change from production)
PWA: 80 (no change from production)
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Member

@JoshuaKGoldberg JoshuaKGoldberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alan Shane Lewis saying 'absolute perfection' on The Great Canadian Baking Show

@JoshuaKGoldberg JoshuaKGoldberg added the 1 approval >=1 team member has approved this PR; we're now leaving it open for more reviews before we merge label Nov 22, 2024
kirkwaiblinger
kirkwaiblinger previously approved these changes Nov 22, 2024
@kirkwaiblinger
Copy link
Member

Nice, thanks! 🙂

@kirkwaiblinger kirkwaiblinger enabled auto-merge (squash) November 22, 2024 22:14
@@ -54,7 +54,7 @@ export function createMarkdown(state: ConfigModel): string {
*/
export function createMarkdownParams(state: ConfigModel): string {
const { rules } = parseESLintRC(state.eslintrc);
const ruleKeys = Object.keys(rules);
const ruleKeys = Object.keys(rules ?? {});
Copy link
Member

@kirkwaiblinger kirkwaiblinger Nov 22, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, I guess you'll have to address the lint error that complains about this not being possibly-nullish

Copy link

codecov bot commented Nov 24, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 86.75%. Comparing base (f74a8fa) to head (9634b83).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #10367   +/-   ##
=======================================
  Coverage   86.75%   86.75%           
=======================================
  Files         443      443           
  Lines       15289    15289           
  Branches     4446     4446           
=======================================
  Hits        13264    13264           
  Misses       1672     1672           
  Partials      353      353           
Flag Coverage Δ
unittest 86.75% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

@developer-bandi
Copy link
Contributor Author

After looking at the lint error that occurred, I thought it would be better to set the default value of rules to an empty object when parsing eslintrc, so I modified it like this.

@github-actions github-actions bot removed the 1 approval >=1 team member has approved this PR; we're now leaving it open for more reviews before we merge label Nov 24, 2024
Copy link
Member

@kirkwaiblinger kirkwaiblinger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@kirkwaiblinger kirkwaiblinger enabled auto-merge (squash) November 25, 2024 23:13
@kirkwaiblinger kirkwaiblinger merged commit c1b1106 into typescript-eslint:main Nov 25, 2024
60 checks passed
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 6, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug(website): clicking playground's "Report as Issue" throws exception when "rules" is omitted from eslintrc
3 participants