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 JSDoc for some exports @W-13278716 #4014

Merged
merged 44 commits into from
Feb 27, 2024
Merged

Conversation

wjhsf
Copy link
Collaborator

@wjhsf wjhsf commented Feb 23, 2024

Details

This time, with actual things to read!

Does this pull request introduce a breaking change?

  • ✅ No, it does not introduce a breaking change.
  • 🚨 Yes, it does introduce a breaking change.

Does this pull request introduce an observable change?

  • ✅ No, it does not introduce an observable change.
  • ⚠️ Yes, it does include an observable change.

GUS work item

wjhsf added 30 commits February 19, 2024 16:18
It has no top-level exports, easy!
@wjhsf wjhsf requested a review from a team as a code owner February 23, 2024 02:34
Copy link
Contributor

@nolanlawson nolanlawson left a comment

Choose a reason for hiding this comment

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

Fantastic work.

@@ -85,6 +93,13 @@ export function generateCompilerError(
return error;
}

/**
* Validates that the provided condition is truthy.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
* Validates that the provided condition is truthy.
* Validates that the provided condition is true.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The function checks for truthiness, not for === true, so I think "truthy"/"falsy" are more accurate here.

Copy link
Member

Choose a reason for hiding this comment

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

That's fine, I just saw that the type was boolean so we would only get either true or false

packages/@lwc/errors/src/compiler/utils.ts Outdated Show resolved Hide resolved
* @param condition Condition to check.
* @param errorInfo The object holding the error metadata.
* @param args Values used to fill the error message template.
* @throws Throws a compiler error if the provided condition is falsy.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
* @throws Throws a compiler error if the provided condition is falsy.
* @throws Throws a compiler error if the provided condition is false.

@wjhsf wjhsf merged commit 36775f2 into master Feb 27, 2024
9 checks passed
@wjhsf wjhsf deleted the wjh/document-exports-1 branch February 27, 2024 19:31
ekashida added a commit that referenced this pull request Mar 3, 2024
* chore: add temp file for tracking all exports

* docs(shared): add jsdoc for language features

* chore: missed an export

* docs(exports): add jsdoc for @lwc/shared language features

* style: add eslint-plugin-jsdoc

* chore: eslint-plugin-jsdoc auto fixes

* chore(linter): manual fixes for jsdoc rules

* chore: simplify env config for test files

* style(jsdoc): enforce documenting yields

* docs: include @param in all jsdocs, but not descriptions (yet)

* docs(exports): fully document all @lwc/shared language features

* chore: remove temp file

* chore: lint JSDoc in @lwc/shared

* chore(eslint): suppress unimportant warnings

* docs(rollup-plugin): add jsdoc for main export

* fix: use JSDoc comment instead of plain multiline

* docs(babel-plugin-component): polish JSDoc for main plugin export

* chore: mark progress in .eslintrc

* docs(wire-service): polish JSDoc for `register`

* docs(errors): add JSDoc for @lwc/errors

* docs(errors): polish JSDoc for @lwc/features

* chore: mark @lwc/style-compiler as documented

It has no top-level exports, easy!

* docs(template-compiler): add bad JSDoc for top-level exports

* chore(jsdoc): comment block is not jsdoc

* chore: revert jsdoc changes to 3rd party files

* chore(eslint): enforce stricter JSDoc rules

* docs: improve JSDoc in root scripts

* chore(eslint): auto-fixes for new JSDoc rules

* chore(eslint): manual for new JSDoc rules

* chore: fix bad merge

* docs: manual JSDoc tweaks post-merge

* docs(style-compiler): add JSDoc for top-level exports

* chore: mark style-compiler as complete

* docs(style-compiler): use correct name in README

* revert: remove useless empty JSDoc

* revert: don't JSDoc 3rd party

* docs(module-resolver): add JSDoc for main export

* revert: accidental JSDocification of __PURE__ annotations

* Update packages/@lwc/errors/src/compiler/utils.ts

Co-authored-by: Eugene Kashida <[email protected]>

---------

Co-authored-by: Eugene Kashida <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants