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(sdk): OLD adding eslint rules for capitalize comment and explicit member accessibility #3687

Closed
wants to merge 8 commits into from

Conversation

tsuf239
Copy link
Collaborator

@tsuf239 tsuf239 commented Aug 3, 2023

Following @Chriscbr's comment: #3570 (comment)

I added those two rules to the SDK's linter and ran it once to apply them.
The added regulations are:

  • capitalizing comment- makes sure comments and doc strings are capitalized
  • explicit member accessibility- makes sure that all methods and properties are marked with the right member accessibility- public, protected, or private

I also added a sentence to the docs referring to the importance of docstrings, which should be capitalized.

Checklist

  • Title matches Winglang's style guide
  • Description explains motivation and solution
  • Tests added (always)
  • Docs updated (only required for features)
  • Added pr/e2e-full label if this feature requires end-to-end testing

By submitting this pull request, I confirm that my contribution is made under the terms of the Wing Cloud Contribution License.

@tsuf239 tsuf239 requested a review from a team as a code owner August 3, 2023 08:09
@tsuf239 tsuf239 requested a review from Chriscbr August 3, 2023 08:09
Signed-off-by: monada-bot[bot] <[email protected]>
@monadabot monadabot added the ⚠️ pr/review-mutation PR has been mutated and will not auto-merge. Clear this label if the changes look good! label Aug 3, 2023
Comment on lines +218 to +227
// Makes sure comments and doc strings are capitalized
"capitalized-comments": [
"error",
"always",
{
ignoreConsecutiveComments: true,
ignorePattern: "pragma|ignored",
ignoreInlineComments: true,
},
],
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we change this to only apply to block style comments (/* ... */)? The other comments (//) aren't generated in the public APIs like our docs or the Wing IDE extension, so I don't think the capitalization matters as much

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

yes, I fixed it and created another PR (to prevent rolling back the changes to the line comments)
here it is: #3725

@tsuf239
Copy link
Collaborator Author

tsuf239 commented Aug 7, 2023

opened a new one: #3725

@tsuf239 tsuf239 closed this Aug 7, 2023
@tsuf239 tsuf239 changed the title chore(sdk): adding eslint rules for capitalize comment and explicit member accessibility chore(sdk): OLD adding eslint rules for capitalize comment and explicit member accessibility Aug 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
⚠️ pr/review-mutation PR has been mutated and will not auto-merge. Clear this label if the changes look good!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants