Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 470
chore(repo): Add eslint-plugin-jsdoc#5697
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
Uh oh!
There was an error while loading. Please reload this page.
Changes from all commits
a970a5f17901a8eae30245e389274ede134908c1b72b54e8698c380da3f014aFile filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| --- | ||
| --- |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -11,6 +11,7 @@ import pluginSimpleImportSort from 'eslint-plugin-simple-import-sort'; | ||
| import pluginTurbo from 'eslint-plugin-turbo'; | ||
| import pluginUnusedImports from 'eslint-plugin-unused-imports'; | ||
| import pluginYml from 'eslint-plugin-yml'; | ||
| import pluginJsDoc from 'eslint-plugin-jsdoc'; | ||
| import globals from 'globals'; | ||
| import tseslint from 'typescript-eslint'; | ||
| @@ -419,21 +420,32 @@ export default tseslint.config([ | ||
| 'turbo/no-undeclared-env-vars': 'off', | ||
| }, | ||
| }, | ||
| ...pluginYml.configs['flat/recommended'], | ||
| { | ||
| name: 'repo/.github', | ||
| // rules: { | ||
| // 'regex/invalid': [ | ||
| // 'error', | ||
| // [ | ||
| // { | ||
| // regex: '^(?!.*\\$TURBO_ARGS( |$)).*turbo \\S+', | ||
| // message: 'Invalid turbo CI command. Must contain `$TURBO_ARGS`', | ||
| // }, | ||
| // ], | ||
| // ], | ||
| // }, | ||
| name: 'repo/jsdoc', | ||
| ...pluginJsDoc.configs['flat/recommended-typescript'], | ||
| files: ['packages/shared/src/**/*.{ts,tsx}'], | ||
| ignores: ['**/__tests__/**'], | ||
| plugins: { | ||
| jsdoc: pluginJsDoc, | ||
| }, | ||
| rules: { | ||
| ...pluginJsDoc.configs['flat/recommended-typescript'].rules, | ||
| 'jsdoc/check-examples': 'off', | ||
ContributorAuthor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't want it to raise false positives in the examples, we want more control over it | ||
| 'jsdoc/informative-docs': 'warn', | ||
ContributorAuthor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This ensures that this doesn't happen: /** The user id. */letuserId;You have to write a longer description, not restate the name | ||
| 'jsdoc/check-tag-names': ['warn', { definedTags: ['inline', 'unionReturnHeadings'], typed: false }], | ||
ContributorAuthor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This will warn when an unknown/invalid tag name is used | ||
| 'jsdoc/require-hyphen-before-param-description': 'warn', | ||
| 'jsdoc/require-description': 'warn', | ||
| 'jsdoc/require-description-complete-sentence': 'warn', | ||
ContributorAuthor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sentences end with fullstop and start with capital letter | ||
| 'jsdoc/require-param': ['warn', { ignoreWhenAllParamsMissing: true }], | ||
| 'jsdoc/require-param-description': 'warn', | ||
| 'jsdoc/require-returns': 'off', | ||
ContributorAuthor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Together with | ||
| 'jsdoc/tag-lines': [ | ||
ContributorAuthor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This ensures empty lines between tags/description, unless for multiple | ||
| 'warn', | ||
| 'always', | ||
| { count: 1, applyToEndTag: false, startLines: 1, tags: { param: { lines: 'never' } } }, | ||
| ], | ||
| }, | ||
| }, | ||
| ...pluginYml.configs['flat/recommended'], | ||
| configPrettier, | ||
| ]); | ||
ContributorAuthor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I fixed this file as an exercise and check how the rules will apply |
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whenever we add JSDoc comments to previously undocumented functions we'll need to update this snapshot as Typedoc will only generate MDX files for documented, exported functions.
You can update the snapshot by running
pnpm test:typedoc -u