Eslint-plugin-import: support @providesModule

Created on 10 Sep 2016  路  3Comments  路  Source: benmosher/eslint-plugin-import

as title, need support @providesModule
https://github.com/facebook/fbjs

Current solutions, but it's not good idea.

"import/core-modules": [
    "EventEmitter",
    "NativeError",
    "ColorPropType",
    "ImageSourcePropType",
]

Most helpful comment

I don't know anything about @providesModule, including what it is for and what its impact is.

If it can be supported via a resolver, that would be ideal, given what @ljharb has already noted about usage outside Facebook.

If it can't be supported via resolver, I don't think it would make sense to add code directly to the plugin to ingest it.

All 3 comments

This would be useful. We are using @providesModule extensively in our React Native project as well as this plug in.

Using providesModule outside of FB is not a good idea; the read me on that repo supports that position.

I'd be hesitant to support something like that when the entire ecosystem is using node-style commonJS.

I don't know anything about @providesModule, including what it is for and what its impact is.

If it can be supported via a resolver, that would be ideal, given what @ljharb has already noted about usage outside Facebook.

If it can't be supported via resolver, I don't think it would make sense to add code directly to the plugin to ingest it.

Was this page helpful?
0 / 5 - 0 ratings