Skip to content

Add JSDoc linting to kolibri-format and address remediations#14647

Open
rtibbles wants to merge 11 commits intolearningequality:developfrom
rtibbles:issue-14636-010f06
Open

Add JSDoc linting to kolibri-format and address remediations#14647
rtibbles wants to merge 11 commits intolearningequality:developfrom
rtibbles:issue-14636-010f06

Conversation

@rtibbles
Copy link
Copy Markdown
Member

Summary

  • Adds eslint-plugin-jsdoc to kolibri-format configuration
  • Adds all recommended rules plus:
    • no-blank-blocks
    • no-blank-block-descriptions
    • informative-docs
    • sort-tags
    • require-description
    • require-hyphen-before-param-description
    • require-throws
    • Also allows @affects as a tag - because it was pre-existing in some of our JSDoc comments
  • Also explicitly turns off:
    • require-jsdoc
    • reject-function-type

References

Fixes #14636

Reviewer guidance

Are the JSDoc linting rules the right ones?
Take a look at one of the remediation commits to see the changes being made, are they worthwhile?

AI usage

This work was initially done by Claude Code via rtibblesbot, then taken over by me to pare back and remediate its over exuberance.

@github-actions github-actions Bot added DEV: renderers HTML5 apps, videos, exercises, etc. APP: Device Re: Device App (content import/export, facility-syncing, user permissions, etc.) APP: Facility Re: Facility App (user/class management, facility settings, csv import/export, etc.) APP: Learn Re: Learn App (content, quizzes, lessons, etc.) APP: Coach Re: Coach App (lessons, quizzes, groups, reports, etc.) APP: User Re: User app (sign-in, sign-up, user profile, etc.) APP: Setup Wizard Re: Setup Wizard (facility import, superuser creation, settings, etc.) DEV: frontend DEV: tools Internal tooling for development SIZE: very large labels Apr 27, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 27, 2026

npm Package Versions

Merging this PR will publish the following packages to npm:

Package Current New
kolibri-format 2.3.0 2.4.0

Warning

The following packages have changed files but no version bump:

Package Version Changed files
eslint-plugin-kolibri 1.1.0 17
kolibri-build 1.1.0 7
kolibri-glob 1.0.0 1
kolibri-i18n 1.0.0 2
kolibri-module 1.0.0 1
kolibri-tools 0.18.2 2
kolibri 0.18.0 20

If these changes affect published code, consider bumping the version.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 27, 2026

@rtibbles rtibbles force-pushed the issue-14636-010f06 branch 2 times, most recently from 56b5c4d to ce530d2 Compare April 29, 2026 23:14
rtibbles and others added 11 commits April 29, 2026 16:51
Registers eslint-plugin-jsdoc with flat/recommended-error as the base,
plus opt-in rules targeting .js and .vue files. Adds `affects` to
definedTags so the existing `@affects` convention used in Kolibri
composables for documenting outer-state side-effects keeps validating.
Version bumped to 2.4.0 (skipping 2.3.0 to avoid collision with the
upstream import-x PR).

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Restores typedef references, structured @returns shapes, and inline
@type annotations that the upstream JSDoc rules required satisfying;
adds typedef imports for previously-undefined types; fills missing
@param descriptions, @throws, and @returns declarations.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Restores typedef references and inline @type annotations that the new
JSDoc rules required satisfying; adds typedef imports for previously-
undefined types (Vue refs, ContentNode, FetchObject, etc.); fills
missing @param descriptions, @throws, and @returns declarations.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Adds typedef imports for ESLint and vue-eslint-parser AST types
(RuleContext, VElement, Token, ASTNode, Program, etc.) so the rule
implementations validate; restores @Private tags and inline @type
annotations; fills missing block descriptions and @returns/@throws.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Covers kolibri-build, kolibri-zip, kolibri-sandbox, kolibri-tools,
kolibri-module, kolibri-i18n. Restores Language/ContentNode/Theme
typedefs in the sandbox embedding shim, typedef imports for opaque
types, and fills missing block descriptions, @param descriptions,
@throws, and @returns declarations.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Restores typedefs (Quiz/QuizSection/QuizQuestion/QuizExercise),
typed @Property entries on UseResourceSelectionResponse and other
local types, inline @type annotations on composable refs, and the
@affects side-effect documentation on quiz/resource composables.
Fills missing block descriptions, @param descriptions, @throws,
and @returns declarations.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Adds typedef imports for Vue Ref/ComputedRef and ContentNode-family
types used in composables and progress-tracking; restores typed
@returns shapes on useCoreLearn; fills missing block descriptions,
@param descriptions, @throws, and @returns declarations across the
learn-app composables and views.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Restores the HACK note in availableChannelsActions explaining the
unlisted-channel workaround; restores Node/SelectedNodes/AnnotatedNode
typedefs in treeViewUtils; restores the downloadChannelMetadata
JSDoc and the "does not interact with Vuex store" caveat in wizard
utils. Fills missing block descriptions, @param descriptions,
@throws, and @returns declarations.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Adds typedef import for video.js Component; restores typed @param
annotations across the videojs Vue mixins; fills missing block
descriptions, @param descriptions, and @returns declarations on
the captions/languages/transcript helper modules.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Restores the importLodUsers TODO comment and merged punctuation in
wizardMachine; restores the UseActionWithUndoObject typedef and the
unmounted-component warning paragraph on useActionWithUndo; restores
the "Needed: id, facility, role" caller hint in userManagement
actions. Fills missing block descriptions, @param descriptions,
@throws, and @returns declarations.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Covers epub_viewer, qti_viewer, and user_auth. Strips a stray period
on a URL in qti and fills the few missing JSDoc descriptions and
@param descriptions to satisfy the new rules.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
@rtibbles rtibbles force-pushed the issue-14636-010f06 branch from ce530d2 to fa9dbc7 Compare April 29, 2026 23:52
@rtibbles rtibbles marked this pull request as ready for review April 30, 2026 15:20
@AlexVelezLl AlexVelezLl self-requested a review April 30, 2026 15:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

APP: Coach Re: Coach App (lessons, quizzes, groups, reports, etc.) APP: Device Re: Device App (content import/export, facility-syncing, user permissions, etc.) APP: Facility Re: Facility App (user/class management, facility settings, csv import/export, etc.) APP: Learn Re: Learn App (content, quizzes, lessons, etc.) APP: Setup Wizard Re: Setup Wizard (facility import, superuser creation, settings, etc.) APP: User Re: User app (sign-in, sign-up, user profile, etc.) DEV: frontend DEV: renderers HTML5 apps, videos, exercises, etc. DEV: tools Internal tooling for development SIZE: very large

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Enforce JSDoc comment standards via eslint-plugin-jsdoc

1 participant