New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rule proposal: no-native-addon-dependencies
#808
Comments
Fantastic idea! How about |
I think I still prefer the name |
@silverwind ah, yes, of course. You're right 🤦 actually now that you say it, I see it's clearly not unusual for cross-platform modules to require platform specific code (so that they accomodate for each platform). Sorry for the noise 😅 |
I would prefer |
Terminology of "addons" seems good. It's also what Node uses in its docs. |
I do have to raise one argument against the rule: Some dependencies may never be imported and a linter rule would miss addons in those. For such cases a |
@fisker that's a simple denylist-based approach, the proposed rule would be more automatic in detection of native addons. I actually think that unless there is a surefire way to detect native addons ( |
no-native-addon-dependencies
I think this rule would be a better fit for https://github.com/mysticatea/eslint-plugin-node. I would recommend opening an issue there. The maintainer there might have some good idea on how to solve this. |
It is often desirable for portability and general stability to not have any native addons in the direct or indirect dependencies. If these cases could be detected reliably and fast, a rule could be created.
Fail
Pass
The text was updated successfully, but these errors were encountered: