codeclimate/codeclimate-eslint

Codeclimate cannot find eslint plugin

Closed this issue · 2 comments

Bug Template

Hi, I am having issues with eslint-plugin-jsdoc on codeclimate. It works fine locally but raises an error when running on codeclimate.

Actual Behavior

Code climate raises these errors:

  • Definition for rule 'jsdoc/require-jsdoc' was not found
  • Invalid JSDoc @param "req" type "object".
  • The type 'object' is undefined.

Expected Behavior

It shouldn't raise those errors. ESLint works fine on my CLI and doesn't raise any of these errors.

Steps to reproduce

  1. Code climate config file:
version: "2"
plugins:
  eslint:
    enabled: true
    channel: "eslint-5"
    config:
      config: ".eslintrc.json"
exclude_patterns:
  - "src/database/"
  - "coverage"
  - "src/models"
  - "src/tests"
  - "src/utilities"
  - "src/validation"

  1. Eslint config file:
{ 
  "root": true,
  "extends": ["airbnb-base", "plugin:jsdoc/recommended"],
  "plugins": ["jsdoc"],
  "env": {
    "node": true,
    "es6": true,
    "mocha": true
  },
  "parser": "babel-eslint",
  "parserOptions": {
    "ecmaVersion": 2015,
    "sourceType": "module",
    "allowImportExportEverywhere": true
  },
  "rules": {
    "no-use-before-define": ["error", { "functions": false, "classes": false }],
    "jsdoc/require-jsdoc": ["error", {"require": {
      "FunctionDeclaration": true,
      "MethodDefinition": true,
      "ClassDeclaration": true,
      "FunctionExpression": true
    }}]
  }
}

@Fiyin-Anne we released a new version of the eslint-5 channel with the newest version of the eslint-plugin-jsdoc. Can you try that and let us know if the issues you experienced are resolved?

@britneywright Yes, the code-climate issue has been resolved. Thanks!