Skip to content

Commit

Permalink
Fix local eslint require
Browse files Browse the repository at this point in the history
  • Loading branch information
lydell committed Nov 30, 2020
1 parent 7642c58 commit 0d0b1ac
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion bin/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,14 @@

const fs = require("fs");
const path = require("path");
const { ESLint } = require("eslint");
const validators = require("./validators");

// Require locally installed eslint, for `npx eslint-config-prettier` support
// with no local eslint-config-prettier installation.
const { ESLint } = require(require.resolve("eslint", {
paths: [process.cwd(), ...require.resolve.paths("eslint")],
}));

const SPECIAL_RULES_URL =
"https://github.com/prettier/eslint-config-prettier#special-rules";

Expand Down

0 comments on commit 0d0b1ac

Please sign in to comment.