-
-
Notifications
You must be signed in to change notification settings - Fork 158
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make recommended or a new config with logical rules #1175
Comments
Despite the explanation on typescript-eslint.io I'm also unclear that these |
I think that the general issue here is the hierarchical configuration approach of eslint-plugin-jsdoc. @JoshuaKGoldberg using flat configs, you can already inherit a default configuration. However, the issue is that if you disable some rules, others will be disabled as well, because of the rule hierarchy.
|
The rules are not actually hierarchical in this manner. If So, what @JoshuaKGoldberg is requesting is simply a config to automatically disable the likes of:
I would presume the following would also be desired for disabling:
This will thus not require params, properties, return statements, etc., nor their names, types, or descriptions to be present, just that if present, they are valid (according to remaining rules such as There is a separate dimension here though, as to what is "stylistic". For example, In my view, it could be more helpful for us to have a few more atomic groupings (possibly even overlapping), e.g., a |
I do something similar in my config for types-in-js workflows, that skips the documentation aspect of jsdoc: https://github.com/voxpelli/eslint-config/blob/main/base-configs/jsdoc.js jsdoc.configs['flat/recommended-typescript-flavor'],
{
name: '@voxpelli/jsdoc',
rules: {
'jsdoc/check-types': 'off',
'jsdoc/require-jsdoc': 'off',
'jsdoc/require-param-description': 'off',
'jsdoc/require-property-description': 'off',
'jsdoc/require-returns-description': 'off',
'jsdoc/require-yields': 'off',
'jsdoc/tag-lines': ['warn', 'never', { 'startLines': 1 }],
'jsdoc/valid-types': 'off',
},
}, Something like |
As of #1289,
I like that naming! If it helps, I'd be happy to send a PR with this, if given the 👍. 🙂 |
Ok, so you're also talking about disabling truly stylistic items as well. But I think we should also have config which is for disabling requirements (e.g.,
Sure, go for it. Thanks! |
## Overview General catch-all `ncu -u` and `pnpm dedupe`. The latest versions of a few packages had required changes: * `husky`: now has a smaller `.husky/*` hooks file format, yay! * `eslint-plugin-jsdoc`: has a new stylistic rule added to recommended (gajus/eslint-plugin-jsdoc#1175 (comment)) * `eslint-plugin-n`: noted that `parseArgs` was added as experimental in `18.3.0`, so I bumped the minimum Node support version to `18.3.0`. That was the _actual_ minimum version before; anything earlier would crash. 💖
🎉 This issue has been resolved in version 50.2.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Motivation
I'd like to use the recommended ruleset from
eslint-plugin-jsdoc
only to enforce that JSDoc comments are correct in TypeScript repos. I don't want to enforce that they exist, just that if they do exist they're correct.Current behavior
Right now, the steps are:
plugin:jsdoc/recommended-typescript-error
jsdoc/require-*
rules (jsdoc,
param,returns
,yields
)Desired behavior
My preference would be to have a breaking change to remove those rules from
plugin:jsdoc/recommended-typescript
and put them into a new preset config likestylistic-typescript
. This would mirror how typescript-eslint has separate "stylistic" configs.Failing that, it'd be nice to have a preset config with a name like
plugin:jsdoc/logical
.Alternatives considered
Users like me can make our own shareable configs... but it'd be nice to not have to wrap around jsdoc's configs that way.
The text was updated successfully, but these errors were encountered: