Skip to content

Commit

Permalink
Be more specific about the invalid code (#2173)
Browse files Browse the repository at this point in the history
  • Loading branch information
connor-baer committed Jul 4, 2023
1 parent ed49e6f commit df2921a
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
5 changes: 5 additions & 0 deletions .changeset/tough-clouds-listen.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@sumup/eslint-plugin-circuit-ui': patch
---

Made the reported node more specific.
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export const noDeprecatedComponents = createRule({
}

context.report({
node,
node: specifier,
messageId: 'deprecated',
data: component,
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ export const noDeprecatedProps = createRule({
}

context.report({
node,
node: attribute,
messageId: 'deprecated',
data: { component, prop, alternative },
});
Expand Down
4 changes: 2 additions & 2 deletions packages/eslint-plugin-circuit-ui/no-renamed-props/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ export const noRenamedProps = createRule({
}

context.report({
node,
node: attribute,
messageId: 'propName',
data: { component, current, replacement },
fix(fixer) {
Expand Down Expand Up @@ -151,7 +151,7 @@ export const noRenamedProps = createRule({
}

context.report({
node,
node: attribute,
messageId: 'propValue',
data: { component, prop, current, replacement },
fix(fixer) {
Expand Down

1 comment on commit df2921a

@vercel
Copy link

@vercel vercel bot commented on df2921a Jul 4, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.