@@ -18,11 +18,9 @@ const report = require('../util/report');
1818// ------------------------------------------------------------------------------
1919
2020const 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.' ,
2322 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' ,
2624} ;
2725
2826const defaultOption = 'tag-aligned' ;
@@ -43,24 +41,22 @@ module.exports = {
4341 } ,
4442 fixable : 'whitespace' ,
4543 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' ] ,
5854 } ,
59- additionalProperties : false ,
6055 } ,
61- ] ,
62- } ,
63- ] ,
56+ additionalProperties : false ,
57+ } ,
58+ ] ,
59+ } ] ,
6460 } ,
6561
6662 create ( context ) {
@@ -100,15 +96,15 @@ module.exports = {
10096 }
10197
10298 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'
105101 ) {
106102 return ;
107103 }
108104
109105 if (
110- openingStartOfLine . column === node . loc . start . column &&
111- option === 'line-aligned'
106+ openingStartOfLine . column === node . loc . start . column
107+ && option === 'line-aligned'
112108 ) {
113109 return ;
114110 }
0 commit comments