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

docs: Add renovate related best practices guide #15589

Merged
merged 20 commits into from
May 26, 2022

Conversation

Gabriel-Ladzaretti
Copy link
Collaborator

Changes

Nothing

Context

#15442

Documentation (please check one with an [x])

  • I have updated the documentation, or
  • No documentation update is required

How I've tested my work (please tick one)

I have verified these changes via:

  • Code inspection only, or
  • Newly added/modified unit tests, or
  • No unit tests but ran on a real repository, or
  • Both unit tests + ran on a real repository

@Gabriel-Ladzaretti
Copy link
Collaborator Author

First draft 😀

Comment on lines 111 to 112
- Avoid underscore suffixes or prefixes, for example: `_prop`, use [whole words](https://google.github.io/styleguide/tsguide.html#properties-used-outside-of-class-lexical-scope) as
suffix/prefix i.e `internalProp`
Copy link
Collaborator Author

@Gabriel-Ladzaretti Gabriel-Ladzaretti May 16, 2022

Choose a reason for hiding this comment

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

if we do plan to have this, do we want to permit some renovate related prefix for API scheme checking
like in here:

.filter(
(val) => !optionalFunctions.includes(val) && !val.startsWith('_')
)
.sort();

and here:

const schemeKeys = getAllPropertyNames(api)
.filter(
(val) => !optionalFunctions.includes(val) && !val.startsWith('_')
)
.sort();

as of now, underscore is used to indicate private class variables and methods (like _parse in genericVersioning) and the above

Copy link
Member

Choose a reason for hiding this comment

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

We should probably be relaxed here, as we otherwise can't easily distinguish between private and public api 🤔

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

so we leave the test as is.
should we keep this bullet point?

@HonkingGoose
Copy link
Collaborator

@Gabriel-Ladzaretti Why are you creating new commits, instead of applying my suggestions?

Renovate contributing guide, apply maintainer provided review suggestions.

@Gabriel-Ladzaretti
Copy link
Collaborator Author

@Gabriel-Ladzaretti Why are you creating new commits, instead of applying my suggestions?

Renovate contributing guide, apply maintainer provided review suggestions.

No specific reason, i just prefer working from the IDE.
If batch committing is the preferred way of doing things, ill follow that from now on np :D

@rarkins
Copy link
Collaborator

rarkins commented May 16, 2022

Yes please do, it's easier to track for the reviewer as well as gives appropriate credit for the changes through GitHub

@rarkins
Copy link
Collaborator

rarkins commented May 17, 2022

As a general rule, in this project we should always favor coding standards which can be enforced via linting. Are there any in this list which are already enforced, or which could be, e.g. via eslint? Are there any which we should use our own custom eslint plugin to enforce?

rarkins
rarkins previously approved these changes May 18, 2022
rarkins
rarkins previously approved these changes May 19, 2022
@rarkins rarkins enabled auto-merge (squash) May 19, 2022 07:19
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.

some small annotations

### Classes

Use [Typescript getter setters (Accessors) when needed](https://google.github.io/styleguide/tsguide.html#properties-used-outside-of-class-lexical-scope).
The getter must be a `pure function`.
Copy link
Member

Choose a reason for hiding this comment

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

what is pure 🤔

Copy link
Collaborator Author

@Gabriel-Ladzaretti Gabriel-Ladzaretti May 23, 2022

Choose a reason for hiding this comment

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

should we add an explanation ? i.e

pure functions

  • are predictable: given the same input, always returns the same output.
  • have no side effect

Copy link
Collaborator

Choose a reason for hiding this comment

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

Please add that explanation. 😉

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I've added the explanation given in the provided wiki page.
hope its alright

- added pure function description
auto-merge was automatically disabled May 24, 2022 10:57

Head branch was pushed to by a user without write access

@rarkins rarkins requested a review from JamieMagee May 24, 2022 15:38
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.

otherwise LGTM

@rarkins rarkins merged commit 2689a55 into renovatebot:main May 26, 2022
@renovate-release
Copy link
Collaborator

🎉 This PR is included in version 32.66.5 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 26, 2022
@Gabriel-Ladzaretti Gabriel-Ladzaretti deleted the best-practices branch June 26, 2022 07:31
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.

6 participants