@@ -18,11 +18,9 @@ const report = require('../util/report');
18
18
// ------------------------------------------------------------------------------
19
19
20
20
const messages = {
21
- onOwnLine :
22
- 'Closing tag of a multiline JSX expression must be on its own line.' ,
21
+ onOwnLine : 'Closing tag of a multiline JSX expression must be on its own line.' ,
23
22
matchIndent : 'Expected closing tag to match indentation of opening.' ,
24
- alignWithOpening :
25
- 'Expected closing tag to be aligned with the line containing the opening tag' ,
23
+ alignWithOpening : 'Expected closing tag to be aligned with the line containing the opening tag' ,
26
24
} ;
27
25
28
26
const defaultOption = 'tag-aligned' ;
@@ -43,24 +41,22 @@ module.exports = {
43
41
} ,
44
42
fixable : 'whitespace' ,
45
43
messages,
46
- schema : [
47
- {
48
- anyOf : [
49
- {
50
- enum : [ 'tag-aligned' , 'line-aligned' ] ,
51
- } ,
52
- {
53
- type : 'object' ,
54
- properties : {
55
- location : {
56
- enum : [ 'tag-aligned' , 'line-aligned' ] ,
57
- } ,
44
+ schema : [ {
45
+ anyOf : [
46
+ {
47
+ enum : [ 'tag-aligned' , 'line-aligned' ] ,
48
+ } ,
49
+ {
50
+ type : 'object' ,
51
+ properties : {
52
+ location : {
53
+ enum : [ 'tag-aligned' , 'line-aligned' ] ,
58
54
} ,
59
- additionalProperties : false ,
60
55
} ,
61
- ] ,
62
- } ,
63
- ] ,
56
+ additionalProperties : false ,
57
+ } ,
58
+ ] ,
59
+ } ] ,
64
60
} ,
65
61
66
62
create ( context ) {
@@ -100,15 +96,15 @@ module.exports = {
100
96
}
101
97
102
98
if (
103
- opening . loc . start . column === node . loc . start . column &&
104
- option === 'tag-aligned'
99
+ opening . loc . start . column === node . loc . start . column
100
+ && option === 'tag-aligned'
105
101
) {
106
102
return ;
107
103
}
108
104
109
105
if (
110
- openingStartOfLine . column === node . loc . start . column &&
111
- option === 'line-aligned'
106
+ openingStartOfLine . column === node . loc . start . column
107
+ && option === 'line-aligned'
112
108
) {
113
109
return ;
114
110
}
0 commit comments