eslint-plugin-codebox
eslint-plugin-codebox copied to clipboard
Resolve error: unable to load resolver "node" codebox/sort-imports
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
yarn add -D eslint-import-resolver-node
fixes the problem.
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! :)