-
Notifications
You must be signed in to change notification settings - Fork 10.3k
Enable the unicorn/prefer-import-meta-properties
ESLint plugin rule
#19916
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
Enable the unicorn/prefer-import-meta-properties
ESLint plugin rule
#19916
Conversation
75e1d08
to
0be752f
Compare
Given that we require Node.js versions `>=20.16.0 || >=22.3.0` using this should be fine, based on the "History" data in https://nodejs.org/api/esm.html#importmetadirname respectively https://nodejs.org/api/esm.html#importmetafilename. Please also see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-import-meta-properties.md
0be752f
to
13c9995
Compare
/botio integrationtest |
From: Bot.io (Windows)ReceivedCommand cmd_integrationtest from @Snuffleupagus received. Current queue size: 0 Live output at: http://54.193.163.58:8877/b61fe0895150524/output.txt |
From: Bot.io (Linux m4)ReceivedCommand cmd_integrationtest from @Snuffleupagus received. Current queue size: 0 Live output at: http://54.241.84.105:8877/60d4e2abd87fe17/output.txt |
From: Bot.io (Linux m4)FailedFull output at http://54.241.84.105:8877/60d4e2abd87fe17/output.txt Total script time: 13.77 mins
|
From: Bot.io (Windows)FailedFull output at http://54.193.163.58:8877/b61fe0895150524/output.txt Total script time: 32.39 mins
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes look correct, but maybe it would be great in the future to use file URLs rather than paths when possible (since new URL
/import.meta.url
is a standard that works everywhere, unlike the Node.js-specific import.meta.dirname
).
Thanks for the improvement! |
Given that we require Node.js versions
>=20.16.0 || >=22.3.0
using this should be fine, based on the "History" data in https://nodejs.org/api/esm.html#importmetadirname respectively https://nodejs.org/api/esm.html#importmetafilename.Please also see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-import-meta-properties.md