Skip to content

Commit 1ceebe6

Browse files
authored
refactor(plugins/x): enhance no-nested-component-definitions error messages (#1014)
1 parent ed5c271 commit 1ceebe6

File tree

5 files changed

+304
-54
lines changed

5 files changed

+304
-54
lines changed

.pkgs/configs/eslint.js

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,11 +112,20 @@ export const typescript = tseslint.config({
112112
type: "natural",
113113
groups: [
114114
"type",
115-
["parent-type", "sibling-type", "index-type", "internal-type"],
115+
[
116+
"parent-type",
117+
"sibling-type",
118+
"index-type",
119+
"internal-type",
120+
],
116121
"builtin",
117122
"external",
118123
"internal",
119-
["parent", "sibling", "index"],
124+
[
125+
"parent",
126+
"sibling",
127+
"index",
128+
],
120129
"side-effect",
121130
"object",
122131
"unknown",

.pkgs/configs/eslint.ts

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,11 +125,20 @@ export const typescript: ConfigArray = tseslint.config(
125125
type: "natural",
126126
groups: [
127127
"type",
128-
["parent-type", "sibling-type", "index-type", "internal-type"],
128+
[
129+
"parent-type",
130+
"sibling-type",
131+
"index-type",
132+
"internal-type",
133+
],
129134
"builtin",
130135
"external",
131136
"internal",
132-
["parent", "sibling", "index"],
137+
[
138+
"parent",
139+
"sibling",
140+
"index",
141+
],
133142
"side-effect",
134143
"object",
135144
"unknown",

packages/core/src/component/component-collector.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ import type { ERFunctionComponent } from "./component-semantic-node";
77
import * as AST from "@eslint-react/ast";
88
import { _ } from "@eslint-react/eff";
99
import * as JSX from "@eslint-react/jsx";
10-
1110
import { getId } from "@eslint-react/shared";
1211
import { AST_NODE_TYPES as T } from "@typescript-eslint/types";
12+
1313
import { DISPLAY_NAME_ASSIGNMENT_SELECTOR } from "../constants";
1414
import { isReactHookCall } from "../hook";
1515
import { DEFAULT_COMPONENT_HINT } from "./component-collector-hint";

0 commit comments

Comments
 (0)