@@ -12,6 +12,7 @@ import {
1212 groupsJsonSchema ,
1313} from '../utils/common-json-schemas'
1414import {
15+ MISSED_COMMENT_ABOVE_ERROR ,
1516 MISSED_SPACING_ERROR ,
1617 EXTRA_SPACING_ERROR ,
1718 GROUP_ORDER_ERROR ,
@@ -41,19 +42,20 @@ import { complete } from '../utils/complete'
4142 */
4243let cachedGroupsByModifiersAndSelectors = new Map < string , string [ ] > ( )
4344
45+ type MESSAGE_ID =
46+ | 'unexpectedExportsGroupOrder'
47+ | 'missedSpacingBetweenExports'
48+ | 'extraSpacingBetweenExports'
49+ | 'missedCommentAboveExport'
50+ | 'unexpectedExportsOrder'
51+
4452interface SortExportsSortingNode
4553 extends SortingNode <
4654 TSESTree . ExportNamedDeclarationWithSource | TSESTree . ExportAllDeclaration
4755 > {
4856 groupKind : 'value' | 'type'
4957}
5058
51- type MESSAGE_ID =
52- | 'unexpectedExportsGroupOrder'
53- | 'missedSpacingBetweenExports'
54- | 'extraSpacingBetweenExports'
55- | 'unexpectedExportsOrder'
56-
5759let defaultOptions : Required < Options [ 0 ] > = {
5860 fallbackSort : { type : 'unsorted' } ,
5961 specialCharacters : 'keep' ,
@@ -184,6 +186,7 @@ export default createEslintRule<Options, MESSAGE_ID>({
184186 missedSpacingBetweenMembers : 'missedSpacingBetweenExports' ,
185187 extraSpacingBetweenMembers : 'extraSpacingBetweenExports' ,
186188 unexpectedGroupOrder : 'unexpectedExportsGroupOrder' ,
189+ missedCommentAbove : 'missedCommentAboveExport' ,
187190 unexpectedOrder : 'unexpectedExportsOrder' ,
188191 } ,
189192 sortNodesExcludingEslintDisabled,
@@ -227,6 +230,7 @@ export default createEslintRule<Options, MESSAGE_ID>({
227230 type : 'array' ,
228231 } ,
229232 messages : {
233+ missedCommentAboveExport : MISSED_COMMENT_ABOVE_ERROR ,
230234 missedSpacingBetweenExports : MISSED_SPACING_ERROR ,
231235 extraSpacingBetweenExports : EXTRA_SPACING_ERROR ,
232236 unexpectedExportsGroupOrder : GROUP_ORDER_ERROR ,
0 commit comments