Skip to content
This repository has been archived by the owner on Aug 7, 2023. It is now read-only.

Error with eslint-import-resolver-babel-module #1080

Closed
3 tasks done
ernieyang09 opened this issue Jan 17, 2018 · 6 comments
Closed
3 tasks done

Error with eslint-import-resolver-babel-module #1080

ernieyang09 opened this issue Jan 17, 2018 · 6 comments

Comments

@ernieyang09
Copy link

Issue Type

Bug

Issue Description

no problem in VScode, eslint cli, fast eslint(another atom package)

error

Bug Checklist

  • Restart Atom
  • Verify the eslint CLI gives the proper result, while linter-eslint does not
  • Paste the output of the Linter Eslint: Debug command from the Command Palette below
Atom version: 1.23.3
linter-eslint version: 8.4.0
ESLint version: 4.15.0
Hours since last Atom restart: 0
Platform: darwin
Using local project ESLint from: /Users/ernieyang09/Desktop/xx/node_modules/eslint
Current file's scopes: [
  "source.js.jsx",
  "punctuation.terminator.statement.js"
]
linter-eslint configuration: {
  "lintHtmlFiles": false,
  "useGlobalEslint": false,
  "showRuleIdInMessage": true,
  "disableWhenNoEslintConfig": true,
  "eslintrcPath": "",
  "globalNodePath": "",
  "advancedLocalNodeModules": "",
  "eslintRulesDirs": [],
  "disableEslintIgnore": false,
  "disableFSCache": false,
  "fixOnSave": false,
  "scopes": [
    "source.js",
    "source.jsx",
    "source.js.jsx",
    "source.babel",
    "source.js-semantic"
  ],
  "rulesToSilenceWhileTyping": [],
  "rulesToDisableWhileFixing": [],
  "ignoreFixableRulesWhileTyping": false
}
@Arcanemagus
Copy link
Member

@ernieyang09 If we are going to have any hope of reproducing this to see where the bug is you'll need to either attach a .zip of a minimal reproduction case, create a gist, or the best option: Create a minimal repository.

@ernieyang09
Copy link
Author

yap,
just try to create a repo and luckily reproduce the problem.

first commit is no error.
After I add babel-preset-babili, atom can't work properly.

thx

@Arcanemagus
Copy link
Member

eslint-plugin-import silences all errors coming from import resolvers. It's a bug I've brought up with them several times before and they seem to have no interest in fixing.

In this case eslint-import-resolver-babel-module is throwing an error that simply says:
image

That leads to tleunen/eslint-import-resolver-babel-module#34, which it looks like is throwing the error when trying to load your configuration.

After digging deep into the babel-core OptionManager, I managed to get this error out of it:

ReferenceError(Unknown plugin "transform-runtime" specified in "<path>\\babel_module_plugin_test\\.babelrc.env.production" at 0, attempted to resolve relative to "<path>")

I'm actually not sure why the above screenshot is showing an empty Error object as it should be that error, but in any case the problem is that in your production environment configuration you have transform-runtime defined as a plugin but don't actually have that plugin anywhere in your project.

@skylize
Copy link
Contributor

skylize commented Jan 19, 2018

Assuming the above tracing by @Arcanemagus is correct 🤞 (nice source code digging bro 😸 ) , here is what you need to know. https://babeljs.io/docs/plugins/transform-runtime/

@debuglebowski

This comment has been minimized.

@Arcanemagus

This comment has been minimized.

@AtomLinter AtomLinter locked as resolved and limited conversation to collaborators Mar 30, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants