Skip to content

Commit 9500b83

Browse files
committed
install jsdoc linting tools, solve lint/format errors
1 parent 58b494e commit 9500b83

File tree

7 files changed

+1230
-103
lines changed

7 files changed

+1230
-103
lines changed

.prettierrc

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
plugins:
2+
- "./node_modules/prettier-plugin-jsdoc/dist/index.js"

docs/docusaurus.config.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
import { themes as prismThemes } from "prism-react-renderer";
88

9-
/** @type {import('@docusaurus/types').Config} */
9+
/** @type {import("@docusaurus/types").Config} */
1010
const config = {
1111
title: "v8r",
1212
tagline: "A command-line validator that's on your wavelength",
@@ -39,7 +39,7 @@ const config = {
3939
presets: [
4040
[
4141
"classic",
42-
/** @type {import('@docusaurus/preset-classic').Options} */
42+
/** @type {import("@docusaurus/preset-classic").Options} */
4343
({
4444
docs: {
4545
sidebarPath: "./sidebars.js",
@@ -55,7 +55,7 @@ const config = {
5555
],
5656

5757
themeConfig:
58-
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
58+
/** @type {import("@docusaurus/preset-classic").ThemeConfig} */
5959
({
6060
navbar: {
6161
title: "v8r",

docs/sidebars.js

+10-8
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,19 @@
11
/**
22
* Creating a sidebar enables you to:
3-
- create an ordered group of docs
4-
- render a sidebar for each doc of that group
5-
- provide next/previous navigation
6-
7-
The sidebars can be generated from the filesystem, or explicitly defined here.
8-
9-
Create as many sidebars as you want.
3+
*
4+
* - Create an ordered group of docs
5+
* - Render a sidebar for each doc of that group
6+
* - Provide next/previous navigation
7+
*
8+
* The sidebars can be generated from the filesystem, or explicitly defined
9+
* here.
10+
*
11+
* Create as many sidebars as you want.
1012
*/
1113

1214
// @ts-check
1315

14-
/** @type {import('@docusaurus/plugin-content-docs').SidebarsConfig} */
16+
/** @type {import("@docusaurus/plugin-content-docs").SidebarsConfig} */
1517
const sidebars = {
1618
// By default, Docusaurus generates a sidebar from the docs folder structure
1719
docSidebar: [{ type: "autogenerated", dirName: "." }],

eslint.config.cjs

+5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
const globals = require("globals");
22
const js = require("@eslint/js");
3+
const jsdocPlugin = require("eslint-plugin-jsdoc");
34
const prettierConfig = require("eslint-config-prettier");
45
const prettierPlugin = require("eslint-plugin-prettier");
56
const mochaPlugin = require("eslint-plugin-mocha");
@@ -11,10 +12,12 @@ module.exports = [
1112
js.configs.recommended,
1213
mochaPlugin.configs.flat.recommended,
1314
prettierConfig,
15+
jsdocPlugin.configs["flat/recommended-error"],
1416
{
1517
plugins: {
1618
mocha: mochaPlugin,
1719
prettier: prettierPlugin,
20+
jsdoc: jsdocPlugin,
1821
},
1922
languageOptions: {
2023
ecmaVersion: 2022,
@@ -29,6 +32,8 @@ module.exports = [
2932
"mocha/no-skipped-tests": ["error"],
3033
"mocha/no-exclusive-tests": ["error"],
3134
"mocha/max-top-level-suites": ["off"],
35+
"jsdoc/require-jsdoc": ["off"],
36+
"jsdoc/tag-lines": ["off"], // let prettier-plugin-jsdoc take care of this
3237
},
3338
},
3439
];

0 commit comments

Comments
 (0)