eslint-plugin-codebox icon indicating copy to clipboard operation
eslint-plugin-codebox copied to clipboard

Resolve error: unable to load resolver "node" codebox/sort-imports

Open MrSaints opened this issue 7 years ago • 2 comments

Running ESLint (without fix) with eslint-plugin-codebox results in the following error for majority of files:

  1:1  error  Resolve error: unable to load resolver "node"  codebox/sort-imports

Most of the files starts with:

import React from "react";

The rules used are similar to that in the README:

        "codebox/sort-imports": ["error", {
          "groups": [
            "builtin",
            "external",
            "parent",
            "sibling",
            "index",
            ["unknown", "absolute"]
          ],
          "importTypes": [
            "default",
            "named",
            "all",
            "none"
          ],
          "ignoreCase": true
        }]

Environment:

Node: v8.9.0 ESLint: ^4.17.0 ESLint React: ^7.6.1 Babel ESLint: ^8.1.2

MrSaints avatar Feb 07 '18 12:02 MrSaints

yarn add -D eslint-import-resolver-node fixes the problem.

MrSaints avatar Feb 07 '18 12:02 MrSaints

Ouch, that's what I get for incorrectly borrowing code from eslint-plugin-import It actually soft-depends on resolve from eslint-module-utils (which is a dependency of eslint-import-resolver-node)

I'll fix this tomorrow, thanks for feedback! :)

asn007 avatar Feb 09 '18 23:02 asn007