Skip to content

Commit 59eeab7

Browse files
authored
feat: adding a config for enforcing code docs (#311)
1 parent bcdf50e commit 59eeab7

File tree

4 files changed

+158
-9
lines changed

4 files changed

+158
-9
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ Create a `.eslintrc` file with the following contents:
3434
> **Note:** `@readme/eslint-config/*` subconfigs must be loaded alongside `@readme/eslint-config`, or at least take advantage of a root `.eslintrc` config that has `root` set to `true`.
3535
3636
* `@readme/eslint-config`
37+
* `@readme/eslint-config/docs`
38+
* Will enforce JSDoc blocks throughout a codebase.
3739
* `@readme/eslint-config/react`
3840
* `@readme/eslint-config/testing`
3941
* This config assumes you're using [Jest](https://jestjs.io/), but if you're using [Mocha](https://mochajs.org/) and [Chai](https://www.chaijs.com/) you should use `@readme/eslint-config/testing-mocha` instead.

docs.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
module.exports = {
2+
extends: ['plugin:jsdoc/recommended'],
3+
plugins: ['jsdoc'],
4+
};

package-lock.json

Lines changed: 151 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
"eslint-plugin-jest": "^26.0.0",
3232
"eslint-plugin-jest-dom": "^4.0.0",
3333
"eslint-plugin-jest-formatting": "^3.0.0",
34+
"eslint-plugin-jsdoc": "^37.7.1",
3435
"eslint-plugin-jsx-a11y": "^6.2.3",
3536
"eslint-plugin-mocha": "^10.0.3",
3637
"eslint-plugin-node": "^11.1.0",

0 commit comments

Comments
 (0)