Skip to content

Commit d3e9e95

Browse files
committed
report only attr loc
1 parent e7ff982 commit d3e9e95

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/rules/require-shorthand-boolean-prop.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ module.exports = {
3737
if (!isAlways) {
3838
context.report({
3939
node,
40-
loc: node.loc,
40+
loc: attr.loc,
4141
message: 'Unexpected shorthand prop.',
4242
fix (fixer) {
4343
const { rawName } = attr.key || {}
@@ -54,7 +54,7 @@ module.exports = {
5454
if (isAlways) {
5555
context.report({
5656
node,
57-
loc: node.loc,
57+
loc: attr.loc,
5858
message: "Unexpected 'true' value.",
5959
fix (fixer) {
6060
const { rawName } = (attr.key || {}).argument || {}

0 commit comments

Comments
 (0)