Skip to content
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

chore: avoid nodejs modules #487

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

wjhsf
Copy link
Contributor

@wjhsf wjhsf commented Jan 9, 2025

This adds a new eslint plugin to avoid node's built in modules, and hopefully help keep our package more cross-platform compatible.

@@ -2,7 +2,9 @@

import eslint from '@eslint/js'
import prettierRecommended from 'eslint-plugin-prettier/recommended'
// eslint-disable-next-line import/no-unresolved
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is due to import-js/eslint-plugin-import#1485 which includes a fix that works for me (locally) but produces a couple extra warnings.

@@ -11,6 +13,9 @@ export default tseslint.config(
},
eslint.configs.recommended,
...tseslint.configs.strictTypeChecked,
pluginImport.recommended,
// @ts-expect-error not sure why the plugin isn't type correctly, but it works...
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I removed this after including the fix mentioned above and did not see any errors.

@colincasey
Copy link
Contributor

Nice! This was the plugin I was looking at last night when trying to figure out how we can best avoid breaking non-Node runtimes.

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

Successfully merging this pull request may close these issues.

2 participants