eslint-closure icon indicating copy to clipboard operation
eslint-closure copied to clipboard

don't know what I should add to support the `new` type

Open NormanPerrin opened this issue 7 years ago • 0 comments

Question

The linter throws an error of type new unknow. How could I config the eslint to support this type?

type reference

function-new-type

error

Syntax error in type: {new(source: {documents: Map<string, D>}): DListConstructor} jsdoc/valid-types

.eslintrc config

{
    "plugins": [
        "jsdoc",
        "closure"
    ],
    "env": {
        "es6": true
    },
    "rules": {
        "jsdoc/check-param-names": 1,
        "jsdoc/check-tag-names": 1,
        "jsdoc/check-types": 1,
        "jsdoc/newline-after-description": 1,
        "jsdoc/require-description-complete-sentence": 1,
        "jsdoc/require-param": 1,
        "jsdoc/require-param-type": 1,
        "jsdoc/require-returns-type": 1,
        "jsdoc/valid-types": 1
    },
    "settings": {
        "jsdoc": {
            "additionalTagNames": {
                "customTags": ["template"]
            }
        }
    }
}

the comment

/**
 * @param {{new(source: {documents: Map<string, D>}): DListConstructor}} ObjectiveClass
 */

NormanPerrin avatar Sep 10 '18 13:09 NormanPerrin