-
-
Notifications
You must be signed in to change notification settings - Fork 170
Closed
Description
Expected behavior
valid-types should allow users to specify the properties of values in an array as documented on the JSDoc website: https://jsdoc.app/tags-param.html#parameters-with-properties
Actual behavior
6:0 error Syntax error in namepath: employees[].name jsdoc/valid-types
7:0 error Syntax error in namepath: employees[].department jsdoc/valid-types
ESLint Config
'use strict';
module.exports = {
env: {
node: true,
},
plugins: ['jsdoc'],
rules: {
'jsdoc/valid-types': [
'error',
{ allowEmptyNamepaths: true, checkSeesForNamepaths: false },
],
},
};ESLint sample
'use strict';
/**
* Assign the project to a list of employees.
* @param {Object[]} employees - The employees who are responsible for the project.
* @param {string} employees[].name - The name of an employee.
* @param {string} employees[].department - The employee's department.
*/
function assign(employees) {
// ...
}Environment
- Node version: v12.18.1
- ESLint version: v7.3.1
eslint-plugin-jsdocversion: v28.5.1
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
sevdog, iniatse and arjungarg07eaviles