You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Within my current typescript project I am using a jsdoc.jsJavascript file type as opposed to the default jdsoc.jsonJSON 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):
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.jsJavascript 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.
The text was updated successfully, but these errors were encountered:
Describe the bug
Within my current typescript project I am using a
jsdoc.js
Javascript file type as opposed to the defaultjdsoc.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):
They can be found in this repos publish.js file
To Reproduce
Use this theme:
jsdoc.js
Javascript file type as opposed to the defaultjdsoc.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:
publish.js
will make this theme eslint compatible (when using with ajsdoc.js
Javascript file type) .publish.js
fileCons:
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.
The text was updated successfully, but these errors were encountered: