@@ -57,7 +57,7 @@ module.exports = function(context) {
57
57
if ( typeof tokens . lastProp === 'undefined' ) {
58
58
location = 'after-tag' ;
59
59
// Is always after the last prop if this one is on the same line as the opening bracket
60
- } else if ( tokens . opening . line === tokens . lastProp . line ) {
60
+ } else if ( tokens . opening . line === tokens . lastProp . firstLine ) {
61
61
location = 'after-props' ;
62
62
// Else use configuration dependent on selfClosing property
63
63
} else {
@@ -97,7 +97,7 @@ module.exports = function(context) {
97
97
case 'after-tag' :
98
98
return tokens . tag . line === tokens . closing . line ;
99
99
case 'after-props' :
100
- return tokens . lastProp . line === tokens . closing . line ;
100
+ return tokens . lastProp . lastLine === tokens . closing . line ;
101
101
case 'props-aligned' :
102
102
case 'tag-aligned' :
103
103
case 'line-aligned' :
@@ -124,7 +124,8 @@ module.exports = function(context) {
124
124
lastProp = node . attributes [ node . attributes . length - 1 ] ;
125
125
lastProp = {
126
126
column : sourceCode . getFirstToken ( lastProp ) . loc . start . column ,
127
- line : sourceCode . getLastToken ( lastProp ) . loc . end . line
127
+ firstLine : sourceCode . getFirstToken ( lastProp ) . loc . start . line ,
128
+ lastLine : sourceCode . getLastToken ( lastProp ) . loc . end . line
128
129
} ;
129
130
}
130
131
var openingLine = sourceCode . lines [ opening . line - 1 ] ;
@@ -170,7 +171,7 @@ module.exports = function(context) {
170
171
171
172
if ( correctColumn !== null ) {
172
173
expectedNextLine = tokens . lastProp &&
173
- ( tokens . lastProp . line === tokens . closing . line ) ;
174
+ ( tokens . lastProp . lastLine === tokens . closing . line ) ;
174
175
data . details = ' (expected column ' + ( correctColumn + 1 ) +
175
176
( expectedNextLine ? ' on the next line)' : ')' ) ;
176
177
}
0 commit comments