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

chore(eslint): fixing some eslint warnings #7382

Merged
merged 5 commits into from Oct 5, 2020
Merged

Conversation

JamieMagee
Copy link
Contributor

@JamieMagee JamieMagee commented Sep 30, 2020

  • no-unused-vars was commented out in favour of @typescript-eslint/no-unused-vars
  • @typescript-eslint/camelcase was deprecated and replaced with @typescript-eslint/naming-convention
  • @typescript-eslint/no-floating-promises is already enabled by default in @typescript-eslint/recommended-requiring-type-checking

Code changes are all related to @typescript-eslint/no-unsafe-return, and fixes any issues under lib/workers

@viceice viceice self-requested a review September 30, 2020 09:25
lib/util/promises.ts Outdated Show resolved Hide resolved
lib/workers/pr/changelog/release-notes.ts Outdated Show resolved Hide resolved
lib/workers/pr/changelog/release-notes.ts Outdated Show resolved Hide resolved
lib/workers/pr/changelog/source-github.ts Outdated Show resolved Hide resolved
lib/workers/pr/changelog/source-gitlab.ts Outdated Show resolved Hide resolved
// istanbul ignore if
if (cachedResult) {
return cachedResult as Promise<AllPackages | null>;
return Promise.resolve(cachedResult);
Copy link
Member

Choose a reason for hiding this comment

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

I think cachedResultis already a Promise? 🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes. I'm not super confident with returning the Promise instead of the content, but I'll fix the types on this one for now

Copy link
Member

@viceice viceice left a comment

Choose a reason for hiding this comment

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

I think this is the way to go. needs to be extended to the other cache places

lib/datasource/index.ts Outdated Show resolved Hide resolved
lib/datasource/index.ts Outdated Show resolved Hide resolved
    - `no-unused-vars` was commented out in favour of `@typescript-eslint/no-unused-vars`
    - `@typescript-eslint/camelcase` was deprecated and replaced with `@typescript-eslint/naming-convention`
    - `@typescript-eslint/no-floating-promises` is already enabled by default in `@typescript-eslint/recommended-requiring-type-checking`

    Code changes are all related to `@typescript-eslint/no-unsafe-return`, and fixes any issues under `lib/workers`
@viceice viceice merged commit 5896d9c into master Oct 5, 2020
@viceice viceice deleted the chore/eslint-fixes branch October 5, 2020 16:12
@renovate-release
Copy link
Collaborator

🎉 This PR is included in version 23.42.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 15, 2020
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.

None yet

3 participants