rename variable

This commit is contained in:
Yann Braga 2025-01-16 15:49:34 +01:00
parent cd3164acb9
commit c0679c4094

View File

@ -17,14 +17,14 @@ module.exports = {
ImportDeclaration: (node) => {
const fileName = context.getPhysicalFilename();
const isInCLI = !!fileName.includes(path.join('code', 'lib', 'cli') + path.sep);
const isInCodeod = !!fileName.includes(path.join('code', 'lib', 'codemod'));
const isInCodemod = !!fileName.includes(path.join('code', 'lib', 'codemod'));
const isInCore = !!fileName.includes(path.join('code', 'core'));
if (
node.source.value.startsWith('@storybook/core/') &&
!isInCLI &&
!isInCore &&
!isInCodeod
!isInCodemod
) {
const newPath = node.source.value
.replace('@storybook/core', 'storybook/internal')