Skip to content

Commit

Permalink
install jsdoc linting tools, solve most errors
Browse files Browse the repository at this point in the history
  • Loading branch information
chris48s committed Aug 11, 2024
1 parent 56498d5 commit ac48a8f
Show file tree
Hide file tree
Showing 7 changed files with 1,228 additions and 101 deletions.
2 changes: 2 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
plugins:
- "./node_modules/prettier-plugin-jsdoc/dist/index.js"
6 changes: 3 additions & 3 deletions docs/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

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

/** @type {import('@docusaurus/types').Config} */
/** @type {import("@docusaurus/types").Config} */
const config = {
title: "v8r",
tagline: "A command-line validator that's on your wavelength",
Expand Down Expand Up @@ -39,7 +39,7 @@ const config = {
presets: [
[
"classic",
/** @type {import('@docusaurus/preset-classic').Options} */
/** @type {import("@docusaurus/preset-classic").Options} */
({
docs: {
sidebarPath: "./sidebars.js",
Expand All @@ -55,7 +55,7 @@ const config = {
],

themeConfig:
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
/** @type {import("@docusaurus/preset-classic").ThemeConfig} */
({
navbar: {
title: "v8r",
Expand Down
18 changes: 10 additions & 8 deletions docs/sidebars.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
/**
* Creating a sidebar enables you to:
- create an ordered group of docs
- render a sidebar for each doc of that group
- provide next/previous navigation
The sidebars can be generated from the filesystem, or explicitly defined here.
Create as many sidebars as you want.
*
* - Create an ordered group of docs
* - Render a sidebar for each doc of that group
* - Provide next/previous navigation
*
* The sidebars can be generated from the filesystem, or explicitly defined
* here.
*
* Create as many sidebars as you want.
*/

// @ts-check

/** @type {import('@docusaurus/plugin-content-docs').SidebarsConfig} */
/** @type {import("@docusaurus/plugin-content-docs").SidebarsConfig} */
const sidebars = {
// By default, Docusaurus generates a sidebar from the docs folder structure
docSidebar: [{ type: "autogenerated", dirName: "." }],
Expand Down
5 changes: 5 additions & 0 deletions eslint.config.cjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
const globals = require("globals");
const js = require("@eslint/js");
const jsdocPlugin = require("eslint-plugin-jsdoc");
const prettierConfig = require("eslint-config-prettier");
const prettierPlugin = require("eslint-plugin-prettier");
const mochaPlugin = require("eslint-plugin-mocha");
Expand All @@ -11,10 +12,12 @@ module.exports = [
js.configs.recommended,
mochaPlugin.configs.flat.recommended,
prettierConfig,
jsdocPlugin.configs["flat/recommended-error"],
{
plugins: {
mocha: mochaPlugin,
prettier: prettierPlugin,
jsdoc: jsdocPlugin,
},
languageOptions: {
ecmaVersion: 2022,
Expand All @@ -29,6 +32,8 @@ module.exports = [
"mocha/no-skipped-tests": ["error"],
"mocha/no-exclusive-tests": ["error"],
"mocha/max-top-level-suites": ["off"],
"jsdoc/require-jsdoc": ["off"],
"jsdoc/tag-lines": ["off"], // let prettier-plugin-jsdoc take care of this
},
},
];
Loading

0 comments on commit ac48a8f

Please sign in to comment.