Skip to content

Commit

Permalink
fix(vendor-dev): fix lint failures when theforeman/stories is not ins…
Browse files Browse the repository at this point in the history
…talled
  • Loading branch information
MariaAga authored and Ron-Lavi committed May 30, 2023
1 parent 22c99ad commit 9258698
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/vendor-dev/eslint.extends.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ const {
foremanLocation,
} = require('@theforeman/find-foreman');
const createVendorModulesAliases = require('./lib/createVendorModulesAliases');
const fs = require('fs');

const isPlugin = !isForemanLocation();
const foreman = foremanLocation(false);
Expand All @@ -28,9 +29,12 @@ const packageJsonDirectories = [
'./',
foremanVendorRelative,
foremanTestRelative,
foremanStoriesRelative,
];

if (fs.existsSync(foremanStoriesRelative)) {
packageJsonDirectories.push(foremanStoriesRelative);
}

if (isPlugin && foreman) {
packageJsonDirectories.push(foremanLocation());
}
Expand Down

0 comments on commit 9258698

Please sign in to comment.