-
-
Notifications
You must be signed in to change notification settings - Fork 169
Closed
Labels
Description
Version: 32.3.0
The following code will be marked as invalid due to broken support for inline imports for types.
We get ESLint: Syntax error in type: import("@amcharts/amcharts4/charts").SeriesDataItem(jsdoc/valid-types) for both inline imports, while they work fine for code inference in VSCode and Intellij Webstorm/Ultimate.
test.js
/**
* Returns a series.
*
* @param {import("@amcharts/amcharts4/charts").SeriesDataItem} dataSeries - A series
* @return {int} The item height
*/
function foo (dataSeries) {
return dataSeries.itemHeight;
}
/**
* @param {import('./foo').Foo} foo
*/
function qux(foo) {
}foo.js
/**
* @typedef Foo
* @property {string} bar
*/.eslintrc.js
module.exports = {
plugins: [
'jsdoc',
],
rules: {
'jsdoc/valid-types': 'error',
},
};package.json
{
"dependencies": {
"@amcharts/amcharts4": "4.10.17"
},
"devDependencies": {
"eslint": "7.22.0",
"eslint-plugin-jsdoc": "32.3.0"
}
}tedbarth and Arkellys