Describe the bug
Within my current typescript project I am using a jsdoc.js
Javascript file type as opposed to the default jdsoc.json
JSON file type. I'm also using npm packages eslint + prettier/recommended and typescript-eslint/recommended plugins.
There is an error to do with theme_opts
and subsequent options keys, caused by the underscore characters in the key names violating the typescript-eslint camelCase rule when the key names are NOT enclosed in quote characters.
The following theme options keys violate the above mentioned rule (and probably many other style guides):
opts.theme_opts
opts.theme_opts.create_style
opts.theme_opts.add_style_path
opts.theme_opts.add_scripts
opts.theme_opts.add_script_path
They can be found in this repos publish.js file
To Reproduce
Use this theme:
- within a Typescript project.
- with npm packages: prettier/recommended + eslint + typescript-eslint/recommended
- with a
jsdoc.js
Javascript file type as opposed to the default jdsoc.json
JSON file type.
Expected behavior
The theme options not to violate the typescript-eslint camelCase rule.
Additional context
If I enclose the key names in quote characters in order to rid myself of the typescript-eslint rule violation, this then violates the prettier/recommended rules and I'm still left with an error.
Either way I'm forced to enclose the key names within quotes and add eslint-disable-next-line above each of them.
There are some possible pros and cons to implementing a fix for this issue:
-
Pros:
- Removing the underscore characters in the theme options found in
publish.js
will make this theme eslint compatible (when using with a jsdoc.js
Javascript file type) .
- Easy modification to the
publish.js
file
-
Cons:
- Depending on implementation of modifying the
publish.js
file, there is the possibility of causing a breaking change. Users would be forced to update their existing jsdoc config files if the bugfix implementation is not backwards compatible.
I plan on forking this repo to implement a modified publish.js
file for my personal project. Are you open to pull requests if I can implement a fix? I believe I can make it backwards version compatible.
P.S. Love the theme and your work so far. It's my favorite of all the themes I've tried.