Skip to content
This repository was archived by the owner on Jun 8, 2023. It is now read-only.
This repository was archived by the owner on Jun 8, 2023. It is now read-only.

Possible regression with v5.1.0 #102

@diegohaz

Description

@diegohaz

Hey, thank you very much for this project.

I've upgraded eslint-import-resolver-babel-module in my project from v5.0.1 to v5.1.0 and started seeing errors on yarn lint.

Here's a reproduction (tested, can just copypaste and execute):

git clone https://github.com/reakit/reakit
cd reakit
git checkout 1ec0a3a1f3e53f4fa0665e1a67e50cbd90c1bf17
yarn
yarn lint # no errors with v5.0.1
yarn upgrade [email protected]
yarn lint # a bunch of errors

One of the revelant errors:

[eslint-import-resolver-babel-module] Error: [BABEL] /Users/diegohaz/Projects/test/reakit/packages/website/src/templates/Docs.tsx: `babel-preset-gatsby` has been loaded, which consumes config generated by the Gatsby CLI. Set `NODE_ENV=test` to bypass, or run `gatsby build` first. (While processing: "/Users/diegohaz/Projects/test/reakit/node_modules/babel-preset-gatsby/index.js")
    at loadCachedConfig (/Users/diegohaz/Projects/test/reakit/node_modules/babel-preset-gatsby/index.js:16:15)
    at preset (/Users/diegohaz/Projects/test/reakit/node_modules/babel-preset-gatsby/index.js:29:29)
    at loadDescriptor (/Users/diegohaz/Projects/test/reakit/node_modules/@babel/core/lib/config/full.js:165:14)
    at cachedFunction (/Users/diegohaz/Projects/test/reakit/node_modules/@babel/core/lib/config/caching.js:33:19)
    at loadPresetDescriptor (/Users/diegohaz/Projects/test/reakit/node_modules/@babel/core/lib/config/full.js:235:63)
    at config.presets.reduce (/Users/diegohaz/Projects/test/reakit/node_modules/@babel/core/lib/config/full.js:77:21)
    at Array.reduce (<anonymous>)
    at recurseDescriptors (/Users/diegohaz/Projects/test/reakit/node_modules/@babel/core/lib/config/full.js:74:38)
    at loadFullConfig (/Users/diegohaz/Projects/test/reakit/node_modules/@babel/core/lib/config/full.js:108:6)
    at loadOptions (/Users/diegohaz/Projects/test/reakit/node_modules/@babel/core/lib/config/index.js:27:36)
See: https://github.com/tleunen/eslint-import-resolver-babel-module/pull/34

If I run it like NODE_ENV=test yarn lint, it passes without errors, but I've never needed to do so. I'm not sure if it's the right solution.

For now, I'm gonna stick with v5.0.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions