-
Notifications
You must be signed in to change notification settings - Fork 18
Loosen JSDoc rules #433
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
Open
mcmire
wants to merge
11
commits into
main
Choose a base branch
from
loosen-jsdoc-rules
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Loosen JSDoc rules #433
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
85a02f6
Loosen JSDoc rules
mcmire 59a95d9
Ensure we don't override rules from base; regenerate snapshots
mcmire 75c9356
Also deduplicate 'require' option
mcmire 19b7bdb
Update changelog
mcmire 09f7e4d
Don't require that exported variables are documented
mcmire 58469e5
Update name
mcmire bc6ebec
Update rules snapshots
mcmire 86d7dd8
Merge branch 'main' into loosen-jsdoc-rules
mcmire ec0cee3
Revert change to explicit-function-return-type
mcmire bd1d326
Tweak changelog
mcmire 140fdf5
Add this back to satisfy the config validation
mcmire File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,6 +7,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 | |
|
|
||
| ## [Unreleased] | ||
|
|
||
| ### Changed | ||
|
|
||
| - Update `jsdoc/require-jsdoc` to loosen requirements for various kinds of symbols ([#433](https://github.com/MetaMask/eslint-config/pull/433)) | ||
| - Require JSDoc not for all arrow functions, but only those not contained within plain objects or are not arguments to functions or methods. | ||
| - Require JSDoc not for all interfaces or type aliases, but only those that do not appear in declare blocks (ambient declarations). | ||
| - Require JSDoc not for all object types in return types, but only those in "root" types. | ||
|
|
||
| ## [15.0.0] | ||
|
|
||
| ### Changed | ||
|
|
@@ -17,6 +24,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 | |
| - **BREAKING:** Update type import specifier rules ([#381](https://github.com/MetaMask/eslint-config/pull/381)) | ||
| - `@typescript-eslint/consistent-type-imports` has been replaced with `import-x/consistent-type-specifier-style` | ||
| - The rule now prefers "top-level" type imports over inline. e.g. `import type { a } from 'x'` over `import { type a } from 'x'` | ||
| - **BREAKING:** Update `jsdoc/require-jsdoc` to require documentation for more things ([#394](https://github.com/MetaMask/eslint-config/pull/394)) | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This changelog entry was missing when 15.0.0 was released. This should list TypeScript symbols for which documentation is required (not the changelog for the base config). |
||
| - New things that now require documentation are: | ||
| - Arrow functions | ||
| - Class declarations | ||
| - Function expressions | ||
| - Method definitions | ||
| - TypeScript enum declarations | ||
| - TypeScript interface declarations | ||
| - TypeScript type alias declarations | ||
| - TypeScript property signatures | ||
| - Disable `@typescript-eslint/no-unnecessary-type-arguments` ([#426](https://github.com/MetaMask/eslint-config/pull/426)) | ||
| - We decided that "unnecessary" type arguments make types easier to read sometimes, so we should allow them. | ||
| - Disable `promise/valid-params` because it's redundant in type-checked projects ([#425](https://github.com/MetaMask/eslint-config/pull/425)) | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
While it's true that the base config did apparently require JSDoc for TypeScript symbols, that wasn't true in practice because the JSDoc plugin within the base config doesn't know about TypeScript.