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
The current xo rules are requiring types. This is good for JavaScript Documentation but bad for TypeScript documentation.
The eslint built in valid-jsdoc has requireParamType and requireReturnType. They could be set to false (in the typescript ruleset) but they don't enforce something.
As ESLint drops support for JSDoc rules (see xojs/xo#378) the suggested eslint-plugin-jsdoc rules will be better.
Also I have a simple example of the current warnings with xo:
/** * Does foobar things * * @param bar <docs> * @return <docs> */functionfoo(bar: string): string{returnbar}
⚠ 1:1 Missing JSDoc return type. valid-jsdoc
⚠ 4:4 Missing JSDoc parameter type for bar. valid-jsdoc
JSDoc types are duplicate in TypeScript:
https://github.com/bfred-it/webext-options-sync/blob/93eafd4b6607090dca7cc9482a147c88748d340c/index.d.ts#L87-L90 (from https://github.com/bfred-it/webext-options-sync/pull/15/files)
Ideally it would support TSDoc but disabling types would be a step forward.
Settings: https://github.com/gajus/eslint-plugin-jsdoc#eslint-plugin-jsdoc-rules-check-types
The text was updated successfully, but these errors were encountered: