ESLint doesn't recognize doc comments as a use of a type
See original GitHub issueTell us about your environment
- ESLint Version: v6.8.0
- Node Version: v8.11.3
- npm Version: v5.6.0
What parser (default, Babel-ESLint, etc.) are you using? default
Please show your full configuration:
Configuration
module.exports = {
"extends": "standard",
"rules": {
"semi": [2, "always"],
"indent": [2, 4],
"no-return-await": 0,
"space-before-function-paren": [2, {
"named": "never",
"anonymous": "never",
"asyncArrow": "always"
}],
"template-curly-spacing": [2, "always"]
}
};
What did you do? Please include the actual source code causing the issue, as well as the command that you used to run ESLint.
const { TurnContext } = require('botbuilder');
/**
*
* @param {TurnContext} turnContext on turn context object.
*/
async run(turnContext) {}
eslint test.js
What did you expect to happen? ESLint should recognize that the types I’m importing are used in doc comments
What actually happened? Please include the actual, raw output from ESLint.
6:66 error 'TurnContext' is assigned a value but never used no-unused-vars
Are you willing to submit a pull request to fix this bug? Maybe
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
How do I configure ESLint to check for TypeScript class ...
Firstly, I should note that eslint-plugin-jsdoc 's rules are ... the TypeScript docs that @type is used instead--to check that @type has a ......
Read more >Working with Rules - ESLint - Pluggable JavaScript Linter
A pluggable and configurable linter tool for identifying and reporting on patterns in JavaScript. Maintain your code quality with ease.
Read more >eslint-config-ash-nazg - npm
An expansion and tweaking of the "standard" config style for ESLint. Latest version: 34.6.0, last published: 13 days ago.
Read more >How to use ESLint with TypeScript | Khalil Stemmler
ESLint is a JavaScript linter that you can use to lint either TypeScript or JavaScript code. In this post, we'll walk through how...
Read more >VS Code ESLint extension - Visual Studio Marketplace
If you are new to ESLint check the documentation. The extension uses the ESLint library installed in the opened workspace folder. If the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Assuming you mean using a JSDoc plugin rule in addition to
no-unused-vars
in ESLint core, it should be possible to use it in addition. This should be doable similarly to howeslint-plugin-react
marksimport React from "react"
as used in thejsx-uses-react
rule.Docs are here and the rule source code can be found here.
It looks like the conversation is stalled here. As this is a question rather than an action item, I’m closing the issue. If you still need help, please send a message to our mailing list or chatroom. Thanks! [//]: # (auto-close)