question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Rule proposal: `no-native-addon-dependencies`

See original GitHub issue

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

import 'node-sass'; /* error: module `node-sass` contains native addons */
import 'gulp-sass'; /* error: dependency `node-sass` of `gulp-sass` contains native addons */

Pass

import 'sass';
import 'gulp-dart-sass';

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:2
  • Comments:9 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
sindresorhuscommented, Aug 11, 2020

I would prefer no-native-addon-dependencies. The “import” word would not work as it’s about indirect dependencies too.

1reaction
silverwindcommented, Aug 11, 2020

I think I still prefer the name no-native-import. For example, I have a module that has platform-specific functionality while still being pure JS.

Read more comments on GitHub >

github_iconTop Results From Across the Web

NodeJS: loading ES Modules and native addons in the same ...
I ran into a similar problem and fixed it this way: https://nodejs.org/api/module.html#module_module_createrequire_filename
Read more >
terraform-cisco-modules/iks/intersight | addons Example
Create Addons. This example creates addons and based on the information provided in the module. Usage. To run this create a 'main.tf', 'variables.tf'...
Read more >
@storybook/addon-a11y - npm
@storybook/addon-a11y. TypeScript icon, indicating that this package has built-in type declarations · Readme · Explore BETA · 16 Dependencies · 469 ...
Read more >
Kubernetes Components
kube-proxy maintains network rules on nodes. ... While the other addons are not strictly required, all Kubernetes clusters should have ...
Read more >
Kogito Documentation
Kogito is a cloud-native business automation technology for building cloud-ready ... the add-on name does not require the kogito-addons-springboot prefix.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found