Skip to content

Ignore ESLint rules that rely on module resolution #222

Closed
@dblandin

Description

@dblandin

The ESLint Code Climate engine is intended to run statically against a project workspace. Project dependencies are not installed via npm or yarn prior to analysis. Any ESLint rules that require module resolution will result in a Code Climate issue similar to the following:

  {
    "type": "issue",
    "categories": [
      "Style"
    ],
    "check_name": "import/no-unresolved",
    "description": "Unable to resolve path to module 'react'.",
    "content": {
      "body": "For more information visit Source: http://eslint.org/docs/rules/\n"
    },
    "location": {
      "path": "index.js",
      "positions": {
        "begin": {
          "line": 1,
          "column": 19
        },
        "end": {
          "line": 1,
          "column": 19
        }
      }
    },
    "remediation_points": 50000,
    "fingerprint": "26297b57d7792d3a5d99bbec8b9e94e0",
    "engine_name": "eslint"
  }

We should either maintain a blocklist of rules to skip during analysis or implement a patch that triggers a skip whenever an unexpected module resolution is executed. We may also want to warn to STDERR when ignoring an ESLint check, providing the check name in the message.

If we decide upon a blocklist approach, all currently vendored plugins should be audited for rules that rely on module resolution.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions