Skip to content

Commit

Permalink
fix: allow custom linters to use default exports
Browse files Browse the repository at this point in the history
  • Loading branch information
timfishercs committed Aug 22, 2022
1 parent 13d5f18 commit 3e36b55
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/valid-json.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const validJSON = ([{ linter } = {}], source) => {

if (linter) {
// use custom linter
parsed = requireNoCache(linter)(source);
parsed = requireNoCache(linter).default ? requireNoCache(linter).default(source) : requireNoCache(linter)(source);
} else {
parsed = parseJson(source);
}
Expand Down

0 comments on commit 3e36b55

Please sign in to comment.