From fc43074e3daf4bde8f676be38d771eacee0199af Mon Sep 17 00:00:00 2001 From: Eli <88557639+lishaduck@users.noreply.github.com> Date: Thu, 29 Aug 2024 22:20:43 -0500 Subject: [PATCH] docs: use properer module jsdocs Update lib/options.js Co-authored-by: Jeroen Engels --- lib/anonymize.js | 10 +++++----- lib/options.js | 21 +++++++++++---------- lib/parse-elm-worker.js | 6 ++++-- lib/parse-elm.js | 6 ++++-- 4 files changed, 24 insertions(+), 19 deletions(-) diff --git a/lib/anonymize.js b/lib/anonymize.js index dd5b75923..03b599730 100644 --- a/lib/anonymize.js +++ b/lib/anonymize.js @@ -1,8 +1,8 @@ -/* -This module aims to make the paths and versions used in the CLI generic -so that the CLI tests (in the `test/` folder) have the same output on different -machines, and also the same output when only the CLI version changes. -*/ +/** + * This module aims to make the paths and versions used in the CLI generic + * so that the CLI tests (in the `test/` folder) have the same output on different + * machines, and also the same output when only the CLI version changes. + */ /** * @import {Options} from './types/options'; diff --git a/lib/options.js b/lib/options.js index ce049b3a8..8dba2c57c 100644 --- a/lib/options.js +++ b/lib/options.js @@ -1,3 +1,14 @@ +/** + * This file contains all the options from which elm-review derives how it will behave. + * + * Some of these options are not documented in `--help`. + * DO NOT DEPEND ON THEM! + * They might get removed at any point. + * They are not part of the user-facing public API and may be removed in a SemVer patch. + * Open an issue if you have a need for them, + * so that we can discuss what the best course of action is and how to move forward. + */ + /** * @import {ParsedArgs} from 'minimist'; * @import {Path} from './types/path'; @@ -15,16 +26,6 @@ const exit = require('../vendor/exit'); const ErrorMessage = require('./error-message'); const Flags = require('./flags'); -/* -These contain all the options that derive what and how elm-review will behave. - -Some of these options are not documented in `--help`. -DO NOT DEPEND ON THEM! -They might get removed at any point. -Open an issue if you have a need for them, so that we can discuss what the best -course of action is and how to get forward. - */ - /** * @type {Subcommand[]} */ diff --git a/lib/parse-elm-worker.js b/lib/parse-elm-worker.js index 6cf328fce..fa30039d0 100644 --- a/lib/parse-elm-worker.js +++ b/lib/parse-elm-worker.js @@ -1,5 +1,7 @@ -// Code very much inspired by -// https://blog.logrocket.com/a-complete-guide-to-threads-in-node-js-4fa3898fe74f/ +/** + * This code was very much inspired by + * . + */ /** * @import {MessagePort} from 'worker_threads'; diff --git a/lib/parse-elm.js b/lib/parse-elm.js index abdaa7948..ac23a0a8b 100644 --- a/lib/parse-elm.js +++ b/lib/parse-elm.js @@ -1,5 +1,7 @@ -// Code very much inspired by -// https://blog.logrocket.com/a-complete-guide-to-threads-in-node-js-4fa3898fe74f/ +/** + * This code was very much inspired by + * . + */ /** * @import {Source, ElmFile} from './types/content';