Skip to content

Bug - Remove placeholder elements from JSDoc comments #30

@whidrubeld

Description

@whidrubeld

Describe the bug
The code contains placeholder elements like ${3:} within the JSDoc comments. These are likely remnants from a snippet tool and should be removed or replaced with meaningful descriptions. This ensures the documentation is clear and professional. Please review and update the JSDoc comments accordingly.

To Reproduce
Steps to reproduce the behavior:

  1. Install ext
  2. Configure plugin configuration settings in .vscode/settings.json
  3. Run Generate JSDoc for the current file

Settings

...
  "jsdoc-generator.descriptionPlaceholder": "",
  "jsdoc-generator.generativeModel": "gpt-4",
  "jsdoc-generator.generativeLanguage": "English",
  "jsdoc-generator.generateDescriptionForTypeParameters": false,
  "jsdoc-generator.generateDescriptionForParameters": false,
  "jsdoc-generator.generateDescriptionForReturns": false,
  "jsdoc-generator.generativeApiKey": "YOUR_API_KEY"
...

Result file example

'use client'

import { Provider } from 'react-redux'
import { useLayoutEffect } from 'react'
import { LanguageCode } from '@/interfaces'
import { store } from '@/store'
import { setLocale, setTechnicalInfo } from '@/store/slices/settings'
import { useLocale } from '@/hooks'
import { getTechnicalInfo } from '@/helpers'

/**
 * ${1:This is the main Provider for the application store. It provides the state from the redux store to the child components. Also, it dispatches actions to set the locale and the technical information at the start of the layout effect.}
 *
 * @export
 * @param {{
 *   children: React.ReactNode
 * }} param0 ${2:}
 * @param {React.ReactNode} param0.children ${3:}
 * @returns {${4:*}\} ${5:}
 */
export default function StoreProvider({
  children,
}: {
  children: React.ReactNode
}) {
  const locale = useLocale()

  useLayoutEffect(() => {
    store.dispatch(setLocale(locale as LanguageCode))
    store.dispatch(
      setTechnicalInfo(getTechnicalInfo(navigator.userAgent, window.screen)),
    )
  }, [])

  return <Provider store={store}>{children}</Provider>
}

Environment used
Typescript version: 5.7.2
VSC versione: 1.98.2
OS: macOS

Metadata

Metadata

Labels

bugSomething isn't working

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions