Skip to content

Commit

Permalink
fix(Hot): Strapi dep check
Browse files Browse the repository at this point in the history
Signed-off-by: ScottAgirs <scott@ijs.to>
  • Loading branch information
ScottAgirs committed Nov 10, 2021
1 parent 8af44b4 commit 98e6719
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ const usesBabelConfig = findUp.sync([
]);
const usesNext = checkIfHasPackage('next');
const usesReact = checkIfHasPackage('react');
const usesStrapi = checkIfHasPackage('react');
const usesStrapiAboveV4 = checkIfHasPackage('@strapi/strapi');
const usesStrapi = checkIfHasPackage('strapi');
const reactVersion = usesReact ? semver.coerce(usesReact).version : undefined;

const config = {
Expand Down Expand Up @@ -126,7 +127,7 @@ if (usesNext) {
...next,
};
}
if (usesStrapi) {
if (usesStrapiAboveV4 || usesStrapi) {
config.rules = {
...config.rules,
...strapi,
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ijsto/eslint-config",
"version": "4.2.5",
"version": "4.2.6",
"description": "ESLint and Prettier setup",
"author": "Scott Agirs Neminskis <scott@ijs.to>",
"repository": "git@github.com:ijsto/eslint-config.git",
Expand Down

0 comments on commit 98e6719

Please sign in to comment.