chore: ran eslint-plugin-jsdoc/check-tag-names autofixer on fibjs#65315
Conversation
| * | ||
| * | ||
| * @readonly | ||
| * @type Stream |
There was a problem hiding this comment.
There's generally no need to explicitly indicate @type of anything that's already given a type annotation in TypeScript. It's not generally picked up well by tooling, and is sometimes inaccurate. For example, the Stream type here is a human nickname for the actual Class_Stream type. And later on String is used instead of string.
| * | ||
| * | ||
| * @readonly | ||
| * @type Integer |
There was a problem hiding this comment.
Here, the @type actually did add useful information (TypeScript doesn't have a way to represent numbers that are only ever integers). So I manually preserved the info as a @note.
|
@JoshuaKGoldberg Thank you for submitting this PR! This is a live comment which I will keep updated. 1 package in this PRCode ReviewsBecause this is a huge PR, it can be merged once it's reviewed by a DT maintainer. You can test the changes of this PR in the Playground. Status
All of the items on the list are green. To merge, you need to post a comment including the string "Ready to merge" to bring in your changes. InactiveThis PR has been inactive for 6 days. Diagnostic Information: What the bot saw about this PR{
"type": "info",
"now": "-",
"pr_number": 65315,
"author": "JoshuaKGoldberg",
"headCommitOid": "35e83d2f55140733daf324b4de5ba1aaec98daea",
"mergeBaseOid": "6541af894623648445612b1247da6036fc974285",
"lastPushDate": "2023-04-27T15:29:24.000Z",
"lastActivityDate": "2023-05-05T11:15:44.000Z",
"mergeOfferDate": "2023-04-28T19:40:55.000Z",
"mergeRequestDate": "2023-05-05T11:15:44.000Z",
"mergeRequestUser": "JoshuaKGoldberg",
"hasMergeConflict": false,
"isFirstContribution": false,
"tooManyFiles": false,
"hugeChange": true,
"popularityLevel": "Well-liked by everyone",
"pkgInfo": [
{
"name": "fibjs",
"kind": "edit",
"files": [
{
"path": "types/fibjs/declare/BufferedStream.d.ts",
"kind": "definition"
},
{
"path": "types/fibjs/declare/Cipher.d.ts",
"kind": "definition"
},
{
"path": "types/fibjs/declare/DbConnection.d.ts",
"kind": "definition"
},
{
"path": "types/fibjs/declare/Digest.d.ts",
"kind": "definition"
},
{
"path": "types/fibjs/declare/EventEmitter.d.ts",
"kind": "definition"
},
{
"path": "types/fibjs/declare/EventInfo.d.ts",
"kind": "definition"
},
{
"path": "types/fibjs/declare/Fiber.d.ts",
"kind": "definition"
},
{
"path": "types/fibjs/declare/File.d.ts",
"kind": "definition"
},
{
"path": "types/fibjs/declare/HeapGraphEdge.d.ts",
"kind": "definition"
},
{
"path": "types/fibjs/declare/HeapGraphNode.d.ts",
"kind": "definition"
},
{
"path": "types/fibjs/declare/HttpClient.d.ts",
"kind": "definition"
},
{
"path": "types/fibjs/declare/HttpCookie.d.ts",
"kind": "definition"
},
{
"path": "types/fibjs/declare/HttpHandler.d.ts",
"kind": "definition"
},
{
"path": "types/fibjs/declare/HttpMessage.d.ts",
"kind": "definition"
},
{
"path": "types/fibjs/declare/HttpRequest.d.ts",
"kind": "definition"
},
{
"path": "types/fibjs/declare/HttpResponse.d.ts",
"kind": "definition"
},
{
"path": "types/fibjs/declare/HttpServer.d.ts",
"kind": "definition"
},
{
"path": "types/fibjs/declare/HttpUploadData.d.ts",
"kind": "definition"
},
{
"path": "types/fibjs/declare/HttpsServer.d.ts",
"kind": "definition"
},
{
"path": "types/fibjs/declare/Image.d.ts",
"kind": "definition"
},
{
"path": "types/fibjs/declare/Int64.d.ts",
"kind": "definition"
},
{
"path": "types/fibjs/declare/LruCache.d.ts",
"kind": "definition"
},
{
"path": "types/fibjs/declare/Message.d.ts",
"kind": "definition"
},
{
"path": "types/fibjs/declare/MySQL.d.ts",
"kind": "definition"
},
{
"path": "types/fibjs/declare/PKey.d.ts",
"kind": "definition"
},
{
"path": "types/fibjs/declare/SQLite.d.ts",
"kind": "definition"
},
{
"path": "types/fibjs/declare/SandBox.d.ts",
"kind": "definition"
},
{
"path": "types/fibjs/declare/Service.d.ts",
"kind": "definition"
},
{
"path": "types/fibjs/declare/Smtp.d.ts",
"kind": "definition"
},
{
"path": "types/fibjs/declare/Socket.d.ts",
"kind": "definition"
},
{
"path": "types/fibjs/declare/SslHandler.d.ts",
"kind": "definition"
},
{
"path": "types/fibjs/declare/SslServer.d.ts",
"kind": "definition"
},
{
"path": "types/fibjs/declare/SslSocket.d.ts",
"kind": "definition"
},
{
"path": "types/fibjs/declare/Stat.d.ts",
"kind": "definition"
},
{
"path": "types/fibjs/declare/StringDecoder.d.ts",
"kind": "definition"
},
{
"path": "types/fibjs/declare/SubProcess.d.ts",
"kind": "definition"
},
{
"path": "types/fibjs/declare/UrlObject.d.ts",
"kind": "definition"
},
{
"path": "types/fibjs/declare/WebSocket.d.ts",
"kind": "definition"
},
{
"path": "types/fibjs/declare/WebSocketMessage.d.ts",
"kind": "definition"
},
{
"path": "types/fibjs/declare/X509Cert.d.ts",
"kind": "definition"
},
{
"path": "types/fibjs/declare/X509Req.d.ts",
"kind": "definition"
},
{
"path": "types/fibjs/declare/XmlAttr.d.ts",
"kind": "definition"
},
{
"path": "types/fibjs/declare/XmlCharacterData.d.ts",
"kind": "definition"
},
{
"path": "types/fibjs/declare/XmlDocument.d.ts",
"kind": "definition"
},
{
"path": "types/fibjs/declare/XmlDocumentType.d.ts",
"kind": "definition"
},
{
"path": "types/fibjs/declare/XmlElement.d.ts",
"kind": "definition"
},
{
"path": "types/fibjs/declare/XmlNamedNodeMap.d.ts",
"kind": "definition"
},
{
"path": "types/fibjs/declare/XmlNode.d.ts",
"kind": "definition"
},
{
"path": "types/fibjs/declare/XmlNodeList.d.ts",
"kind": "definition"
},
{
"path": "types/fibjs/declare/XmlProcessingInstruction.d.ts",
"kind": "definition"
},
{
"path": "types/fibjs/declare/ZmqSocket.d.ts",
"kind": "definition"
}
],
"owners": [
"richardo2016"
],
"addedOwners": [],
"deletedOwners": [],
"popularityLevel": "Well-liked by everyone"
}
],
"reviews": [
{
"type": "approved",
"reviewer": "gabritto",
"date": "2023-04-28T19:40:14.000Z",
"isMaintainer": true
}
],
"mainBotCommentID": 1525922360,
"ciResult": "pass"
} |
|
Hey @JoshuaKGoldberg, 😒 Your PR doesn't modify any tests, so it's hard to know what's being fixed, and your changes might regress in the future. Please consider adding tests to cover the change you're making. Including tests allows this PR to be merged by yourself and the owners of this module. This can potentially save days of time for you! |
|
🔔 @richardo2016 — please review this PR in the next few days. Be sure to explicitly select |
|
@JoshuaKGoldberg: Everything looks good here. I am ready to merge this PR (at 35e83d2) on your behalf whenever you think it's ready. If you'd like that to happen, please post a comment saying:
and I'll merge this PR almost instantly. Thanks for helping out! ❤️ (@richardo2016: you can do this too.) |
|
I've set a reminder for a week from now to make the comment, to give @richardo2016 some time. Just in case 😄 |
Hi, I'm sorry to deal with this PR so late. On the other handle, I didn't see the |
|
No rush on my account, thanks! |
|
Ready to merge |
…-tag-names autofixer on fibjs by @JoshuaKGoldberg
Context: Part of part of #648, porting old TSLint rules to ESLint equivalents. Within migrating
no-redundant-jsdoc2, this runs the auto-fixer from jsdoc/check-tag-names. This PR splits out specificallyfibjstypes from #65080, per #65080 (comment).jsdoc/check-tag-namesreports on JSDoc tags that are unnecessary. Here, we're using its{ typed: true }option to look for JSDoc tags that are redundant in TypeScript.I used a very permissive ESLint config to avoid flagging library-specific tags or switching tag names unnecessarily (e.g.
@returnto@returns){ "root": true, "extends": [], "parser": "@typescript-eslint/parser", "plugins": ["@typescript-eslint", "jsdoc"], "rules": { "jsdoc/check-tag-names": [ "error", { "definedTags": [ "addVersion", "api", "author", "beta", "brief", "category", "cfg", "chainable", "check", "classDescription", "condparamprivilege", "constraint", "credits", "declaration", "defApiFeature", "defaultValue", "detail", "end", "eventproperty", "experimental", "export", "expose", "extendscript", "factory", "field", "final", "fixme", "fluent", "for", "governance", "header", "hidden-property", "hidden", "id", "label", "language", "link", "listen", "locus", "methodOf", "minVersion", "ngdoc", "nonstandard", "note", "npm", "observable", "option", "optionobject", "options", "packageDocumentation", "param", "parent", "platform", "plugin", "preserve", "privateRemarks", "privilegeLevel", "privilegeName", "proposed", "range", "readOnly", "related", "remark", "remarks", "required", "requires", "restriction", "returnType", "section", "see", "since", "const", "singleton", "source", "struct", "suppress", "targetfolder", "enum", "title", "record", "title", "TODO", "trigger", "triggers", "typeparam", "typeParam", "unsupported", "url", "usage", "warn", "warning", "version" ], "typed": true } ] }, "settings": { "jsdoc": { "tagNamePreference": { "argument": "argument", "exception": "exception", "function": "function", "method": "method", "param": "param", "return": "return", "returns": "returns" } } } }Starting off as a draft so we can discuss what changes might need to be made to
check-tag-names. Each classification of change has a comment thread inline.