entwicklerstube / babel-plugin-root-import

Add the opportunity to import modules by the root path
https://npmjs.com/babel-plugin-root-import
MIT License
1.18k stars 76 forks source link

Update ESLint resolver repository in README #124

Closed diego3g closed 5 years ago

diego3g commented 5 years ago

As it seems that old reference was not being maintained, update the repository reference so ESLint can track Babel 7 configuration file babel.config.js and also custom configurations like extensions.

brigand commented 5 years ago

Thanks for the PR.

I took a look at the code in your fork and it seems to only load the config when specified in a very specific way. It's still very common to have .babelrc and .babelrc.js files in projects or to have babel.config.js export a function or have any JS code in it.

I think this will cause confusion with the readme not explaining exactly what's accepted, and people will get unclear error messages from the current implementation.

A note about only supporting babel.config.js in the current working directory and it has to literally be module.exports = <json5> would clarify when you need to duplicate the config into eslint. A better error message if the file fails to parse as JSON5 would also make debugging the issue easier.

I'd prefer to have these problems solved before linking to it.

brigand commented 5 years ago

Closing for staleness.