diff --git a/.changeset/tough-clouds-listen.md b/.changeset/tough-clouds-listen.md new file mode 100644 index 0000000000..2bae8d5805 --- /dev/null +++ b/.changeset/tough-clouds-listen.md @@ -0,0 +1,5 @@ +--- +'@sumup/eslint-plugin-circuit-ui': patch +--- + +Made the reported node more specific. diff --git a/packages/eslint-plugin-circuit-ui/no-deprecated-components/index.ts b/packages/eslint-plugin-circuit-ui/no-deprecated-components/index.ts index 692b7674fc..103c68491a 100644 --- a/packages/eslint-plugin-circuit-ui/no-deprecated-components/index.ts +++ b/packages/eslint-plugin-circuit-ui/no-deprecated-components/index.ts @@ -64,7 +64,7 @@ export const noDeprecatedComponents = createRule({ } context.report({ - node, + node: specifier, messageId: 'deprecated', data: component, }); diff --git a/packages/eslint-plugin-circuit-ui/no-deprecated-props/index.ts b/packages/eslint-plugin-circuit-ui/no-deprecated-props/index.ts index aab27fad21..7391888165 100644 --- a/packages/eslint-plugin-circuit-ui/no-deprecated-props/index.ts +++ b/packages/eslint-plugin-circuit-ui/no-deprecated-props/index.ts @@ -95,7 +95,7 @@ export const noDeprecatedProps = createRule({ } context.report({ - node, + node: attribute, messageId: 'deprecated', data: { component, prop, alternative }, }); diff --git a/packages/eslint-plugin-circuit-ui/no-renamed-props/index.ts b/packages/eslint-plugin-circuit-ui/no-renamed-props/index.ts index 4d79794cc3..0d3a47aefd 100644 --- a/packages/eslint-plugin-circuit-ui/no-renamed-props/index.ts +++ b/packages/eslint-plugin-circuit-ui/no-renamed-props/index.ts @@ -114,7 +114,7 @@ export const noRenamedProps = createRule({ } context.report({ - node, + node: attribute, messageId: 'propName', data: { component, current, replacement }, fix(fixer) { @@ -151,7 +151,7 @@ export const noRenamedProps = createRule({ } context.report({ - node, + node: attribute, messageId: 'propValue', data: { component, prop, current, replacement }, fix(fixer) {