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 8bf251f commit b1e8fb9Copy full SHA for b1e8fb9
src/config/index.ts
@@ -7,10 +7,17 @@ import { formattingRules } from "./formatting";
7
import { overrides } from "./overrides";
8
import { otherRules } from "./other";
9
10
-rulesDirPlugin.RULES_DIR = [
+// Merge, not overwrite.
11
+// Otherwise in some setups the order of file loading is wrong and
12
+// we overwrite RULES_DIR configured elsewhere.
13
+const previousRulesDir =
14
+ typeof rulesDirPlugin.RULES_DIR === "string"
15
+ ? [rulesDirPlugin.RULES_DIR]
16
+ : (rulesDirPlugin.RULES_DIR ?? []);
17
+rulesDirPlugin.RULES_DIR = previousRulesDir.concat([
18
// Relative to the individual project’s root
19
".eslint/custom-rules",
-];
20
+]);
21
22
export const main = {
23
env: {
0 commit comments