@@ -77,60 +77,6 @@ let defaultOptions: Required<Options[number]> = {
7777}
7878
7979export default createEslintRule < Options , MessageId > ( {
80- meta : {
81- schema : {
82- items : {
83- properties : {
84- ...buildCommonJsonSchemas ( ) ,
85- ...buildCommonGroupsJsonSchemas ( ) ,
86- sortOnParameters : {
87- description :
88- 'Controls whether sorting should be enabled for method parameter decorators.' ,
89- type : 'boolean' ,
90- } ,
91- sortOnProperties : {
92- description :
93- 'Controls whether sorting should be enabled for class property decorators.' ,
94- type : 'boolean' ,
95- } ,
96- sortOnAccessors : {
97- description :
98- 'Controls whether sorting should be enabled for class accessor decorators.' ,
99- type : 'boolean' ,
100- } ,
101- sortOnMethods : {
102- description :
103- 'Controls whether sorting should be enabled for class method decorators.' ,
104- type : 'boolean' ,
105- } ,
106- sortOnClasses : {
107- description :
108- 'Controls whether sorting should be enabled for class decorators.' ,
109- type : 'boolean' ,
110- } ,
111- partitionByComment : partitionByCommentJsonSchema ,
112- partitionByNewLine : partitionByNewLineJsonSchema ,
113- } ,
114- additionalProperties : false ,
115- type : 'object' ,
116- } ,
117- uniqueItems : true ,
118- type : 'array' ,
119- } ,
120- messages : {
121- [ MISSED_SPACING_ERROR_ID ] : MISSED_SPACING_ERROR ,
122- [ EXTRA_SPACING_ERROR_ID ] : EXTRA_SPACING_ERROR ,
123- [ GROUP_ORDER_ERROR_ID ] : GROUP_ORDER_ERROR ,
124- [ ORDER_ERROR_ID ] : ORDER_ERROR ,
125- } ,
126- docs : {
127- url : 'https://perfectionist.dev/rules/sort-decorators' ,
128- description : 'Enforce sorted decorators.' ,
129- recommended : true ,
130- } ,
131- type : 'suggestion' ,
132- fixable : 'code' ,
133- } ,
13480 create : context => {
13581 let settings = getSettings ( context . settings )
13682
@@ -208,6 +154,60 @@ export default createEslintRule<Options, MessageId>({
208154 } ,
209155 }
210156 } ,
157+ meta : {
158+ schema : {
159+ items : {
160+ properties : {
161+ ...buildCommonJsonSchemas ( ) ,
162+ ...buildCommonGroupsJsonSchemas ( ) ,
163+ sortOnParameters : {
164+ description :
165+ 'Controls whether sorting should be enabled for method parameter decorators.' ,
166+ type : 'boolean' ,
167+ } ,
168+ sortOnProperties : {
169+ description :
170+ 'Controls whether sorting should be enabled for class property decorators.' ,
171+ type : 'boolean' ,
172+ } ,
173+ sortOnAccessors : {
174+ description :
175+ 'Controls whether sorting should be enabled for class accessor decorators.' ,
176+ type : 'boolean' ,
177+ } ,
178+ sortOnMethods : {
179+ description :
180+ 'Controls whether sorting should be enabled for class method decorators.' ,
181+ type : 'boolean' ,
182+ } ,
183+ sortOnClasses : {
184+ description :
185+ 'Controls whether sorting should be enabled for class decorators.' ,
186+ type : 'boolean' ,
187+ } ,
188+ partitionByComment : partitionByCommentJsonSchema ,
189+ partitionByNewLine : partitionByNewLineJsonSchema ,
190+ } ,
191+ additionalProperties : false ,
192+ type : 'object' ,
193+ } ,
194+ uniqueItems : true ,
195+ type : 'array' ,
196+ } ,
197+ messages : {
198+ [ MISSED_SPACING_ERROR_ID ] : MISSED_SPACING_ERROR ,
199+ [ EXTRA_SPACING_ERROR_ID ] : EXTRA_SPACING_ERROR ,
200+ [ GROUP_ORDER_ERROR_ID ] : GROUP_ORDER_ERROR ,
201+ [ ORDER_ERROR_ID ] : ORDER_ERROR ,
202+ } ,
203+ docs : {
204+ url : 'https://perfectionist.dev/rules/sort-decorators' ,
205+ description : 'Enforce sorted decorators.' ,
206+ recommended : true ,
207+ } ,
208+ type : 'suggestion' ,
209+ fixable : 'code' ,
210+ } ,
211211 defaultOptions : [ defaultOptions ] ,
212212 name : 'sort-decorators' ,
213213} )
0 commit comments