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

New option: Support "fetch" in "ignore" option of n/no-unsupported-features/node-builtins #268

Closed
1 task
regseb opened this issue May 8, 2024 · 3 comments · Fixed by #277
Closed
1 task

Comments

@regseb
Copy link

regseb commented May 8, 2024

Rule details

This issue doesn't propose a new rule, but a new value for the "ignore" option of the n/no-unsupported-features/node-builtins rule.

With Node v20, this rule reports that fetch is experimental. I'd like to disable fetch checking by adding it to the list of ignored features.

What type of rule is this?

Suggests an alternate way of doing something

Example code

export default {
  "rules": {
    "n/no-unsupported-features/es-builtins": [
      "error",
      { ignores: ["fetch"] }
    ]
  }
};

Participation

  • I am willing to submit a pull request to implement this rule.

Additional comments

No response

@regseb regseb added the rule label May 8, 2024
@aladdin-add
Copy link

it should have been supported, we just need to update the docs.

@scagood
Copy link

scagood commented May 8, 2024

I can confirm, this is supported:
https://eslint-online-playground.netlify.app/#eNqNkbtuwzAMRX9F4JIWiOU9WTr0L6IMqkW7SmVK0KNIEfjfq4cdZMiQxRbEc8V7yRsEP/R4lbMzyC8BDjBiHL7fdjKo3fsR9oDBaIp8sDTqqSF6dtZHdgls9HZmAj4a1F+CgKOgtU5buVU7Z9KkqaPK4LUyCkeZTGQnQSw/uLYJ3ONg5xlJodqX0q18GOOc08acBIxGxv4BFXCuNGM+GQyHTfaKkFfJKmfZNfVku0QhueIUVTeijMljyPcKu6+kTdSUEx+a+02H3lsv4P5SNs/0RDYrC9kGnBuy5Y6c22Epv3J7zgPKo3dy+JFT2YulPPYaRkD8c1iaCpityp7XVgIU/n6iK3lo0FiNrfm3FTRZzo4hn9f2T/bzlHpc8iNQTQtaYPkHNczArg==


The only difference is that n/no-unsupported-features/es-builtins is the wrong rule, it should be n/no-unsupported-features/node-builtins.

We added the globals to node-builtins in #261 and removed the incorrect globals in #258.


We also do have this documented:

ES Builtins

image

Node Builtins

image

The one thing I think we need to do is to is to make the documentation in n/no-unsupported-features/node-builtins less explicit 🤔

@regseb
Copy link
Author

regseb commented May 8, 2024

I got confused between the n/no-unsupported-features/node-builtins and n/no-unsupported-features/es-builtins rules. The rule n/no-unsupported-features/node-builtins supports "fetch". There's just the documentation to update.

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

Successfully merging a pull request may close this issue.

3 participants