Fiyin Akinsiku
Fiyin Akinsiku

Reputation: 188

EsLint says definition for rule "jsdoc/require-jsdoc" not found?

I installed the eslint-plugin-jsdoc and set it like so in my eslint config file:

{
"extends": ["airbnb-base", "plugin:jsdoc/recommended"],
"plugins": ["jsdoc"],
"rules": {
      "jsdoc/require-jsdoc": ["error", {"require": {
      "FunctionDeclaration": true,
      "MethodDefinition": true,
      "ClassDeclaration": true,
      "FunctionExpression": true
    }}]
  }
}

I keep getting this error message: Definition for rule "jsdoc/require-jsdoc" not found at the top of all my files. It also stopped giving warning signs for missing declarations. And I also get this from codeclimate

/usr/local/node_modules/eslint/lib/config/config-file.js:434
            throw e;
            ^

TypeError: Cannot read property 'recommended' of undefined
Referenced from: /code/.eslintrc.json
    at loadConfigFile (/usr/local/node_modules/eslint/lib/config/config-file.js:217:40)
    at load (/usr/local/node_modules/eslint/lib/config/config-file.js:535:18)
    at configExtends.reduceRight.e (/usr/local/node_modules/eslint/lib/config/config-file.js:424:36)
    at Array.reduceRight (native)
    at applyExtends (/usr/local/node_modules/eslint/lib/config/config-file.js:408:28)
    at Object.load (/usr/local/node_modules/eslint/lib/config/config-file.js:566:22)
    at loadConfig (/usr/local/node_modules/eslint/lib/config.js:63:33)
    at new Config (/usr/local/node_modules/eslint/lib/config.js:229:42)
    at CLIEngine.getConfigForFile (/usr/local/node_modules/eslint/lib/cli-engine.js:774:30)
    at Object.run (/usr/src/app/lib/eslint.js:236:56)

I have tried the solutions here and here, but still getting the same error.

Any help is appreciated. Thanks

Upvotes: 1

Views: 4408

Answers (1)

Miftah Classifieds
Miftah Classifieds

Reputation: 291

See nzakas words, quote:

"Thanks for the suggestion. As of yesterday, we have decided to officially end-of-life JSDoc support in ESLint. All JSDoc features are now deprecated and we won't be fixing bugs or making any further improvements to those features.

We are recommending that people transition over to use the eslint-plugin-jsdoc plugin instead of the built-in rules in ESLint.

Thanks for understanding and we apologize for any inconvenience."

Upvotes: 3

Related Questions