This repository was archived by the owner on Nov 9, 2026. It is now read-only.
Repository navigation
Add ESLint JSDoc rules. - #206
Merged
Merged
Conversation
ESLint rules have been added to enforce our JSDoc conventions. The rules have been added directly to `.eslintrc.js` temporarily until they get published in our main ESLint config. Most of the changes in this PR were a result of running `yarn lint:fix`. There were a handful of manual changes that seemed obvious and simple to make. There were a few minor variable renames made as well, to make the code and comments easier to read.
Gudahtt
force-pushed
the
add-eslint-jsdoc-linting
branch
from
September 15, 2021 05:47
4414547 to
6adb060
Compare
Gudahtt
added a commit
to MetaMask/eslint-config
that referenced
this pull request
Sep 15, 2021
ESLint rules for JSDoc have been added to the base package and to the TypeScript package, using the `eslint-plugin-jsdoc` plugin. These rules should help improve the quality of our inline documentation. This was done primarily to prepare for the generation of HTML documentation using TypeDoc. Our inline documentation needs to be of a higher quality than it is now for that to work out well. These rules have been tested with `metamask-extension` [1], `@metamask/controllers` [2], and `@metamask/eth-sig-util` [3]. See those draft PRs to get an idea of what these rules look like in practice. [1]: MetaMask/metamask-extension#12112 [2]: MetaMask/core#591 [3]: MetaMask/eth-sig-util#206
Gudahtt
marked this pull request as ready for review
September 15, 2021 06:21
Gudahtt
added a commit
to MetaMask/eslint-config
that referenced
this pull request
Sep 15, 2021
ESLint rules for JSDoc have been added to the base package and to the TypeScript package, using the `eslint-plugin-jsdoc` plugin. These rules should help improve the quality of our inline documentation. This was done primarily to prepare for the generation of HTML documentation using TypeDoc. Our inline documentation needs to be of a higher quality than it is now for that to work out well. These rules have been tested with `metamask-extension` [1], `@metamask/controllers` [2], and `@metamask/eth-sig-util` [3]. See those draft PRs to get an idea of what these rules look like in practice. [1]: MetaMask/metamask-extension#12112 [2]: MetaMask/core#591 [3]: MetaMask/eth-sig-util#206
Gudahtt
added a commit
to MetaMask/eslint-config
that referenced
this pull request
Sep 21, 2021
* Add JSDoc ESLint rules ESLint rules for JSDoc have been added to the base package and to the TypeScript package, using the `eslint-plugin-jsdoc` plugin. These rules should help improve the quality of our inline documentation. This was done primarily to prepare for the generation of HTML documentation using TypeDoc. Our inline documentation needs to be of a higher quality than it is now for that to work out well. These rules have been tested with `metamask-extension` [1], `@metamask/controllers` [2], and `@metamask/eth-sig-util` [3]. See those draft PRs to get an idea of what these rules look like in practice. [1]: MetaMask/metamask-extension#12112 [2]: MetaMask/core#591 [3]: MetaMask/eth-sig-util#206 * Update hyphen config The `jsdoc/require-hyphen-before-param-description` config has been updated to also disallow hyphens before `@throws` descriptions, and to require hyphens before `@template` descriptions. This seems to be what TypeDoc expects, and it's in-line with what we do in most places.
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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
ESLint rules have been added to enforce our JSDoc conventions. The rules have been added directly to
.eslintrc.jstemporarily until they get published in our main ESLint config.Most of the changes in this PR were a result of running
yarn lint:fix. There were a handful of manual changes that seemed obvious and simple to make.There were a few minor variable renames made as well, to make the code and comments easier to read.