Skip to content

Commit

Permalink
Merge pull request #30283 from storybookjs/yann/fix-eslint-plugin-loc…
Browse files Browse the repository at this point in the history
…al-checks

Build: Fix eslint plugin checks for storybook cli packages
  • Loading branch information
yannbf authored Jan 17, 2025
2 parents 3e64ed0 + c0679c4 commit 6c2a260
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ module.exports = {
return {
ImportDeclaration: (node) => {
const fileName = context.getPhysicalFilename();
const isInCLI = !!fileName.includes(path.join('code', 'lib', 'cli'));
const isInCodeod = !!fileName.includes(path.join('code', 'lib', 'codemod'));
const isInCLI = !!fileName.includes(path.join('code', 'lib', 'cli') + path.sep);
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')
Expand Down

0 comments on commit 6c2a260

Please sign in to comment.