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

adding support for eslint config #53

Closed
wants to merge 1 commit into from
Closed

Conversation

ywplee
Copy link

@ywplee ywplee commented Apr 20, 2017

support configuration from .eslintrc setting. It's useful if a project doesn't have .babelrc file
e.g. in .eslintrc file

"import/resolver": {
  "babel-module": {
    "root": ["./src"],
    "extensions": [".js", ".jsx"]
  }
}

@codecov
Copy link

codecov bot commented Apr 20, 2017

Codecov Report

Merging #53 into master will decrease coverage by 2.43%.
The diff coverage is 100%.

Impacted Files Coverage Δ
src/index.js 97.56% <100%> (-2.44%) ⬇️

@tleunen
Copy link
Owner

tleunen commented Apr 23, 2017

This is interesting...

Just by curiosity, why don't you want to use a babelrc to configure the plugin? It currently has a peer dependency on a babel plugin... So isn't it weird to have a babel plugin without anything related to babel?

Is this because you're using webpack (or something else) to configure your root/alias?

@ywplee
Copy link
Author

ywplee commented Apr 24, 2017

@tleunen yes, for our current project we rely on webpack/gulp and directly import babelcConfig setting from a js file. Probably not the best setup but provides more flexibility for our project.

@ywplee
Copy link
Author

ywplee commented May 2, 2017

@tleunen hey if you want to change something, let me know

@TheXardas
Copy link

Same here, we're using webpack to configure babel aliases, so it could be nice to specify resolve settings in eslintrc.

@ywplee ywplee force-pushed the master branch 2 times, most recently from 1683f30 to fab33c1 Compare June 20, 2017 22:59
@ywplee
Copy link
Author

ywplee commented Jun 27, 2017

@TheXardas i made a branch which works with this configuration. check out https://github.com/ywplee/eslint-import-resolver-babel-module/tree/m.zumper

use it inside of you package.json like this

"eslint-import-resolver-babel-module": "https://github.com/ywplee/eslint-import-resolver-babel-module.git#m.zumper",

@tleunen
Copy link
Owner

tleunen commented Oct 9, 2017

@ywplee Sorry for the long long long delay. I've finally decided to include this in the final code. Because of the conflicts now, I'll do it in another PR, but thank you for the contribution.

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

Successfully merging this pull request may close these issues.

None yet

3 participants