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

doc: URL and URLSearchParams are global in node > 8.10 #139

Open
anchnk opened this issue Oct 8, 2018 · 3 comments
Open

doc: URL and URLSearchParams are global in node > 8.10 #139

anchnk opened this issue Oct 8, 2018 · 3 comments

Comments

@anchnk
Copy link

anchnk commented Oct 8, 2018

In the Stylistic Issues section, it's mentioned that both URLSearchParams and URL are defined as global variables.

I think this was introduced by this commit nodejs/node@312414662b which match release 10.0.0.

My current runtime is 8.10 (the latest version supported by AWS lambda atm). It seems that this variables were added to the global scope after that release. Should the documentation mention the version in which that was introduced ?

Also, even thought this is totally personal, I find that this sentence:

It will be readable if we use either Buffer consistently.

Would be less confusing like this (a suggestion):

Your application code base will be more readable if you use either Buffer consistently.

I am willing to do a PR in order to update the prefer-global doc to include both changes if this is relevant.

@anchnk anchnk changed the title URL and URLSearchParams are global in node > 8.10 doc: URL and URLSearchParams are global in node > 8.10 Oct 8, 2018
@mysticatea
Copy link
Owner

mysticatea commented Oct 8, 2018

Hi. Thank you for this issue.

You can find the added version in the official documentation: https://nodejs.org/api/globals.html#globals_url.
Of course, PRs are welcome 😄

Also, my English skill is poor. I appreciate correction about English.

@anchnk
Copy link
Author

anchnk commented Nov 9, 2018

I will have a look to include this in a PR anytime soon

@AlokTakshak
Copy link

@mysticatea
I would like to complete it , can you explain what all needs to be done?

brettz9 pushed a commit to brettz9/eslint-plugin-node that referenced this issue Jul 24, 2024
…ea#139)

* feat: Use enhanced-resolve for imports

* chore: Improve the metadata from "ImportTarget"

* chore: remove "enhanced-resolve" from "no-hide-core-modules"

* test: Add a test for mysticatea#66

* feat!: Allow ts paths aliases (mysticatea#84)

* feat: Allow for "allowImportingTsExtensions" (mysticatea#134)

* feat: Add test for import maps (mysticatea#147)

* Update lib/util/import-target.js

Co-authored-by: Sebastian Good <[email protected]>

* test: Add test for n/no-missing-require eslint/use-at-your-own-risk

* chore: Remove esbuild

* feat: Allow for settings.cwd to be used before process.cwd

* chore: replace reference to eslint/use-at-your-own-risk

* chore: Remove more unused packages

* chore: update rule test options to flat config

* fix: incorrect env in tests

---------

Co-authored-by: 唯然 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants