Skip to content

peteringram0/auto-js-doc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Auto JSDoc

This project aims to add JsDoc blocks to functions and eventually update old blocks. Test it out at.

Input:

function myFunction(param1: string, param2?: boolean, param3 = "default value"): Promise<string> {

}

Output:

/**
 * myFunction
 *
 * @param {string} param1 - 
 * @param {boolean} [param2] - 
 * @param {string} [param3="default value"] - 
 * @returns {Promise<string>}
 */
function myFunction(param1: string, param2?: boolean, param3 = "default value"): Promise<string> {

}

Roadmap

  • Parsing - Support classes
  • Parsing - Support optional defaults
  • Parsing - private functions
  • Parsing - Check exported and non exported functions
  • Parsing - Static function support
  • Parsing - Should ignore constructor with private a: string as part of the arguments (need to check this)
  • Parsing - Support union type
  • Parsing - Add in @returns
  • IO - setup stdin and stdout
  • Site - lock down orgian allowed to call my instance
  • Site - Example site
  • Hosting - Check over all settings
  • Support existing code comments (use as the description)
  • Github CI to build releases
  • Site - debounce requests

Build

docker build -t auto-js .
docker run --name auto-js -p 3000:3000 auto-js

Notes

tree-sitter/tree-sitter#1550