This commit is contained in:
Alex
2023-10-04 17:52:39 -04:00
parent 8a07010f29
commit 91bbcba2e8
11 changed files with 53 additions and 24 deletions

View File

@ -149,7 +149,11 @@ export const babelPlugin: Plugin = {
let source = readFileSync(path, 'utf-8')
.replaceAll("require('object.hasown/polyfill')()", 'Object.hasOwn')
.replaceAll("require('object.fromentries/polyfill')()", 'Object.fromEntries');
.replaceAll("require('object.fromentries/polyfill')()", 'Object.fromEntries')
.replaceAll(
"Object.keys(require('prop-types'))",
JSON.stringify(Object.keys(require('prop-types'))),
);
if (
path.includes('packages/eslint-plugin-import/src/rules/') ||