-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
fix(website): press the Report an Issue button makes error if eslintrc does not include rules #10367
Conversation
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. |
✅ Deploy Preview for typescript-eslint ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, thanks! 🙂 |
@@ -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 ?? {}); |
There was a problem hiding this comment.
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
Codecov ReportAll modified and coverable lines are covered by tests ✅
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
Flags with carried forward coverage won't be shown. Click here to find out more. |
fdc1212
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
PR Checklist
Overview
Fixed an error that occurred when pressing the Report an Issue button when eslintrc does not include rules.