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
Lint rule for requiring ts-ignore descriptions #3584
Lint rule for requiring ts-ignore descriptions #3584
Conversation
as well as runs prettier on .eslintrc.js
Since this is a community submitted pull request, a Jenkins build has not been kicked off automatically. Can an Elastic organization member please verify the contents of this patch and then kick off a build manually? |
this used to be required to get a behavior that has since been filpped to always work the 'as const' way, so this is no longer necessary (hence the lint rule complaining)
interface-name-prefix was replaced by naming-convention in @typescript-eslint v3
some simply just needed to be removed (mostly due to ignores for files that didn't used to have types but now do)
129f290
to
98ea46b
Compare
I was able to clean up the majority of them and although the lint rule is satisfied, I'd like someone from the EUI team to do at the remaining 35 instances that are missing any notation. I tried to tackle all of the most obvious ones (or ones I was already familiar with). You can quickly/easily find them by searching for After that we should be ready to merge. |
Created a PR for you dimitropoulos#1 |
…ption Clean up ts-ignore todos
That's very diplomatic of you! haha. I wouldn't have minded if you just committed but I appreciate the consideration. Merged and all ready to go now, then. |
jenkins test this |
Preview documentation changes for this PR: https://eui.elastic.co/pr_3584/ |
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.
Changes LGTM; Looked through the comment annotations and tested this locally
* upgrades @typescript-eslint plugin and parser (removes deprecated rules) as well as runs prettier on .eslintrc.js * turns off new (unwanted) rules * only allows ts-ignore and ts-expect-error with descriptions * tweaks for new @typescript-eslint version * clears error for 'prefer-as-const' lint rule this used to be required to get a behavior that has since been filpped to always work the 'as const' way, so this is no longer necessary (hence the lint rule complaining) * removes disable for rule that no longer exists interface-name-prefix was replaced by naming-convention in @typescript-eslint v3 * removes ts-ignore-next-line usages (that's not a thing) * use for sort Direction * uses for all ts-ignores that need it * solves simplest ts-ignore cases some simply just needed to be removed (mostly due to ignores for files that didn't used to have types but now do) * Clean up ts-ignore todos Co-authored-by: Chandler Prall <chandler.prall@gmail.com>
Summary
closes #3580
This PR enables a lint rule that requires descriptions following
ts-ignore
usages. To accomplish this, some linting dependencies were also updated.Checklist
- [ ] Check against all themes for compatibility in both light and dark modes- [ ] Checked in mobile- [ ] Checked in IE11 and Firefox- [ ] Props have proper autodocs- [ ] Added documentation- [ ] Checked Code Sandbox works for the any docs examples- [ ] Added or updated jest tests- [ ] Checked for accessibility including keyboard-only and screenreader modes- [ ] A changelog entry exists and is marked appropriately