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
Avoid using CJS globals in internal source files #12963
Changes from 11 commits
58723a8
1a3f51b
fa92cbb
7f6997b
a4fc5f2
04552fb
0105a7f
3d2a56b
ba8d8e0
5c05e6d
e662b74
44bd672
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
import runner from "@babel/helper-plugin-test-runner"; | ||
|
||
runner(__dirname); | ||
runner(import.meta.url); |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
import runner from "@babel/helper-plugin-test-runner"; | ||
|
||
runner(__dirname); | ||
runner(import.meta.url); |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
import dryErrorMessages from "./rules/dry-error-messages"; | ||
|
||
module.exports = { | ||
rules: { | ||
"dry-error-messages": dryErrorMessages, | ||
}, | ||
export const rules = { | ||
"dry-error-messages": dryErrorMessages, | ||
}; | ||
|
||
export default { rules }; |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,6 +24,7 @@ | |
"@babel/eslint-parser": "workspace:*", | ||
"@babel/eslint-plugin-development": "workspace:*", | ||
"@babel/eslint-plugin-development-internal": "workspace:*", | ||
"@babel/plugin-proposal-dynamic-import": "workspace:packages/babel-plugin-proposal-dynamic-import", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Does that mean There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No, it means I should have added the dependency from npm 😅 |
||
"@babel/plugin-proposal-export-namespace-from": "^7.12.13", | ||
"@babel/plugin-proposal-object-rest-spread": "^7.13.0", | ||
"@babel/plugin-transform-modules-commonjs": "^7.13.0", | ||
|
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.
In many places we could use URLs directly rather than
path.*
, but only after dropping Node.js <= 10 (because we need nativefileURLToPath
):