Skip to content

Ignore ESLint rules that rely on module resolution #222

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
dblandin opened this issue Mar 20, 2017 · 1 comment
Closed

Ignore ESLint rules that rely on module resolution #222

dblandin opened this issue Mar 20, 2017 · 1 comment

Comments

@dblandin
Copy link
Contributor

dblandin commented Mar 20, 2017

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.

@dblandin
Copy link
Contributor Author

dblandin commented Apr 6, 2017

Closing with #231 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants