We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7642c58 commit 0d0b1acCopy full SHA for 0d0b1ac
bin/cli.js
@@ -4,9 +4,14 @@
4
5
const fs = require("fs");
6
const path = require("path");
7
-const { ESLint } = require("eslint");
8
const validators = require("./validators");
9
+// Require locally installed eslint, for `npx eslint-config-prettier` support
10
+// with no local eslint-config-prettier installation.
11
+const { ESLint } = require(require.resolve("eslint", {
12
+ paths: [process.cwd(), ...require.resolve.paths("eslint")],
13
+}));
14
+
15
const SPECIAL_RULES_URL =
16
"https://github.com/prettier/eslint-config-prettier#special-rules";
17
0 commit comments