claude-flow-novice 2.2.0 → 2.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (599) hide show
  1. package/package.json +2 -1
  2. package/dist/src/web/frontend/node_modules/.cross-env-RSYxJplp/src/index.js +0 -95
  3. package/dist/src/web/frontend/node_modules/.cross-env-RSYxJplp/src/is-windows.js +0 -2
  4. package/dist/src/web/frontend/node_modules/.cross-env-RSYxJplp/src/variable.js +0 -69
  5. package/dist/src/web/frontend/node_modules/.css-blank-pseudo-8k2G2dsc/browser.js +0 -2
  6. package/dist/src/web/frontend/node_modules/.css-blank-pseudo-8k2G2dsc/dist/browser-global.js +0 -2
  7. package/dist/src/web/frontend/node_modules/.css-has-pseudo-6pj9tKmr/browser.js +0 -2
  8. package/dist/src/web/frontend/node_modules/.css-has-pseudo-6pj9tKmr/dist/browser-global.js +0 -2
  9. package/dist/src/web/frontend/node_modules/.css-prefers-color-scheme-5O8P6fXl/browser.js +0 -2
  10. package/dist/src/web/frontend/node_modules/.css-prefers-color-scheme-5O8P6fXl/browser.min.js +0 -2
  11. package/dist/src/web/frontend/node_modules/.css-prefers-color-scheme-5O8P6fXl/dist/browser-global.js +0 -2
  12. package/dist/src/web/frontend/node_modules/.cssesc-iMHKNzC2/cssesc.js +0 -110
  13. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/_lib/addLeadingZeros/index.js +0 -15
  14. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/_lib/assign/index.js +0 -19
  15. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/_lib/cloneObject/index.js +0 -12
  16. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/_lib/defaultLocale/index.js +0 -11
  17. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/_lib/defaultOptions/index.js +0 -14
  18. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/_lib/format/formatters/index.js +0 -781
  19. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/_lib/format/lightFormatters/index.js +0 -90
  20. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/_lib/format/longFormatters/index.js +0 -88
  21. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/_lib/getTimezoneOffsetInMilliseconds/index.js +0 -23
  22. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/_lib/getUTCDayOfYear/index.js +0 -21
  23. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/_lib/getUTCISOWeek/index.js +0 -23
  24. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/_lib/getUTCISOWeekYear/index.js +0 -31
  25. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/_lib/getUTCWeek/index.js +0 -23
  26. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/_lib/getUTCWeekYear/index.js +0 -41
  27. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/_lib/isSameUTCWeek/index.js +0 -16
  28. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/_lib/protectedTokens/index.js +0 -27
  29. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/_lib/requiredArgs/index.js +0 -12
  30. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/_lib/roundingMethods/index.js +0 -19
  31. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/_lib/setUTCDay/index.js +0 -31
  32. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/_lib/setUTCISODay/index.js +0 -26
  33. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/_lib/setUTCISOWeek/index.js +0 -20
  34. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/_lib/setUTCWeek/index.js +0 -20
  35. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/_lib/startOfUTCISOWeek/index.js +0 -20
  36. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/_lib/startOfUTCISOWeekYear/index.js +0 -20
  37. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/_lib/startOfUTCWeek/index.js +0 -29
  38. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/_lib/startOfUTCWeekYear/index.js +0 -25
  39. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/_lib/test/index.js +0 -33
  40. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/_lib/toInteger/index.js +0 -17
  41. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/add/index.js +0 -78
  42. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/addBusinessDays/index.js +0 -66
  43. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/addDays/index.js +0 -43
  44. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/addHours/index.js +0 -36
  45. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/addISOWeekYears/index.js +0 -37
  46. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/addMilliseconds/index.js +0 -35
  47. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/addMinutes/index.js +0 -36
  48. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/addMonths/index.js +0 -69
  49. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/addQuarters/index.js +0 -35
  50. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/addSeconds/index.js +0 -34
  51. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/addWeeks/index.js +0 -35
  52. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/addYears/index.js +0 -34
  53. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/areIntervalsOverlapping/index.js +0 -81
  54. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/clamp/index.js +0 -43
  55. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/closestIndexTo/index.js +0 -69
  56. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/closestTo/index.js +0 -67
  57. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/compareAsc/index.js +0 -56
  58. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/compareDesc/index.js +0 -56
  59. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/constants/index.js +0 -207
  60. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/daysToWeeks/index.js +0 -38
  61. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/differenceInBusinessDays/index.js +0 -84
  62. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/differenceInCalendarDays/index.js +0 -55
  63. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/differenceInCalendarISOWeekYears/index.js +0 -37
  64. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/differenceInCalendarISOWeeks/index.js +0 -48
  65. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/differenceInCalendarMonths/index.js +0 -39
  66. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/differenceInCalendarQuarters/index.js +0 -40
  67. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/differenceInCalendarWeeks/index.js +0 -60
  68. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/differenceInCalendarYears/index.js +0 -37
  69. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/differenceInDays/index.js +0 -91
  70. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/differenceInHours/index.js +0 -40
  71. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/differenceInISOWeekYears/index.js +0 -52
  72. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/differenceInMilliseconds/index.js +0 -36
  73. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/differenceInMinutes/index.js +0 -48
  74. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/differenceInMonths/index.js +0 -64
  75. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/differenceInQuarters/index.js +0 -36
  76. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/differenceInSeconds/index.js +0 -40
  77. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/differenceInWeeks/index.js +0 -57
  78. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/differenceInYears/index.js +0 -49
  79. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/docs/.eslintrc.js +0 -5
  80. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/docs/Day.js +0 -15
  81. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/docs/Duration.js +0 -19
  82. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/docs/index.js +0 -147
  83. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/eachDayOfInterval/index.js +0 -65
  84. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/eachHourOfInterval/index.js +0 -65
  85. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/eachMinuteOfInterval/index.js +0 -62
  86. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/eachMonthOfInterval/index.js +0 -61
  87. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/eachQuarterOfInterval/index.js +0 -60
  88. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/eachWeekOfInterval/index.js +0 -75
  89. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/eachWeekendOfInterval/index.js +0 -53
  90. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/eachWeekendOfMonth/index.js +0 -49
  91. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/eachWeekendOfYear/index.js +0 -45
  92. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/eachYearOfInterval/index.js +0 -58
  93. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/endOfDay/index.js +0 -34
  94. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/endOfDecade/index.js +0 -39
  95. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/endOfHour/index.js +0 -34
  96. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/endOfISOWeek/index.js +0 -36
  97. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/endOfISOWeekYear/index.js +0 -42
  98. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/endOfMinute/index.js +0 -34
  99. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/endOfMonth/index.js +0 -36
  100. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/endOfQuarter/index.js +0 -37
  101. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/endOfSecond/index.js +0 -34
  102. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/endOfToday/index.js +0 -31
  103. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/endOfTomorrow/index.js +0 -36
  104. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/endOfWeek/index.js +0 -56
  105. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/endOfYear/index.js +0 -36
  106. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/endOfYesterday/index.js +0 -36
  107. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/_lib/addLeadingZeros/index.js +0 -8
  108. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/_lib/assign/index.js +0 -12
  109. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/_lib/cloneObject/index.js +0 -4
  110. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/_lib/defaultLocale/index.js +0 -2
  111. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/_lib/defaultOptions/index.js +0 -7
  112. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/_lib/format/formatters/index.js +0 -772
  113. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/_lib/format/lightFormatters/index.js +0 -80
  114. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/_lib/format/longFormatters/index.js +0 -80
  115. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/_lib/getTimezoneOffsetInMilliseconds/index.js +0 -16
  116. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/_lib/getUTCDayOfYear/index.js +0 -13
  117. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/_lib/getUTCISOWeek/index.js +0 -15
  118. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/_lib/getUTCISOWeekYear/index.js +0 -23
  119. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/_lib/getUTCWeek/index.js +0 -15
  120. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/_lib/getUTCWeekYear/index.js +0 -33
  121. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/_lib/isSameUTCWeek/index.js +0 -8
  122. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/_lib/protectedTokens/index.js +0 -19
  123. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/_lib/requiredArgs/index.js +0 -5
  124. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/_lib/roundingMethods/index.js +0 -13
  125. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/_lib/setUTCDay/index.js +0 -23
  126. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/_lib/setUTCISODay/index.js +0 -18
  127. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/_lib/setUTCISOWeek/index.js +0 -12
  128. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/_lib/setUTCWeek/index.js +0 -12
  129. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/_lib/startOfUTCISOWeek/index.js +0 -12
  130. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/_lib/startOfUTCISOWeekYear/index.js +0 -12
  131. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/_lib/startOfUTCWeek/index.js +0 -21
  132. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/_lib/startOfUTCWeekYear/index.js +0 -17
  133. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/_lib/test/index.js +0 -24
  134. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/_lib/toInteger/index.js +0 -10
  135. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/add/index.js +0 -70
  136. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/addBusinessDays/index.js +0 -58
  137. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/addDays/index.js +0 -35
  138. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/addHours/index.js +0 -28
  139. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/addISOWeekYears/index.js +0 -29
  140. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/addMilliseconds/index.js +0 -27
  141. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/addMinutes/index.js +0 -28
  142. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/addMonths/index.js +0 -61
  143. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/addQuarters/index.js +0 -27
  144. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/addSeconds/index.js +0 -26
  145. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/addWeeks/index.js +0 -27
  146. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/addYears/index.js +0 -26
  147. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/areIntervalsOverlapping/index.js +0 -73
  148. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/clamp/index.js +0 -35
  149. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/closestIndexTo/index.js +0 -61
  150. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/closestTo/index.js +0 -59
  151. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/compareAsc/index.js +0 -48
  152. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/compareDesc/index.js +0 -48
  153. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/constants/index.js +0 -183
  154. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/daysToWeeks/index.js +0 -30
  155. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/differenceInBusinessDays/index.js +0 -76
  156. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/differenceInCalendarDays/index.js +0 -47
  157. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/differenceInCalendarISOWeekYears/index.js +0 -29
  158. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/differenceInCalendarISOWeeks/index.js +0 -40
  159. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/differenceInCalendarMonths/index.js +0 -31
  160. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/differenceInCalendarQuarters/index.js +0 -32
  161. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/differenceInCalendarWeeks/index.js +0 -52
  162. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/differenceInCalendarYears/index.js +0 -29
  163. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/differenceInDays/index.js +0 -82
  164. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/differenceInHours/index.js +0 -32
  165. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/differenceInISOWeekYears/index.js +0 -44
  166. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/differenceInMilliseconds/index.js +0 -28
  167. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/differenceInMinutes/index.js +0 -40
  168. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/differenceInMonths/index.js +0 -56
  169. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/differenceInQuarters/index.js +0 -28
  170. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/differenceInSeconds/index.js +0 -32
  171. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/differenceInWeeks/index.js +0 -49
  172. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/differenceInYears/index.js +0 -41
  173. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/eachDayOfInterval/index.js +0 -57
  174. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/eachHourOfInterval/index.js +0 -57
  175. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/eachMinuteOfInterval/index.js +0 -54
  176. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/eachMonthOfInterval/index.js +0 -53
  177. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/eachQuarterOfInterval/index.js +0 -52
  178. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/eachWeekOfInterval/index.js +0 -67
  179. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/eachWeekendOfInterval/index.js +0 -45
  180. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/eachWeekendOfMonth/index.js +0 -41
  181. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/eachWeekendOfYear/index.js +0 -37
  182. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/eachYearOfInterval/index.js +0 -50
  183. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/endOfDay/index.js +0 -26
  184. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/endOfDecade/index.js +0 -31
  185. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/endOfHour/index.js +0 -26
  186. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/endOfISOWeek/index.js +0 -28
  187. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/endOfISOWeekYear/index.js +0 -34
  188. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/endOfMinute/index.js +0 -26
  189. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/endOfMonth/index.js +0 -28
  190. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/endOfQuarter/index.js +0 -29
  191. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/endOfSecond/index.js +0 -26
  192. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/endOfToday/index.js +0 -23
  193. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/endOfTomorrow/index.js +0 -29
  194. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/endOfWeek/index.js +0 -48
  195. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/endOfYear/index.js +0 -28
  196. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/endOfYesterday/index.js +0 -29
  197. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/format/index.js +0 -402
  198. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/formatDistance/index.js +0 -203
  199. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/formatDistanceStrict/index.js +0 -190
  200. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/formatDistanceToNow/index.js +0 -92
  201. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/formatDistanceToNowStrict/index.js +0 -80
  202. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/formatDuration/index.js +0 -91
  203. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/formatISO/index.js +0 -100
  204. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/formatISO9075/index.js +0 -86
  205. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/formatISODuration/index.js +0 -45
  206. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/formatRFC3339/index.js +0 -76
  207. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/formatRFC7231/index.js +0 -44
  208. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/formatRelative/index.js +0 -93
  209. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/fp/_lib/convertToFP/index.js +0 -12
  210. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/fp/add/index.js +0 -4
  211. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/fp/addBusinessDays/index.js +0 -4
  212. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/fp/addDays/index.js +0 -4
  213. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/fp/addHours/index.js +0 -4
  214. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/fp/addISOWeekYears/index.js +0 -4
  215. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/fp/addMilliseconds/index.js +0 -4
  216. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/fp/addMinutes/index.js +0 -4
  217. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/fp/addMonths/index.js +0 -4
  218. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/fp/addQuarters/index.js +0 -4
  219. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/fp/addSeconds/index.js +0 -4
  220. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/fp/addWeeks/index.js +0 -4
  221. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/fp/addYears/index.js +0 -4
  222. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/fp/areIntervalsOverlapping/index.js +0 -4
  223. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/fp/areIntervalsOverlappingWithOptions/index.js +0 -4
  224. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/fp/clamp/index.js +0 -4
  225. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/fp/closestIndexTo/index.js +0 -4
  226. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/fp/closestTo/index.js +0 -4
  227. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/fp/compareAsc/index.js +0 -4
  228. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/fp/compareDesc/index.js +0 -4
  229. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/fp/daysToWeeks/index.js +0 -4
  230. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/fp/differenceInBusinessDays/index.js +0 -4
  231. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/fp/differenceInCalendarDays/index.js +0 -4
  232. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/fp/differenceInCalendarISOWeekYears/index.js +0 -4
  233. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/fp/differenceInCalendarISOWeeks/index.js +0 -4
  234. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/fp/differenceInCalendarMonths/index.js +0 -4
  235. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/fp/differenceInCalendarQuarters/index.js +0 -4
  236. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/fp/differenceInCalendarWeeks/index.js +0 -4
  237. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/fp/differenceInCalendarWeeksWithOptions/index.js +0 -4
  238. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/fp/differenceInCalendarYears/index.js +0 -4
  239. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/fp/differenceInDays/index.js +0 -4
  240. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/fp/differenceInHours/index.js +0 -4
  241. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/fp/differenceInHoursWithOptions/index.js +0 -4
  242. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/fp/differenceInISOWeekYears/index.js +0 -4
  243. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/fp/differenceInMilliseconds/index.js +0 -4
  244. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/fp/differenceInMinutes/index.js +0 -4
  245. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/fp/differenceInMinutesWithOptions/index.js +0 -4
  246. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/fp/differenceInMonths/index.js +0 -4
  247. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/fp/differenceInQuarters/index.js +0 -4
  248. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/fp/differenceInQuartersWithOptions/index.js +0 -4
  249. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/fp/differenceInSeconds/index.js +0 -4
  250. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/fp/differenceInSecondsWithOptions/index.js +0 -4
  251. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/fp/differenceInWeeks/index.js +0 -4
  252. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/fp/differenceInWeeksWithOptions/index.js +0 -4
  253. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/fp/differenceInYears/index.js +0 -4
  254. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/fp/eachDayOfInterval/index.js +0 -4
  255. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/fp/eachDayOfIntervalWithOptions/index.js +0 -4
  256. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/fp/eachHourOfInterval/index.js +0 -4
  257. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/fp/eachHourOfIntervalWithOptions/index.js +0 -4
  258. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/fp/eachMinuteOfInterval/index.js +0 -4
  259. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/fp/eachMinuteOfIntervalWithOptions/index.js +0 -4
  260. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/parse/_lib/constants.js +0 -48
  261. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/parse/_lib/parsers/AMPMMidnightParser.js +0 -64
  262. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/parse/_lib/parsers/AMPMParser.js +0 -64
  263. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/parse/_lib/parsers/DateParser.js +0 -64
  264. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/parse/_lib/parsers/DayOfYearParser.js +0 -60
  265. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/parse/_lib/parsers/DayParser.js +0 -88
  266. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/parse/_lib/parsers/DayPeriodParser.js +0 -64
  267. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/parse/_lib/parsers/EraParser.js +0 -62
  268. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/parse/_lib/parsers/ExtendedYearParser.js +0 -40
  269. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/parse/_lib/parsers/FractionOfSecondParser.js +0 -39
  270. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/parse/_lib/parsers/Hour0To11Parser.js +0 -56
  271. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/parse/_lib/parsers/Hour0to23Parser.js +0 -51
  272. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/parse/_lib/parsers/Hour1To24Parser.js +0 -52
  273. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/esm/parse/_lib/parsers/Hour1to12Parser.js +0 -58
  274. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/parse/_lib/constants.js +0 -55
  275. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/parse/_lib/parsers/AMPMMidnightParser.js +0 -72
  276. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/parse/_lib/parsers/AMPMParser.js +0 -72
  277. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/parse/_lib/parsers/DateParser.js +0 -72
  278. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/parse/_lib/parsers/DayOfYearParser.js +0 -68
  279. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/parse/_lib/parsers/DayParser.js +0 -97
  280. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/parse/_lib/parsers/DayPeriodParser.js +0 -73
  281. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/parse/_lib/parsers/EraParser.js +0 -70
  282. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/parse/_lib/parsers/ExtendedYearParser.js +0 -48
  283. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/parse/_lib/parsers/FractionOfSecondParser.js +0 -47
  284. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/parse/_lib/parsers/Hour0To11Parser.js +0 -64
  285. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/parse/_lib/parsers/Hour0to23Parser.js +0 -59
  286. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/parse/_lib/parsers/Hour1To24Parser.js +0 -60
  287. package/dist/src/web/frontend/node_modules/.date-fns-XMls0sMk/parse/_lib/parsers/Hour1to12Parser.js +0 -66
  288. package/dist/src/web/frontend/node_modules/.detect-port-alt-Qap6bfIk/index.js +0 -3
  289. package/dist/src/web/frontend/node_modules/.detect-port-alt-Qap6bfIk/lib/detect-port.js +0 -114
  290. package/dist/src/web/frontend/node_modules/.detect-port-alt-Qap6bfIk/node_modules/debug/karma.conf.js +0 -70
  291. package/dist/src/web/frontend/node_modules/.detect-port-alt-Qap6bfIk/node_modules/debug/node.js +0 -1
  292. package/dist/src/web/frontend/node_modules/.detect-port-alt-Qap6bfIk/node_modules/debug/src/browser.js +0 -185
  293. package/dist/src/web/frontend/node_modules/.detect-port-alt-Qap6bfIk/node_modules/debug/src/debug.js +0 -202
  294. package/dist/src/web/frontend/node_modules/.detect-port-alt-Qap6bfIk/node_modules/debug/src/index.js +0 -10
  295. package/dist/src/web/frontend/node_modules/.detect-port-alt-Qap6bfIk/node_modules/debug/src/inspector-log.js +0 -15
  296. package/dist/src/web/frontend/node_modules/.detect-port-alt-Qap6bfIk/node_modules/debug/src/node.js +0 -248
  297. package/dist/src/web/frontend/node_modules/.detect-port-alt-Qap6bfIk/node_modules/ms/index.js +0 -152
  298. package/dist/src/web/frontend/node_modules/.ejs-BTDa9X3p/bin/cli.js +0 -211
  299. package/dist/src/web/frontend/node_modules/.ejs-BTDa9X3p/ejs.js +0 -1746
  300. package/dist/src/web/frontend/node_modules/.ejs-BTDa9X3p/ejs.min.js +0 -1
  301. package/dist/src/web/frontend/node_modules/.ejs-BTDa9X3p/jakefile.js +0 -88
  302. package/dist/src/web/frontend/node_modules/.ejs-BTDa9X3p/lib/ejs.js +0 -952
  303. package/dist/src/web/frontend/node_modules/.ejs-BTDa9X3p/lib/utils.js +0 -250
  304. package/dist/src/web/frontend/node_modules/.escodegen-dt8nupst/bin/escodegen.js +0 -77
  305. package/dist/src/web/frontend/node_modules/.escodegen-dt8nupst/bin/esgenerate.js +0 -64
  306. package/dist/src/web/frontend/node_modules/.escodegen-dt8nupst/escodegen.js +0 -2667
  307. package/dist/src/web/frontend/node_modules/.escodegen-dt8nupst/node_modules/source-map/dist/source-map.debug.js +0 -3234
  308. package/dist/src/web/frontend/node_modules/.escodegen-dt8nupst/node_modules/source-map/dist/source-map.js +0 -3233
  309. package/dist/src/web/frontend/node_modules/.escodegen-dt8nupst/node_modules/source-map/dist/source-map.min.js +0 -2
  310. package/dist/src/web/frontend/node_modules/.escodegen-dt8nupst/node_modules/source-map/lib/array-set.js +0 -121
  311. package/dist/src/web/frontend/node_modules/.escodegen-dt8nupst/node_modules/source-map/lib/base64-vlq.js +0 -140
  312. package/dist/src/web/frontend/node_modules/.escodegen-dt8nupst/node_modules/source-map/lib/base64.js +0 -67
  313. package/dist/src/web/frontend/node_modules/.escodegen-dt8nupst/node_modules/source-map/lib/binary-search.js +0 -111
  314. package/dist/src/web/frontend/node_modules/.escodegen-dt8nupst/node_modules/source-map/lib/mapping-list.js +0 -79
  315. package/dist/src/web/frontend/node_modules/.escodegen-dt8nupst/node_modules/source-map/lib/quick-sort.js +0 -114
  316. package/dist/src/web/frontend/node_modules/.escodegen-dt8nupst/node_modules/source-map/lib/source-map-consumer.js +0 -1145
  317. package/dist/src/web/frontend/node_modules/.escodegen-dt8nupst/node_modules/source-map/lib/source-map-generator.js +0 -425
  318. package/dist/src/web/frontend/node_modules/.escodegen-dt8nupst/node_modules/source-map/lib/source-node.js +0 -413
  319. package/dist/src/web/frontend/node_modules/.escodegen-dt8nupst/node_modules/source-map/lib/util.js +0 -488
  320. package/dist/src/web/frontend/node_modules/.escodegen-dt8nupst/node_modules/source-map/source-map.js +0 -8
  321. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/bin/eslint.js +0 -173
  322. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/conf/config-schema.js +0 -93
  323. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/conf/default-cli-options.js +0 -32
  324. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/conf/globals.js +0 -154
  325. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/api.js +0 -54
  326. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/cli-engine/cli-engine.js +0 -1078
  327. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/cli-engine/file-enumerator.js +0 -547
  328. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/cli-engine/formatters/checkstyle.js +0 -60
  329. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/cli-engine/formatters/compact.js +0 -60
  330. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/cli-engine/formatters/html.js +0 -351
  331. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/cli-engine/formatters/jslint-xml.js +0 -41
  332. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/cli-engine/formatters/json-with-metadata.js +0 -16
  333. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/cli-engine/formatters/json.js +0 -13
  334. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/cli-engine/formatters/junit.js +0 -82
  335. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/cli-engine/formatters/stylish.js +0 -101
  336. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/cli-engine/formatters/tap.js +0 -95
  337. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/cli-engine/formatters/unix.js +0 -58
  338. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/cli-engine/formatters/visualstudio.js +0 -63
  339. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/cli-engine/hash.js +0 -35
  340. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/cli-engine/index.js +0 -7
  341. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/cli-engine/lint-result-cache.js +0 -203
  342. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/cli-engine/load-rules.js +0 -46
  343. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/cli-engine/xml-escape.js +0 -34
  344. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/cli.js +0 -471
  345. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/config/default-config.js +0 -67
  346. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/config/flat-config-array.js +0 -380
  347. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/config/flat-config-helpers.js +0 -111
  348. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/config/flat-config-schema.js +0 -598
  349. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/config/rule-validator.js +0 -158
  350. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/eslint/eslint-helpers.js +0 -932
  351. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/eslint/eslint.js +0 -707
  352. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/eslint/flat-eslint.js +0 -1159
  353. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/eslint/index.js +0 -9
  354. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/linter/apply-disable-directives.js +0 -465
  355. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/linter/code-path-analysis/code-path-analyzer.js +0 -852
  356. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/linter/code-path-analysis/code-path-segment.js +0 -263
  357. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/linter/code-path-analysis/code-path-state.js +0 -2348
  358. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/linter/code-path-analysis/code-path.js +0 -342
  359. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/linter/code-path-analysis/debug-helpers.js +0 -203
  360. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/linter/code-path-analysis/fork-context.js +0 -349
  361. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/linter/code-path-analysis/id-generator.js +0 -45
  362. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/linter/config-comment-parser.js +0 -185
  363. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/linter/index.js +0 -13
  364. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/linter/interpolate.js +0 -28
  365. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/linter/linter.js +0 -2119
  366. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/linter/node-event-generator.js +0 -354
  367. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/linter/report-translator.js +0 -369
  368. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/linter/rule-fixer.js +0 -140
  369. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/linter/rules.js +0 -80
  370. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/linter/safe-emitter.js +0 -52
  371. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/linter/source-code-fixer.js +0 -152
  372. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/linter/timing.js +0 -161
  373. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/options.js +0 -398
  374. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rule-tester/flat-rule-tester.js +0 -1131
  375. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rule-tester/index.js +0 -5
  376. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rule-tester/rule-tester.js +0 -1206
  377. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/accessor-pairs.js +0 -346
  378. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/array-bracket-newline.js +0 -261
  379. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/array-bracket-spacing.js +0 -244
  380. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/array-callback-return.js +0 -446
  381. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/array-element-newline.js +0 -311
  382. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/arrow-body-style.js +0 -296
  383. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/arrow-parens.js +0 -186
  384. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/arrow-spacing.js +0 -164
  385. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/block-scoped-var.js +0 -135
  386. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/block-spacing.js +0 -174
  387. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/brace-style.js +0 -197
  388. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/callback-return.js +0 -187
  389. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/camelcase.js +0 -399
  390. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/capitalized-comments.js +0 -300
  391. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/class-methods-use-this.js +0 -187
  392. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/comma-dangle.js +0 -373
  393. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/comma-spacing.js +0 -192
  394. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/comma-style.js +0 -314
  395. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/complexity.js +0 -165
  396. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/computed-property-spacing.js +0 -208
  397. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/consistent-return.js +0 -210
  398. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/consistent-this.js +0 -153
  399. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/constructor-super.js +0 -446
  400. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/curly.js +0 -486
  401. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/default-case-last.js +0 -44
  402. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/default-case.js +0 -97
  403. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/default-param-last.js +0 -62
  404. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/dot-location.js +0 -108
  405. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/dot-notation.js +0 -176
  406. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/eol-last.js +0 -115
  407. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/eqeqeq.js +0 -174
  408. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/for-direction.js +0 -140
  409. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/func-call-spacing.js +0 -233
  410. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/func-name-matching.js +0 -253
  411. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/func-names.js +0 -191
  412. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/func-style.js +0 -98
  413. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/function-call-argument-newline.js +0 -125
  414. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/function-paren-newline.js +0 -292
  415. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/generator-star-spacing.js +0 -209
  416. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/getter-return.js +0 -204
  417. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/global-require.js +0 -90
  418. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/grouped-accessor-pairs.js +0 -215
  419. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/guard-for-in.js +0 -76
  420. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/handle-callback-err.js +0 -101
  421. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/id-blacklist.js +0 -246
  422. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/id-denylist.js +0 -228
  423. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/id-length.js +0 -177
  424. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/id-match.js +0 -299
  425. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/implicit-arrow-linebreak.js +0 -84
  426. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/indent-legacy.js +0 -1126
  427. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/indent.js +0 -1803
  428. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/index.js +0 -306
  429. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/init-declarations.js +0 -139
  430. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/jsx-quotes.js +0 -98
  431. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/key-spacing.js +0 -687
  432. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/keyword-spacing.js +0 -640
  433. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/line-comment-position.js +0 -122
  434. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/linebreak-style.js +0 -108
  435. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/lines-around-comment.js +0 -471
  436. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/lines-around-directive.js +0 -201
  437. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/lines-between-class-members.js +0 -269
  438. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/logical-assignment-operators.js +0 -504
  439. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/max-classes-per-file.js +0 -89
  440. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/max-depth.js +0 -156
  441. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/max-len.js +0 -440
  442. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/max-lines-per-function.js +0 -213
  443. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/max-lines.js +0 -193
  444. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/max-nested-callbacks.js +0 -117
  445. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/max-params.js +0 -102
  446. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/max-statements-per-line.js +0 -199
  447. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/max-statements.js +0 -184
  448. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/multiline-comment-style.js +0 -474
  449. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/multiline-ternary.js +0 -174
  450. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/new-cap.js +0 -276
  451. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/new-parens.js +0 -93
  452. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/newline-after-var.js +0 -253
  453. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/newline-before-return.js +0 -217
  454. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/newline-per-chained-call.js +0 -126
  455. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/no-alert.js +0 -138
  456. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/no-array-constructor.js +0 -133
  457. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/no-async-promise-executor.js +0 -39
  458. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/no-await-in-loop.js +0 -106
  459. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/no-bitwise.js +0 -119
  460. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/no-buffer-constructor.js +0 -50
  461. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/no-caller.js +0 -46
  462. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/no-case-declarations.js +0 -64
  463. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/no-catch-shadow.js +0 -82
  464. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/no-class-assign.js +0 -63
  465. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/no-compare-neg-zero.js +0 -60
  466. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/no-cond-assign.js +0 -159
  467. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/no-confusing-arrow.js +0 -92
  468. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/no-console.js +0 -207
  469. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/no-const-assign.js +0 -56
  470. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/no-constant-binary-expression.js +0 -509
  471. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/no-constant-condition.js +0 -150
  472. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/no-constructor-return.js +0 -62
  473. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/no-continue.js +0 -39
  474. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/no-control-regex.js +0 -138
  475. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/no-debugger.js +0 -43
  476. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/no-delete-var.js +0 -42
  477. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/no-div-regex.js +0 -53
  478. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/no-dupe-args.js +0 -82
  479. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/no-dupe-class-members.js +0 -104
  480. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/no-dupe-else-if.js +0 -122
  481. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/no-dupe-keys.js +0 -142
  482. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/no-duplicate-case.js +0 -71
  483. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/no-duplicate-imports.js +0 -290
  484. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/no-else-return.js +0 -405
  485. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/no-empty-character-class.js +0 -76
  486. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/no-empty-function.js +0 -167
  487. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/no-empty-pattern.js +0 -78
  488. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/no-empty-static-block.js +0 -47
  489. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/no-empty.js +0 -103
  490. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/no-eq-null.js +0 -46
  491. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/no-eval.js +0 -286
  492. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/no-ex-assign.js +0 -54
  493. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/no-extend-native.js +0 -179
  494. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/no-extra-bind.js +0 -213
  495. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/no-extra-boolean-cast.js +0 -317
  496. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/no-extra-label.js +0 -149
  497. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/no-extra-parens.js +0 -1322
  498. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/no-extra-semi.js +0 -147
  499. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/no-fallthrough.js +0 -196
  500. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/no-floating-decimal.js +0 -73
  501. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/no-func-assign.js +0 -78
  502. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/no-global-assign.js +0 -95
  503. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/no-implicit-coercion.js +0 -380
  504. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/no-implicit-globals.js +0 -146
  505. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/no-implied-eval.js +0 -132
  506. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/no-import-assign.js +0 -241
  507. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/no-inline-comments.js +0 -110
  508. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/no-inner-declarations.js +0 -110
  509. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/no-invalid-regexp.js +0 -194
  510. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/no-invalid-this.js +0 -150
  511. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/no-irregular-whitespace.js +0 -276
  512. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/no-iterator.js +0 -52
  513. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/no-label-var.js +0 -80
  514. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/no-labels.js +0 -149
  515. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/no-lone-blocks.js +0 -136
  516. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/no-lonely-if.js +0 -88
  517. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/no-loop-func.js +0 -206
  518. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/no-loss-of-precision.js +0 -214
  519. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/no-magic-numbers.js +0 -243
  520. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/no-misleading-character-class.js +0 -300
  521. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/no-mixed-operators.js +0 -229
  522. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/no-mixed-requires.js +0 -238
  523. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/no-mixed-spaces-and-tabs.js +0 -116
  524. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/no-multi-assign.js +0 -67
  525. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/no-multi-spaces.js +0 -141
  526. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/no-multi-str.js +0 -65
  527. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/no-multiple-empty-lines.js +0 -154
  528. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/no-native-reassign.js +0 -98
  529. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/no-negated-condition.js +0 -95
  530. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/no-negated-in-lhs.js +0 -46
  531. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/no-nested-ternary.js +0 -44
  532. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/no-new-func.js +0 -87
  533. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/no-new-native-nonconstructor.js +0 -66
  534. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/no-new-object.js +0 -67
  535. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/no-new-require.js +0 -50
  536. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/no-new-symbol.js +0 -56
  537. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/no-new-wrappers.js +0 -60
  538. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/no-new.js +0 -43
  539. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/no-nonoctal-decimal-escape.js +0 -148
  540. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/no-obj-calls.js +0 -86
  541. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/no-object-constructor.js +0 -117
  542. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/no-octal-escape.js +0 -56
  543. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/no-octal.js +0 -45
  544. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/no-param-reassign.js +0 -230
  545. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/no-path-concat.js +0 -64
  546. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/no-plusplus.js +0 -105
  547. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/no-process-env.js +0 -51
  548. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/no-process-exit.js +0 -47
  549. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/no-promise-executor-return.js +0 -263
  550. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/no-proto.js +0 -48
  551. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/no-prototype-builtins.js +0 -159
  552. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/no-redeclare.js +0 -174
  553. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/no-regex-spaces.js +0 -197
  554. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/no-restricted-exports.js +0 -193
  555. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/no-restricted-globals.js +0 -124
  556. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/no-restricted-imports.js +0 -410
  557. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/no-restricted-modules.js +0 -213
  558. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/no-restricted-properties.js +0 -168
  559. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/no-restricted-syntax.js +0 -70
  560. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/no-return-assign.js +0 -80
  561. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/no-return-await.js +0 -135
  562. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/no-script-url.js +0 -61
  563. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/no-self-assign.js +0 -183
  564. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/no-self-compare.js +0 -60
  565. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/no-sequences.js +0 -138
  566. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/no-setter-return.js +0 -226
  567. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/no-shadow-restricted-names.js +0 -65
  568. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/no-shadow.js +0 -336
  569. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/no-spaced-func.js +0 -83
  570. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/no-sparse-arrays.js +0 -50
  571. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/no-sync.js +0 -64
  572. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/no-tabs.js +0 -81
  573. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/no-template-curly-in-string.js +0 -44
  574. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/no-ternary.js +0 -41
  575. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/no-this-before-super.js +0 -331
  576. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/no-throw-literal.js +0 -51
  577. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/no-trailing-spaces.js +0 -193
  578. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/no-undef-init.js +0 -75
  579. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/no-undef.js +0 -79
  580. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/no-undefined.js +0 -86
  581. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/no-underscore-dangle.js +0 -335
  582. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/no-unexpected-multiline.js +0 -120
  583. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/no-unmodified-loop-condition.js +0 -360
  584. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/no-unneeded-ternary.js +0 -166
  585. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/no-unreachable-loop.js +0 -185
  586. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/no-unreachable.js +0 -293
  587. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/no-unsafe-finally.js +0 -111
  588. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/no-unsafe-negation.js +0 -128
  589. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/no-unsafe-optional-chaining.js +0 -205
  590. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/no-unused-expressions.js +0 -186
  591. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/no-unused-labels.js +0 -143
  592. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/no-unused-private-class-members.js +0 -195
  593. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/no-unused-vars.js +0 -718
  594. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/no-use-before-define.js +0 -348
  595. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/no-useless-backreference.js +0 -194
  596. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/no-useless-call.js +0 -90
  597. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/no-useless-catch.js +0 -57
  598. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/no-useless-computed-key.js +0 -168
  599. package/dist/src/web/frontend/node_modules/.eslint-60wj8XRy/lib/rules/no-useless-concat.js +0 -115
@@ -1,2119 +0,0 @@
1
- /**
2
- * @fileoverview Main Linter Class
3
- * @author Gyandeep Singh
4
- * @author aladdin-add
5
- */
6
-
7
- "use strict";
8
-
9
- //------------------------------------------------------------------------------
10
- // Requirements
11
- //------------------------------------------------------------------------------
12
-
13
- const
14
- path = require("path"),
15
- eslintScope = require("eslint-scope"),
16
- evk = require("eslint-visitor-keys"),
17
- espree = require("espree"),
18
- merge = require("lodash.merge"),
19
- pkg = require("../../package.json"),
20
- astUtils = require("../shared/ast-utils"),
21
- {
22
- directivesPattern
23
- } = require("../shared/directives"),
24
- {
25
- Legacy: {
26
- ConfigOps,
27
- ConfigValidator,
28
- environments: BuiltInEnvironments
29
- }
30
- } = require("@eslint/eslintrc/universal"),
31
- Traverser = require("../shared/traverser"),
32
- { SourceCode } = require("../source-code"),
33
- CodePathAnalyzer = require("./code-path-analysis/code-path-analyzer"),
34
- applyDisableDirectives = require("./apply-disable-directives"),
35
- ConfigCommentParser = require("./config-comment-parser"),
36
- NodeEventGenerator = require("./node-event-generator"),
37
- createReportTranslator = require("./report-translator"),
38
- Rules = require("./rules"),
39
- createEmitter = require("./safe-emitter"),
40
- SourceCodeFixer = require("./source-code-fixer"),
41
- timing = require("./timing"),
42
- ruleReplacements = require("../../conf/replacements.json");
43
- const { getRuleFromConfig } = require("../config/flat-config-helpers");
44
- const { FlatConfigArray } = require("../config/flat-config-array");
45
- const { RuleValidator } = require("../config/rule-validator");
46
- const { assertIsRuleOptions, assertIsRuleSeverity } = require("../config/flat-config-schema");
47
- const { normalizeSeverityToString } = require("../shared/severity");
48
- const debug = require("debug")("eslint:linter");
49
- const MAX_AUTOFIX_PASSES = 10;
50
- const DEFAULT_PARSER_NAME = "espree";
51
- const DEFAULT_ECMA_VERSION = 5;
52
- const commentParser = new ConfigCommentParser();
53
- const DEFAULT_ERROR_LOC = { start: { line: 1, column: 0 }, end: { line: 1, column: 1 } };
54
- const parserSymbol = Symbol.for("eslint.RuleTester.parser");
55
-
56
- //------------------------------------------------------------------------------
57
- // Typedefs
58
- //------------------------------------------------------------------------------
59
-
60
- /** @typedef {InstanceType<import("../cli-engine/config-array").ConfigArray>} ConfigArray */
61
- /** @typedef {InstanceType<import("../cli-engine/config-array").ExtractedConfig>} ExtractedConfig */
62
- /** @typedef {import("../shared/types").ConfigData} ConfigData */
63
- /** @typedef {import("../shared/types").Environment} Environment */
64
- /** @typedef {import("../shared/types").GlobalConf} GlobalConf */
65
- /** @typedef {import("../shared/types").LintMessage} LintMessage */
66
- /** @typedef {import("../shared/types").SuppressedLintMessage} SuppressedLintMessage */
67
- /** @typedef {import("../shared/types").ParserOptions} ParserOptions */
68
- /** @typedef {import("../shared/types").LanguageOptions} LanguageOptions */
69
- /** @typedef {import("../shared/types").Processor} Processor */
70
- /** @typedef {import("../shared/types").Rule} Rule */
71
-
72
- /* eslint-disable jsdoc/valid-types -- https://github.com/jsdoc-type-pratt-parser/jsdoc-type-pratt-parser/issues/4#issuecomment-778805577 */
73
- /**
74
- * @template T
75
- * @typedef {{ [P in keyof T]-?: T[P] }} Required
76
- */
77
- /* eslint-enable jsdoc/valid-types -- https://github.com/jsdoc-type-pratt-parser/jsdoc-type-pratt-parser/issues/4#issuecomment-778805577 */
78
-
79
- /**
80
- * @typedef {Object} DisableDirective
81
- * @property {("disable"|"enable"|"disable-line"|"disable-next-line")} type Type of directive
82
- * @property {number} line The line number
83
- * @property {number} column The column number
84
- * @property {(string|null)} ruleId The rule ID
85
- * @property {string} justification The justification of directive
86
- */
87
-
88
- /**
89
- * The private data for `Linter` instance.
90
- * @typedef {Object} LinterInternalSlots
91
- * @property {ConfigArray|null} lastConfigArray The `ConfigArray` instance that the last `verify()` call used.
92
- * @property {SourceCode|null} lastSourceCode The `SourceCode` instance that the last `verify()` call used.
93
- * @property {SuppressedLintMessage[]} lastSuppressedMessages The `SuppressedLintMessage[]` instance that the last `verify()` call produced.
94
- * @property {Map<string, Parser>} parserMap The loaded parsers.
95
- * @property {Rules} ruleMap The loaded rules.
96
- */
97
-
98
- /**
99
- * @typedef {Object} VerifyOptions
100
- * @property {boolean} [allowInlineConfig] Allow/disallow inline comments' ability
101
- * to change config once it is set. Defaults to true if not supplied.
102
- * Useful if you want to validate JS without comments overriding rules.
103
- * @property {boolean} [disableFixes] if `true` then the linter doesn't make `fix`
104
- * properties into the lint result.
105
- * @property {string} [filename] the filename of the source code.
106
- * @property {boolean | "off" | "warn" | "error"} [reportUnusedDisableDirectives] Adds reported errors for
107
- * unused `eslint-disable` directives.
108
- */
109
-
110
- /**
111
- * @typedef {Object} ProcessorOptions
112
- * @property {(filename:string, text:string) => boolean} [filterCodeBlock] the
113
- * predicate function that selects adopt code blocks.
114
- * @property {Processor.postprocess} [postprocess] postprocessor for report
115
- * messages. If provided, this should accept an array of the message lists
116
- * for each code block returned from the preprocessor, apply a mapping to
117
- * the messages as appropriate, and return a one-dimensional array of
118
- * messages.
119
- * @property {Processor.preprocess} [preprocess] preprocessor for source text.
120
- * If provided, this should accept a string of source text, and return an
121
- * array of code blocks to lint.
122
- */
123
-
124
- /**
125
- * @typedef {Object} FixOptions
126
- * @property {boolean | ((message: LintMessage) => boolean)} [fix] Determines
127
- * whether fixes should be applied.
128
- */
129
-
130
- /**
131
- * @typedef {Object} InternalOptions
132
- * @property {string | null} warnInlineConfig The config name what `noInlineConfig` setting came from. If `noInlineConfig` setting didn't exist, this is null. If this is a config name, then the linter warns directive comments.
133
- * @property {"off" | "warn" | "error"} reportUnusedDisableDirectives (boolean values were normalized)
134
- */
135
-
136
- //------------------------------------------------------------------------------
137
- // Helpers
138
- //------------------------------------------------------------------------------
139
-
140
- /**
141
- * Determines if a given object is Espree.
142
- * @param {Object} parser The parser to check.
143
- * @returns {boolean} True if the parser is Espree or false if not.
144
- */
145
- function isEspree(parser) {
146
- return !!(parser === espree || parser[parserSymbol] === espree);
147
- }
148
-
149
- /**
150
- * Ensures that variables representing built-in properties of the Global Object,
151
- * and any globals declared by special block comments, are present in the global
152
- * scope.
153
- * @param {Scope} globalScope The global scope.
154
- * @param {Object} configGlobals The globals declared in configuration
155
- * @param {{exportedVariables: Object, enabledGlobals: Object}} commentDirectives Directives from comment configuration
156
- * @returns {void}
157
- */
158
- function addDeclaredGlobals(globalScope, configGlobals, { exportedVariables, enabledGlobals }) {
159
-
160
- // Define configured global variables.
161
- for (const id of new Set([...Object.keys(configGlobals), ...Object.keys(enabledGlobals)])) {
162
-
163
- /*
164
- * `ConfigOps.normalizeConfigGlobal` will throw an error if a configured global value is invalid. However, these errors would
165
- * typically be caught when validating a config anyway (validity for inline global comments is checked separately).
166
- */
167
- const configValue = configGlobals[id] === void 0 ? void 0 : ConfigOps.normalizeConfigGlobal(configGlobals[id]);
168
- const commentValue = enabledGlobals[id] && enabledGlobals[id].value;
169
- const value = commentValue || configValue;
170
- const sourceComments = enabledGlobals[id] && enabledGlobals[id].comments;
171
-
172
- if (value === "off") {
173
- continue;
174
- }
175
-
176
- let variable = globalScope.set.get(id);
177
-
178
- if (!variable) {
179
- variable = new eslintScope.Variable(id, globalScope);
180
-
181
- globalScope.variables.push(variable);
182
- globalScope.set.set(id, variable);
183
- }
184
-
185
- variable.eslintImplicitGlobalSetting = configValue;
186
- variable.eslintExplicitGlobal = sourceComments !== void 0;
187
- variable.eslintExplicitGlobalComments = sourceComments;
188
- variable.writeable = (value === "writable");
189
- }
190
-
191
- // mark all exported variables as such
192
- Object.keys(exportedVariables).forEach(name => {
193
- const variable = globalScope.set.get(name);
194
-
195
- if (variable) {
196
- variable.eslintUsed = true;
197
- variable.eslintExported = true;
198
- }
199
- });
200
-
201
- /*
202
- * "through" contains all references which definitions cannot be found.
203
- * Since we augment the global scope using configuration, we need to update
204
- * references and remove the ones that were added by configuration.
205
- */
206
- globalScope.through = globalScope.through.filter(reference => {
207
- const name = reference.identifier.name;
208
- const variable = globalScope.set.get(name);
209
-
210
- if (variable) {
211
-
212
- /*
213
- * Links the variable and the reference.
214
- * And this reference is removed from `Scope#through`.
215
- */
216
- reference.resolved = variable;
217
- variable.references.push(reference);
218
-
219
- return false;
220
- }
221
-
222
- return true;
223
- });
224
- }
225
-
226
- /**
227
- * creates a missing-rule message.
228
- * @param {string} ruleId the ruleId to create
229
- * @returns {string} created error message
230
- * @private
231
- */
232
- function createMissingRuleMessage(ruleId) {
233
- return Object.prototype.hasOwnProperty.call(ruleReplacements.rules, ruleId)
234
- ? `Rule '${ruleId}' was removed and replaced by: ${ruleReplacements.rules[ruleId].join(", ")}`
235
- : `Definition for rule '${ruleId}' was not found.`;
236
- }
237
-
238
- /**
239
- * creates a linting problem
240
- * @param {Object} options to create linting error
241
- * @param {string} [options.ruleId] the ruleId to report
242
- * @param {Object} [options.loc] the loc to report
243
- * @param {string} [options.message] the error message to report
244
- * @param {string} [options.severity] the error message to report
245
- * @returns {LintMessage} created problem, returns a missing-rule problem if only provided ruleId.
246
- * @private
247
- */
248
- function createLintingProblem(options) {
249
- const {
250
- ruleId = null,
251
- loc = DEFAULT_ERROR_LOC,
252
- message = createMissingRuleMessage(options.ruleId),
253
- severity = 2
254
- } = options;
255
-
256
- return {
257
- ruleId,
258
- message,
259
- line: loc.start.line,
260
- column: loc.start.column + 1,
261
- endLine: loc.end.line,
262
- endColumn: loc.end.column + 1,
263
- severity,
264
- nodeType: null
265
- };
266
- }
267
-
268
- /**
269
- * Creates a collection of disable directives from a comment
270
- * @param {Object} options to create disable directives
271
- * @param {("disable"|"enable"|"disable-line"|"disable-next-line")} options.type The type of directive comment
272
- * @param {token} options.commentToken The Comment token
273
- * @param {string} options.value The value after the directive in the comment
274
- * comment specified no specific rules, so it applies to all rules (e.g. `eslint-disable`)
275
- * @param {string} options.justification The justification of the directive
276
- * @param {function(string): {create: Function}} options.ruleMapper A map from rule IDs to defined rules
277
- * @returns {Object} Directives and problems from the comment
278
- */
279
- function createDisableDirectives(options) {
280
- const { commentToken, type, value, justification, ruleMapper } = options;
281
- const ruleIds = Object.keys(commentParser.parseListConfig(value));
282
- const directiveRules = ruleIds.length ? ruleIds : [null];
283
- const result = {
284
- directives: [], // valid disable directives
285
- directiveProblems: [] // problems in directives
286
- };
287
-
288
- const parentComment = { commentToken, ruleIds };
289
-
290
- for (const ruleId of directiveRules) {
291
-
292
- // push to directives, if the rule is defined(including null, e.g. /*eslint enable*/)
293
- if (ruleId === null || !!ruleMapper(ruleId)) {
294
- if (type === "disable-next-line") {
295
- result.directives.push({
296
- parentComment,
297
- type,
298
- line: commentToken.loc.end.line,
299
- column: commentToken.loc.end.column + 1,
300
- ruleId,
301
- justification
302
- });
303
- } else {
304
- result.directives.push({
305
- parentComment,
306
- type,
307
- line: commentToken.loc.start.line,
308
- column: commentToken.loc.start.column + 1,
309
- ruleId,
310
- justification
311
- });
312
- }
313
- } else {
314
- result.directiveProblems.push(createLintingProblem({ ruleId, loc: commentToken.loc }));
315
- }
316
- }
317
- return result;
318
- }
319
-
320
- /**
321
- * Parses comments in file to extract file-specific config of rules, globals
322
- * and environments and merges them with global config; also code blocks
323
- * where reporting is disabled or enabled and merges them with reporting config.
324
- * @param {SourceCode} sourceCode The SourceCode object to get comments from.
325
- * @param {function(string): {create: Function}} ruleMapper A map from rule IDs to defined rules
326
- * @param {string|null} warnInlineConfig If a string then it should warn directive comments as disabled. The string value is the config name what the setting came from.
327
- * @returns {{configuredRules: Object, enabledGlobals: {value:string,comment:Token}[], exportedVariables: Object, problems: LintMessage[], disableDirectives: DisableDirective[]}}
328
- * A collection of the directive comments that were found, along with any problems that occurred when parsing
329
- */
330
- function getDirectiveComments(sourceCode, ruleMapper, warnInlineConfig) {
331
- const configuredRules = {};
332
- const enabledGlobals = Object.create(null);
333
- const exportedVariables = {};
334
- const problems = [];
335
- const disableDirectives = [];
336
- const validator = new ConfigValidator({
337
- builtInRules: Rules
338
- });
339
-
340
- sourceCode.getInlineConfigNodes().filter(token => token.type !== "Shebang").forEach(comment => {
341
- const { directivePart, justificationPart } = commentParser.extractDirectiveComment(comment.value);
342
-
343
- const match = directivesPattern.exec(directivePart);
344
-
345
- if (!match) {
346
- return;
347
- }
348
- const directiveText = match[1];
349
- const lineCommentSupported = /^eslint-disable-(next-)?line$/u.test(directiveText);
350
-
351
- if (comment.type === "Line" && !lineCommentSupported) {
352
- return;
353
- }
354
-
355
- if (warnInlineConfig) {
356
- const kind = comment.type === "Block" ? `/*${directiveText}*/` : `//${directiveText}`;
357
-
358
- problems.push(createLintingProblem({
359
- ruleId: null,
360
- message: `'${kind}' has no effect because you have 'noInlineConfig' setting in ${warnInlineConfig}.`,
361
- loc: comment.loc,
362
- severity: 1
363
- }));
364
- return;
365
- }
366
-
367
- if (directiveText === "eslint-disable-line" && comment.loc.start.line !== comment.loc.end.line) {
368
- const message = `${directiveText} comment should not span multiple lines.`;
369
-
370
- problems.push(createLintingProblem({
371
- ruleId: null,
372
- message,
373
- loc: comment.loc
374
- }));
375
- return;
376
- }
377
-
378
- const directiveValue = directivePart.slice(match.index + directiveText.length);
379
-
380
- switch (directiveText) {
381
- case "eslint-disable":
382
- case "eslint-enable":
383
- case "eslint-disable-next-line":
384
- case "eslint-disable-line": {
385
- const directiveType = directiveText.slice("eslint-".length);
386
- const options = { commentToken: comment, type: directiveType, value: directiveValue, justification: justificationPart, ruleMapper };
387
- const { directives, directiveProblems } = createDisableDirectives(options);
388
-
389
- disableDirectives.push(...directives);
390
- problems.push(...directiveProblems);
391
- break;
392
- }
393
-
394
- case "exported":
395
- Object.assign(exportedVariables, commentParser.parseStringConfig(directiveValue, comment));
396
- break;
397
-
398
- case "globals":
399
- case "global":
400
- for (const [id, { value }] of Object.entries(commentParser.parseStringConfig(directiveValue, comment))) {
401
- let normalizedValue;
402
-
403
- try {
404
- normalizedValue = ConfigOps.normalizeConfigGlobal(value);
405
- } catch (err) {
406
- problems.push(createLintingProblem({
407
- ruleId: null,
408
- loc: comment.loc,
409
- message: err.message
410
- }));
411
- continue;
412
- }
413
-
414
- if (enabledGlobals[id]) {
415
- enabledGlobals[id].comments.push(comment);
416
- enabledGlobals[id].value = normalizedValue;
417
- } else {
418
- enabledGlobals[id] = {
419
- comments: [comment],
420
- value: normalizedValue
421
- };
422
- }
423
- }
424
- break;
425
-
426
- case "eslint": {
427
- const parseResult = commentParser.parseJsonConfig(directiveValue, comment.loc);
428
-
429
- if (parseResult.success) {
430
- Object.keys(parseResult.config).forEach(name => {
431
- const rule = ruleMapper(name);
432
- const ruleValue = parseResult.config[name];
433
-
434
- if (!rule) {
435
- problems.push(createLintingProblem({ ruleId: name, loc: comment.loc }));
436
- return;
437
- }
438
-
439
- try {
440
- validator.validateRuleOptions(rule, name, ruleValue);
441
- } catch (err) {
442
- problems.push(createLintingProblem({
443
- ruleId: name,
444
- message: err.message,
445
- loc: comment.loc
446
- }));
447
-
448
- // do not apply the config, if found invalid options.
449
- return;
450
- }
451
-
452
- configuredRules[name] = ruleValue;
453
- });
454
- } else {
455
- problems.push(parseResult.error);
456
- }
457
-
458
- break;
459
- }
460
-
461
- // no default
462
- }
463
- });
464
-
465
- return {
466
- configuredRules,
467
- enabledGlobals,
468
- exportedVariables,
469
- problems,
470
- disableDirectives
471
- };
472
- }
473
-
474
- /**
475
- * Parses comments in file to extract disable directives.
476
- * @param {SourceCode} sourceCode The SourceCode object to get comments from.
477
- * @param {function(string): {create: Function}} ruleMapper A map from rule IDs to defined rules
478
- * @returns {{problems: LintMessage[], disableDirectives: DisableDirective[]}}
479
- * A collection of the directive comments that were found, along with any problems that occurred when parsing
480
- */
481
- function getDirectiveCommentsForFlatConfig(sourceCode, ruleMapper) {
482
- const problems = [];
483
- const disableDirectives = [];
484
-
485
- sourceCode.getInlineConfigNodes().filter(token => token.type !== "Shebang").forEach(comment => {
486
- const { directivePart, justificationPart } = commentParser.extractDirectiveComment(comment.value);
487
-
488
- const match = directivesPattern.exec(directivePart);
489
-
490
- if (!match) {
491
- return;
492
- }
493
- const directiveText = match[1];
494
- const lineCommentSupported = /^eslint-disable-(next-)?line$/u.test(directiveText);
495
-
496
- if (comment.type === "Line" && !lineCommentSupported) {
497
- return;
498
- }
499
-
500
- if (directiveText === "eslint-disable-line" && comment.loc.start.line !== comment.loc.end.line) {
501
- const message = `${directiveText} comment should not span multiple lines.`;
502
-
503
- problems.push(createLintingProblem({
504
- ruleId: null,
505
- message,
506
- loc: comment.loc
507
- }));
508
- return;
509
- }
510
-
511
- const directiveValue = directivePart.slice(match.index + directiveText.length);
512
-
513
- switch (directiveText) {
514
- case "eslint-disable":
515
- case "eslint-enable":
516
- case "eslint-disable-next-line":
517
- case "eslint-disable-line": {
518
- const directiveType = directiveText.slice("eslint-".length);
519
- const options = { commentToken: comment, type: directiveType, value: directiveValue, justification: justificationPart, ruleMapper };
520
- const { directives, directiveProblems } = createDisableDirectives(options);
521
-
522
- disableDirectives.push(...directives);
523
- problems.push(...directiveProblems);
524
- break;
525
- }
526
-
527
- // no default
528
- }
529
- });
530
-
531
- return {
532
- problems,
533
- disableDirectives
534
- };
535
- }
536
-
537
- /**
538
- * Normalize ECMAScript version from the initial config
539
- * @param {Parser} parser The parser which uses this options.
540
- * @param {number} ecmaVersion ECMAScript version from the initial config
541
- * @returns {number} normalized ECMAScript version
542
- */
543
- function normalizeEcmaVersion(parser, ecmaVersion) {
544
-
545
- if (isEspree(parser)) {
546
- if (ecmaVersion === "latest") {
547
- return espree.latestEcmaVersion;
548
- }
549
- }
550
-
551
- /*
552
- * Calculate ECMAScript edition number from official year version starting with
553
- * ES2015, which corresponds with ES6 (or a difference of 2009).
554
- */
555
- return ecmaVersion >= 2015 ? ecmaVersion - 2009 : ecmaVersion;
556
- }
557
-
558
- /**
559
- * Normalize ECMAScript version from the initial config into languageOptions (year)
560
- * format.
561
- * @param {any} [ecmaVersion] ECMAScript version from the initial config
562
- * @returns {number} normalized ECMAScript version
563
- */
564
- function normalizeEcmaVersionForLanguageOptions(ecmaVersion) {
565
-
566
- switch (ecmaVersion) {
567
- case 3:
568
- return 3;
569
-
570
- // void 0 = no ecmaVersion specified so use the default
571
- case 5:
572
- case void 0:
573
- return 5;
574
-
575
- default:
576
- if (typeof ecmaVersion === "number") {
577
- return ecmaVersion >= 2015 ? ecmaVersion : ecmaVersion + 2009;
578
- }
579
- }
580
-
581
- /*
582
- * We default to the latest supported ecmaVersion for everything else.
583
- * Remember, this is for languageOptions.ecmaVersion, which sets the version
584
- * that is used for a number of processes inside of ESLint. It's normally
585
- * safe to assume people want the latest unless otherwise specified.
586
- */
587
- return espree.latestEcmaVersion + 2009;
588
- }
589
-
590
- const eslintEnvPattern = /\/\*\s*eslint-env\s(.+?)(?:\*\/|$)/gsu;
591
-
592
- /**
593
- * Checks whether or not there is a comment which has "eslint-env *" in a given text.
594
- * @param {string} text A source code text to check.
595
- * @returns {Object|null} A result of parseListConfig() with "eslint-env *" comment.
596
- */
597
- function findEslintEnv(text) {
598
- let match, retv;
599
-
600
- eslintEnvPattern.lastIndex = 0;
601
-
602
- while ((match = eslintEnvPattern.exec(text)) !== null) {
603
- if (match[0].endsWith("*/")) {
604
- retv = Object.assign(
605
- retv || {},
606
- commentParser.parseListConfig(commentParser.extractDirectiveComment(match[1]).directivePart)
607
- );
608
- }
609
- }
610
-
611
- return retv;
612
- }
613
-
614
- /**
615
- * Convert "/path/to/<text>" to "<text>".
616
- * `CLIEngine#executeOnText()` method gives "/path/to/<text>" if the filename
617
- * was omitted because `configArray.extractConfig()` requires an absolute path.
618
- * But the linter should pass `<text>` to `RuleContext#filename` in that
619
- * case.
620
- * Also, code blocks can have their virtual filename. If the parent filename was
621
- * `<text>`, the virtual filename is `<text>/0_foo.js` or something like (i.e.,
622
- * it's not an absolute path).
623
- * @param {string} filename The filename to normalize.
624
- * @returns {string} The normalized filename.
625
- */
626
- function normalizeFilename(filename) {
627
- const parts = filename.split(path.sep);
628
- const index = parts.lastIndexOf("<text>");
629
-
630
- return index === -1 ? filename : parts.slice(index).join(path.sep);
631
- }
632
-
633
- /**
634
- * Normalizes the possible options for `linter.verify` and `linter.verifyAndFix` to a
635
- * consistent shape.
636
- * @param {VerifyOptions} providedOptions Options
637
- * @param {ConfigData} config Config.
638
- * @returns {Required<VerifyOptions> & InternalOptions} Normalized options
639
- */
640
- function normalizeVerifyOptions(providedOptions, config) {
641
-
642
- const linterOptions = config.linterOptions || config;
643
-
644
- // .noInlineConfig for eslintrc, .linterOptions.noInlineConfig for flat
645
- const disableInlineConfig = linterOptions.noInlineConfig === true;
646
- const ignoreInlineConfig = providedOptions.allowInlineConfig === false;
647
- const configNameOfNoInlineConfig = config.configNameOfNoInlineConfig
648
- ? ` (${config.configNameOfNoInlineConfig})`
649
- : "";
650
-
651
- let reportUnusedDisableDirectives = providedOptions.reportUnusedDisableDirectives;
652
-
653
- if (typeof reportUnusedDisableDirectives === "boolean") {
654
- reportUnusedDisableDirectives = reportUnusedDisableDirectives ? "error" : "off";
655
- }
656
- if (typeof reportUnusedDisableDirectives !== "string") {
657
- if (typeof linterOptions.reportUnusedDisableDirectives === "boolean") {
658
- reportUnusedDisableDirectives = linterOptions.reportUnusedDisableDirectives ? "warn" : "off";
659
- } else {
660
- reportUnusedDisableDirectives = linterOptions.reportUnusedDisableDirectives === void 0 ? "off" : normalizeSeverityToString(linterOptions.reportUnusedDisableDirectives);
661
- }
662
- }
663
-
664
- return {
665
- filename: normalizeFilename(providedOptions.filename || "<input>"),
666
- allowInlineConfig: !ignoreInlineConfig,
667
- warnInlineConfig: disableInlineConfig && !ignoreInlineConfig
668
- ? `your config${configNameOfNoInlineConfig}`
669
- : null,
670
- reportUnusedDisableDirectives,
671
- disableFixes: Boolean(providedOptions.disableFixes)
672
- };
673
- }
674
-
675
- /**
676
- * Combines the provided parserOptions with the options from environments
677
- * @param {Parser} parser The parser which uses this options.
678
- * @param {ParserOptions} providedOptions The provided 'parserOptions' key in a config
679
- * @param {Environment[]} enabledEnvironments The environments enabled in configuration and with inline comments
680
- * @returns {ParserOptions} Resulting parser options after merge
681
- */
682
- function resolveParserOptions(parser, providedOptions, enabledEnvironments) {
683
-
684
- const parserOptionsFromEnv = enabledEnvironments
685
- .filter(env => env.parserOptions)
686
- .reduce((parserOptions, env) => merge(parserOptions, env.parserOptions), {});
687
- const mergedParserOptions = merge(parserOptionsFromEnv, providedOptions || {});
688
- const isModule = mergedParserOptions.sourceType === "module";
689
-
690
- if (isModule) {
691
-
692
- /*
693
- * can't have global return inside of modules
694
- * TODO: espree validate parserOptions.globalReturn when sourceType is setting to module.(@aladdin-add)
695
- */
696
- mergedParserOptions.ecmaFeatures = Object.assign({}, mergedParserOptions.ecmaFeatures, { globalReturn: false });
697
- }
698
-
699
- mergedParserOptions.ecmaVersion = normalizeEcmaVersion(parser, mergedParserOptions.ecmaVersion);
700
-
701
- return mergedParserOptions;
702
- }
703
-
704
- /**
705
- * Converts parserOptions to languageOptions for backwards compatibility with eslintrc.
706
- * @param {ConfigData} config Config object.
707
- * @param {Object} config.globals Global variable definitions.
708
- * @param {Parser} config.parser The parser to use.
709
- * @param {ParserOptions} config.parserOptions The parserOptions to use.
710
- * @returns {LanguageOptions} The languageOptions equivalent.
711
- */
712
- function createLanguageOptions({ globals: configuredGlobals, parser, parserOptions }) {
713
-
714
- const {
715
- ecmaVersion,
716
- sourceType
717
- } = parserOptions;
718
-
719
- return {
720
- globals: configuredGlobals,
721
- ecmaVersion: normalizeEcmaVersionForLanguageOptions(ecmaVersion),
722
- sourceType,
723
- parser,
724
- parserOptions
725
- };
726
- }
727
-
728
- /**
729
- * Combines the provided globals object with the globals from environments
730
- * @param {Record<string, GlobalConf>} providedGlobals The 'globals' key in a config
731
- * @param {Environment[]} enabledEnvironments The environments enabled in configuration and with inline comments
732
- * @returns {Record<string, GlobalConf>} The resolved globals object
733
- */
734
- function resolveGlobals(providedGlobals, enabledEnvironments) {
735
- return Object.assign(
736
- Object.create(null),
737
- ...enabledEnvironments.filter(env => env.globals).map(env => env.globals),
738
- providedGlobals
739
- );
740
- }
741
-
742
- /**
743
- * Strips Unicode BOM from a given text.
744
- * @param {string} text A text to strip.
745
- * @returns {string} The stripped text.
746
- */
747
- function stripUnicodeBOM(text) {
748
-
749
- /*
750
- * Check Unicode BOM.
751
- * In JavaScript, string data is stored as UTF-16, so BOM is 0xFEFF.
752
- * http://www.ecma-international.org/ecma-262/6.0/#sec-unicode-format-control-characters
753
- */
754
- if (text.charCodeAt(0) === 0xFEFF) {
755
- return text.slice(1);
756
- }
757
- return text;
758
- }
759
-
760
- /**
761
- * Get the options for a rule (not including severity), if any
762
- * @param {Array|number} ruleConfig rule configuration
763
- * @returns {Array} of rule options, empty Array if none
764
- */
765
- function getRuleOptions(ruleConfig) {
766
- if (Array.isArray(ruleConfig)) {
767
- return ruleConfig.slice(1);
768
- }
769
- return [];
770
-
771
- }
772
-
773
- /**
774
- * Analyze scope of the given AST.
775
- * @param {ASTNode} ast The `Program` node to analyze.
776
- * @param {LanguageOptions} languageOptions The parser options.
777
- * @param {Record<string, string[]>} visitorKeys The visitor keys.
778
- * @returns {ScopeManager} The analysis result.
779
- */
780
- function analyzeScope(ast, languageOptions, visitorKeys) {
781
- const parserOptions = languageOptions.parserOptions;
782
- const ecmaFeatures = parserOptions.ecmaFeatures || {};
783
- const ecmaVersion = languageOptions.ecmaVersion || DEFAULT_ECMA_VERSION;
784
-
785
- return eslintScope.analyze(ast, {
786
- ignoreEval: true,
787
- nodejsScope: ecmaFeatures.globalReturn,
788
- impliedStrict: ecmaFeatures.impliedStrict,
789
- ecmaVersion: typeof ecmaVersion === "number" ? ecmaVersion : 6,
790
- sourceType: languageOptions.sourceType || "script",
791
- childVisitorKeys: visitorKeys || evk.KEYS,
792
- fallback: Traverser.getKeys
793
- });
794
- }
795
-
796
- /**
797
- * Parses text into an AST. Moved out here because the try-catch prevents
798
- * optimization of functions, so it's best to keep the try-catch as isolated
799
- * as possible
800
- * @param {string} text The text to parse.
801
- * @param {LanguageOptions} languageOptions Options to pass to the parser
802
- * @param {string} filePath The path to the file being parsed.
803
- * @returns {{success: false, error: LintMessage}|{success: true, sourceCode: SourceCode}}
804
- * An object containing the AST and parser services if parsing was successful, or the error if parsing failed
805
- * @private
806
- */
807
- function parse(text, languageOptions, filePath) {
808
- const textToParse = stripUnicodeBOM(text).replace(astUtils.shebangPattern, (match, captured) => `//${captured}`);
809
- const { ecmaVersion, sourceType, parser } = languageOptions;
810
- const parserOptions = Object.assign(
811
- { ecmaVersion, sourceType },
812
- languageOptions.parserOptions,
813
- {
814
- loc: true,
815
- range: true,
816
- raw: true,
817
- tokens: true,
818
- comment: true,
819
- eslintVisitorKeys: true,
820
- eslintScopeManager: true,
821
- filePath
822
- }
823
- );
824
-
825
- /*
826
- * Check for parsing errors first. If there's a parsing error, nothing
827
- * else can happen. However, a parsing error does not throw an error
828
- * from this method - it's just considered a fatal error message, a
829
- * problem that ESLint identified just like any other.
830
- */
831
- try {
832
- debug("Parsing:", filePath);
833
- const parseResult = (typeof parser.parseForESLint === "function")
834
- ? parser.parseForESLint(textToParse, parserOptions)
835
- : { ast: parser.parse(textToParse, parserOptions) };
836
-
837
- debug("Parsing successful:", filePath);
838
- const ast = parseResult.ast;
839
- const parserServices = parseResult.services || {};
840
- const visitorKeys = parseResult.visitorKeys || evk.KEYS;
841
-
842
- debug("Scope analysis:", filePath);
843
- const scopeManager = parseResult.scopeManager || analyzeScope(ast, languageOptions, visitorKeys);
844
-
845
- debug("Scope analysis successful:", filePath);
846
-
847
- return {
848
- success: true,
849
-
850
- /*
851
- * Save all values that `parseForESLint()` returned.
852
- * If a `SourceCode` object is given as the first parameter instead of source code text,
853
- * linter skips the parsing process and reuses the source code object.
854
- * In that case, linter needs all the values that `parseForESLint()` returned.
855
- */
856
- sourceCode: new SourceCode({
857
- text,
858
- ast,
859
- parserServices,
860
- scopeManager,
861
- visitorKeys
862
- })
863
- };
864
- } catch (ex) {
865
-
866
- // If the message includes a leading line number, strip it:
867
- const message = `Parsing error: ${ex.message.replace(/^line \d+:/iu, "").trim()}`;
868
-
869
- debug("%s\n%s", message, ex.stack);
870
-
871
- return {
872
- success: false,
873
- error: {
874
- ruleId: null,
875
- fatal: true,
876
- severity: 2,
877
- message,
878
- line: ex.lineNumber,
879
- column: ex.column,
880
- nodeType: null
881
- }
882
- };
883
- }
884
- }
885
-
886
- /**
887
- * Runs a rule, and gets its listeners
888
- * @param {Rule} rule A normalized rule with a `create` method
889
- * @param {Context} ruleContext The context that should be passed to the rule
890
- * @throws {any} Any error during the rule's `create`
891
- * @returns {Object} A map of selector listeners provided by the rule
892
- */
893
- function createRuleListeners(rule, ruleContext) {
894
- try {
895
- return rule.create(ruleContext);
896
- } catch (ex) {
897
- ex.message = `Error while loading rule '${ruleContext.id}': ${ex.message}`;
898
- throw ex;
899
- }
900
- }
901
-
902
- // methods that exist on SourceCode object
903
- const DEPRECATED_SOURCECODE_PASSTHROUGHS = {
904
- getSource: "getText",
905
- getSourceLines: "getLines",
906
- getAllComments: "getAllComments",
907
- getNodeByRangeIndex: "getNodeByRangeIndex",
908
- getComments: "getComments",
909
- getCommentsBefore: "getCommentsBefore",
910
- getCommentsAfter: "getCommentsAfter",
911
- getCommentsInside: "getCommentsInside",
912
- getJSDocComment: "getJSDocComment",
913
- getFirstToken: "getFirstToken",
914
- getFirstTokens: "getFirstTokens",
915
- getLastToken: "getLastToken",
916
- getLastTokens: "getLastTokens",
917
- getTokenAfter: "getTokenAfter",
918
- getTokenBefore: "getTokenBefore",
919
- getTokenByRangeStart: "getTokenByRangeStart",
920
- getTokens: "getTokens",
921
- getTokensAfter: "getTokensAfter",
922
- getTokensBefore: "getTokensBefore",
923
- getTokensBetween: "getTokensBetween"
924
- };
925
-
926
-
927
- const BASE_TRAVERSAL_CONTEXT = Object.freeze(
928
- Object.keys(DEPRECATED_SOURCECODE_PASSTHROUGHS).reduce(
929
- (contextInfo, methodName) =>
930
- Object.assign(contextInfo, {
931
- [methodName](...args) {
932
- return this.sourceCode[DEPRECATED_SOURCECODE_PASSTHROUGHS[methodName]](...args);
933
- }
934
- }),
935
- {}
936
- )
937
- );
938
-
939
- /**
940
- * Runs the given rules on the given SourceCode object
941
- * @param {SourceCode} sourceCode A SourceCode object for the given text
942
- * @param {Object} configuredRules The rules configuration
943
- * @param {function(string): Rule} ruleMapper A mapper function from rule names to rules
944
- * @param {string | undefined} parserName The name of the parser in the config
945
- * @param {LanguageOptions} languageOptions The options for parsing the code.
946
- * @param {Object} settings The settings that were enabled in the config
947
- * @param {string} filename The reported filename of the code
948
- * @param {boolean} disableFixes If true, it doesn't make `fix` properties.
949
- * @param {string | undefined} cwd cwd of the cli
950
- * @param {string} physicalFilename The full path of the file on disk without any code block information
951
- * @returns {LintMessage[]} An array of reported problems
952
- */
953
- function runRules(sourceCode, configuredRules, ruleMapper, parserName, languageOptions, settings, filename, disableFixes, cwd, physicalFilename) {
954
- const emitter = createEmitter();
955
- const nodeQueue = [];
956
- let currentNode = sourceCode.ast;
957
-
958
- Traverser.traverse(sourceCode.ast, {
959
- enter(node, parent) {
960
- node.parent = parent;
961
- nodeQueue.push({ isEntering: true, node });
962
- },
963
- leave(node) {
964
- nodeQueue.push({ isEntering: false, node });
965
- },
966
- visitorKeys: sourceCode.visitorKeys
967
- });
968
-
969
- /*
970
- * Create a frozen object with the ruleContext properties and methods that are shared by all rules.
971
- * All rule contexts will inherit from this object. This avoids the performance penalty of copying all the
972
- * properties once for each rule.
973
- */
974
- const sharedTraversalContext = Object.freeze(
975
- Object.assign(
976
- Object.create(BASE_TRAVERSAL_CONTEXT),
977
- {
978
- getAncestors: () => sourceCode.getAncestors(currentNode),
979
- getDeclaredVariables: node => sourceCode.getDeclaredVariables(node),
980
- getCwd: () => cwd,
981
- cwd,
982
- getFilename: () => filename,
983
- filename,
984
- getPhysicalFilename: () => physicalFilename || filename,
985
- physicalFilename: physicalFilename || filename,
986
- getScope: () => sourceCode.getScope(currentNode),
987
- getSourceCode: () => sourceCode,
988
- sourceCode,
989
- markVariableAsUsed: name => sourceCode.markVariableAsUsed(name, currentNode),
990
- parserOptions: {
991
- ...languageOptions.parserOptions
992
- },
993
- parserPath: parserName,
994
- languageOptions,
995
- parserServices: sourceCode.parserServices,
996
- settings
997
- }
998
- )
999
- );
1000
-
1001
- const lintingProblems = [];
1002
-
1003
- Object.keys(configuredRules).forEach(ruleId => {
1004
- const severity = ConfigOps.getRuleSeverity(configuredRules[ruleId]);
1005
-
1006
- // not load disabled rules
1007
- if (severity === 0) {
1008
- return;
1009
- }
1010
-
1011
- const rule = ruleMapper(ruleId);
1012
-
1013
- if (!rule) {
1014
- lintingProblems.push(createLintingProblem({ ruleId }));
1015
- return;
1016
- }
1017
-
1018
- const messageIds = rule.meta && rule.meta.messages;
1019
- let reportTranslator = null;
1020
- const ruleContext = Object.freeze(
1021
- Object.assign(
1022
- Object.create(sharedTraversalContext),
1023
- {
1024
- id: ruleId,
1025
- options: getRuleOptions(configuredRules[ruleId]),
1026
- report(...args) {
1027
-
1028
- /*
1029
- * Create a report translator lazily.
1030
- * In a vast majority of cases, any given rule reports zero errors on a given
1031
- * piece of code. Creating a translator lazily avoids the performance cost of
1032
- * creating a new translator function for each rule that usually doesn't get
1033
- * called.
1034
- *
1035
- * Using lazy report translators improves end-to-end performance by about 3%
1036
- * with Node 8.4.0.
1037
- */
1038
- if (reportTranslator === null) {
1039
- reportTranslator = createReportTranslator({
1040
- ruleId,
1041
- severity,
1042
- sourceCode,
1043
- messageIds,
1044
- disableFixes
1045
- });
1046
- }
1047
- const problem = reportTranslator(...args);
1048
-
1049
- if (problem.fix && !(rule.meta && rule.meta.fixable)) {
1050
- throw new Error("Fixable rules must set the `meta.fixable` property to \"code\" or \"whitespace\".");
1051
- }
1052
- if (problem.suggestions && !(rule.meta && rule.meta.hasSuggestions === true)) {
1053
- if (rule.meta && rule.meta.docs && typeof rule.meta.docs.suggestion !== "undefined") {
1054
-
1055
- // Encourage migration from the former property name.
1056
- throw new Error("Rules with suggestions must set the `meta.hasSuggestions` property to `true`. `meta.docs.suggestion` is ignored by ESLint.");
1057
- }
1058
- throw new Error("Rules with suggestions must set the `meta.hasSuggestions` property to `true`.");
1059
- }
1060
- lintingProblems.push(problem);
1061
- }
1062
- }
1063
- )
1064
- );
1065
-
1066
- const ruleListeners = timing.enabled ? timing.time(ruleId, createRuleListeners)(rule, ruleContext) : createRuleListeners(rule, ruleContext);
1067
-
1068
- /**
1069
- * Include `ruleId` in error logs
1070
- * @param {Function} ruleListener A rule method that listens for a node.
1071
- * @returns {Function} ruleListener wrapped in error handler
1072
- */
1073
- function addRuleErrorHandler(ruleListener) {
1074
- return function ruleErrorHandler(...listenerArgs) {
1075
- try {
1076
- return ruleListener(...listenerArgs);
1077
- } catch (e) {
1078
- e.ruleId = ruleId;
1079
- throw e;
1080
- }
1081
- };
1082
- }
1083
-
1084
- if (typeof ruleListeners === "undefined" || ruleListeners === null) {
1085
- throw new Error(`The create() function for rule '${ruleId}' did not return an object.`);
1086
- }
1087
-
1088
- // add all the selectors from the rule as listeners
1089
- Object.keys(ruleListeners).forEach(selector => {
1090
- const ruleListener = timing.enabled
1091
- ? timing.time(ruleId, ruleListeners[selector])
1092
- : ruleListeners[selector];
1093
-
1094
- emitter.on(
1095
- selector,
1096
- addRuleErrorHandler(ruleListener)
1097
- );
1098
- });
1099
- });
1100
-
1101
- // only run code path analyzer if the top level node is "Program", skip otherwise
1102
- const eventGenerator = nodeQueue[0].node.type === "Program"
1103
- ? new CodePathAnalyzer(new NodeEventGenerator(emitter, { visitorKeys: sourceCode.visitorKeys, fallback: Traverser.getKeys }))
1104
- : new NodeEventGenerator(emitter, { visitorKeys: sourceCode.visitorKeys, fallback: Traverser.getKeys });
1105
-
1106
- nodeQueue.forEach(traversalInfo => {
1107
- currentNode = traversalInfo.node;
1108
-
1109
- try {
1110
- if (traversalInfo.isEntering) {
1111
- eventGenerator.enterNode(currentNode);
1112
- } else {
1113
- eventGenerator.leaveNode(currentNode);
1114
- }
1115
- } catch (err) {
1116
- err.currentNode = currentNode;
1117
- throw err;
1118
- }
1119
- });
1120
-
1121
- return lintingProblems;
1122
- }
1123
-
1124
- /**
1125
- * Ensure the source code to be a string.
1126
- * @param {string|SourceCode} textOrSourceCode The text or source code object.
1127
- * @returns {string} The source code text.
1128
- */
1129
- function ensureText(textOrSourceCode) {
1130
- if (typeof textOrSourceCode === "object") {
1131
- const { hasBOM, text } = textOrSourceCode;
1132
- const bom = hasBOM ? "\uFEFF" : "";
1133
-
1134
- return bom + text;
1135
- }
1136
-
1137
- return String(textOrSourceCode);
1138
- }
1139
-
1140
- /**
1141
- * Get an environment.
1142
- * @param {LinterInternalSlots} slots The internal slots of Linter.
1143
- * @param {string} envId The environment ID to get.
1144
- * @returns {Environment|null} The environment.
1145
- */
1146
- function getEnv(slots, envId) {
1147
- return (
1148
- (slots.lastConfigArray && slots.lastConfigArray.pluginEnvironments.get(envId)) ||
1149
- BuiltInEnvironments.get(envId) ||
1150
- null
1151
- );
1152
- }
1153
-
1154
- /**
1155
- * Get a rule.
1156
- * @param {LinterInternalSlots} slots The internal slots of Linter.
1157
- * @param {string} ruleId The rule ID to get.
1158
- * @returns {Rule|null} The rule.
1159
- */
1160
- function getRule(slots, ruleId) {
1161
- return (
1162
- (slots.lastConfigArray && slots.lastConfigArray.pluginRules.get(ruleId)) ||
1163
- slots.ruleMap.get(ruleId)
1164
- );
1165
- }
1166
-
1167
- /**
1168
- * Normalize the value of the cwd
1169
- * @param {string | undefined} cwd raw value of the cwd, path to a directory that should be considered as the current working directory, can be undefined.
1170
- * @returns {string | undefined} normalized cwd
1171
- */
1172
- function normalizeCwd(cwd) {
1173
- if (cwd) {
1174
- return cwd;
1175
- }
1176
- if (typeof process === "object") {
1177
- return process.cwd();
1178
- }
1179
-
1180
- // It's more explicit to assign the undefined
1181
- // eslint-disable-next-line no-undefined -- Consistently returning a value
1182
- return undefined;
1183
- }
1184
-
1185
- /**
1186
- * The map to store private data.
1187
- * @type {WeakMap<Linter, LinterInternalSlots>}
1188
- */
1189
- const internalSlotsMap = new WeakMap();
1190
-
1191
- /**
1192
- * Throws an error when the given linter is in flat config mode.
1193
- * @param {Linter} linter The linter to check.
1194
- * @returns {void}
1195
- * @throws {Error} If the linter is in flat config mode.
1196
- */
1197
- function assertEslintrcConfig(linter) {
1198
- const { configType } = internalSlotsMap.get(linter);
1199
-
1200
- if (configType === "flat") {
1201
- throw new Error("This method cannot be used with flat config. Add your entries directly into the config array.");
1202
- }
1203
- }
1204
-
1205
-
1206
- //------------------------------------------------------------------------------
1207
- // Public Interface
1208
- //------------------------------------------------------------------------------
1209
-
1210
- /**
1211
- * Object that is responsible for verifying JavaScript text
1212
- * @name Linter
1213
- */
1214
- class Linter {
1215
-
1216
- /**
1217
- * Initialize the Linter.
1218
- * @param {Object} [config] the config object
1219
- * @param {string} [config.cwd] path to a directory that should be considered as the current working directory, can be undefined.
1220
- * @param {"flat"|"eslintrc"} [config.configType="eslintrc"] the type of config used.
1221
- */
1222
- constructor({ cwd, configType } = {}) {
1223
- internalSlotsMap.set(this, {
1224
- cwd: normalizeCwd(cwd),
1225
- lastConfigArray: null,
1226
- lastSourceCode: null,
1227
- lastSuppressedMessages: [],
1228
- configType, // TODO: Remove after flat config conversion
1229
- parserMap: new Map([["espree", espree]]),
1230
- ruleMap: new Rules()
1231
- });
1232
-
1233
- this.version = pkg.version;
1234
- }
1235
-
1236
- /**
1237
- * Getter for package version.
1238
- * @static
1239
- * @returns {string} The version from package.json.
1240
- */
1241
- static get version() {
1242
- return pkg.version;
1243
- }
1244
-
1245
- /**
1246
- * Same as linter.verify, except without support for processors.
1247
- * @param {string|SourceCode} textOrSourceCode The text to parse or a SourceCode object.
1248
- * @param {ConfigData} providedConfig An ESLintConfig instance to configure everything.
1249
- * @param {VerifyOptions} [providedOptions] The optional filename of the file being checked.
1250
- * @throws {Error} If during rule execution.
1251
- * @returns {(LintMessage|SuppressedLintMessage)[]} The results as an array of messages or an empty array if no messages.
1252
- */
1253
- _verifyWithoutProcessors(textOrSourceCode, providedConfig, providedOptions) {
1254
- const slots = internalSlotsMap.get(this);
1255
- const config = providedConfig || {};
1256
- const options = normalizeVerifyOptions(providedOptions, config);
1257
- let text;
1258
-
1259
- // evaluate arguments
1260
- if (typeof textOrSourceCode === "string") {
1261
- slots.lastSourceCode = null;
1262
- text = textOrSourceCode;
1263
- } else {
1264
- slots.lastSourceCode = textOrSourceCode;
1265
- text = textOrSourceCode.text;
1266
- }
1267
-
1268
- // Resolve parser.
1269
- let parserName = DEFAULT_PARSER_NAME;
1270
- let parser = espree;
1271
-
1272
- if (typeof config.parser === "object" && config.parser !== null) {
1273
- parserName = config.parser.filePath;
1274
- parser = config.parser.definition;
1275
- } else if (typeof config.parser === "string") {
1276
- if (!slots.parserMap.has(config.parser)) {
1277
- return [{
1278
- ruleId: null,
1279
- fatal: true,
1280
- severity: 2,
1281
- message: `Configured parser '${config.parser}' was not found.`,
1282
- line: 0,
1283
- column: 0,
1284
- nodeType: null
1285
- }];
1286
- }
1287
- parserName = config.parser;
1288
- parser = slots.parserMap.get(config.parser);
1289
- }
1290
-
1291
- // search and apply "eslint-env *".
1292
- const envInFile = options.allowInlineConfig && !options.warnInlineConfig
1293
- ? findEslintEnv(text)
1294
- : {};
1295
- const resolvedEnvConfig = Object.assign({ builtin: true }, config.env, envInFile);
1296
- const enabledEnvs = Object.keys(resolvedEnvConfig)
1297
- .filter(envName => resolvedEnvConfig[envName])
1298
- .map(envName => getEnv(slots, envName))
1299
- .filter(env => env);
1300
-
1301
- const parserOptions = resolveParserOptions(parser, config.parserOptions || {}, enabledEnvs);
1302
- const configuredGlobals = resolveGlobals(config.globals || {}, enabledEnvs);
1303
- const settings = config.settings || {};
1304
- const languageOptions = createLanguageOptions({
1305
- globals: config.globals,
1306
- parser,
1307
- parserOptions
1308
- });
1309
-
1310
- if (!slots.lastSourceCode) {
1311
- const parseResult = parse(
1312
- text,
1313
- languageOptions,
1314
- options.filename
1315
- );
1316
-
1317
- if (!parseResult.success) {
1318
- return [parseResult.error];
1319
- }
1320
-
1321
- slots.lastSourceCode = parseResult.sourceCode;
1322
- } else {
1323
-
1324
- /*
1325
- * If the given source code object as the first argument does not have scopeManager, analyze the scope.
1326
- * This is for backward compatibility (SourceCode is frozen so it cannot rebind).
1327
- */
1328
- if (!slots.lastSourceCode.scopeManager) {
1329
- slots.lastSourceCode = new SourceCode({
1330
- text: slots.lastSourceCode.text,
1331
- ast: slots.lastSourceCode.ast,
1332
- parserServices: slots.lastSourceCode.parserServices,
1333
- visitorKeys: slots.lastSourceCode.visitorKeys,
1334
- scopeManager: analyzeScope(slots.lastSourceCode.ast, languageOptions)
1335
- });
1336
- }
1337
- }
1338
-
1339
- const sourceCode = slots.lastSourceCode;
1340
- const commentDirectives = options.allowInlineConfig
1341
- ? getDirectiveComments(sourceCode, ruleId => getRule(slots, ruleId), options.warnInlineConfig)
1342
- : { configuredRules: {}, enabledGlobals: {}, exportedVariables: {}, problems: [], disableDirectives: [] };
1343
-
1344
- // augment global scope with declared global variables
1345
- addDeclaredGlobals(
1346
- sourceCode.scopeManager.scopes[0],
1347
- configuredGlobals,
1348
- { exportedVariables: commentDirectives.exportedVariables, enabledGlobals: commentDirectives.enabledGlobals }
1349
- );
1350
-
1351
- const configuredRules = Object.assign({}, config.rules, commentDirectives.configuredRules);
1352
- let lintingProblems;
1353
-
1354
- try {
1355
- lintingProblems = runRules(
1356
- sourceCode,
1357
- configuredRules,
1358
- ruleId => getRule(slots, ruleId),
1359
- parserName,
1360
- languageOptions,
1361
- settings,
1362
- options.filename,
1363
- options.disableFixes,
1364
- slots.cwd,
1365
- providedOptions.physicalFilename
1366
- );
1367
- } catch (err) {
1368
- err.message += `\nOccurred while linting ${options.filename}`;
1369
- debug("An error occurred while traversing");
1370
- debug("Filename:", options.filename);
1371
- if (err.currentNode) {
1372
- const { line } = err.currentNode.loc.start;
1373
-
1374
- debug("Line:", line);
1375
- err.message += `:${line}`;
1376
- }
1377
- debug("Parser Options:", parserOptions);
1378
- debug("Parser Path:", parserName);
1379
- debug("Settings:", settings);
1380
-
1381
- if (err.ruleId) {
1382
- err.message += `\nRule: "${err.ruleId}"`;
1383
- }
1384
-
1385
- throw err;
1386
- }
1387
-
1388
- return applyDisableDirectives({
1389
- directives: commentDirectives.disableDirectives,
1390
- disableFixes: options.disableFixes,
1391
- problems: lintingProblems
1392
- .concat(commentDirectives.problems)
1393
- .sort((problemA, problemB) => problemA.line - problemB.line || problemA.column - problemB.column),
1394
- reportUnusedDisableDirectives: options.reportUnusedDisableDirectives
1395
- });
1396
- }
1397
-
1398
- /**
1399
- * Verifies the text against the rules specified by the second argument.
1400
- * @param {string|SourceCode} textOrSourceCode The text to parse or a SourceCode object.
1401
- * @param {ConfigData|ConfigArray} config An ESLintConfig instance to configure everything.
1402
- * @param {(string|(VerifyOptions&ProcessorOptions))} [filenameOrOptions] The optional filename of the file being checked.
1403
- * If this is not set, the filename will default to '<input>' in the rule context. If
1404
- * an object, then it has "filename", "allowInlineConfig", and some properties.
1405
- * @returns {LintMessage[]} The results as an array of messages or an empty array if no messages.
1406
- */
1407
- verify(textOrSourceCode, config, filenameOrOptions) {
1408
- debug("Verify");
1409
-
1410
- const { configType, cwd } = internalSlotsMap.get(this);
1411
-
1412
- const options = typeof filenameOrOptions === "string"
1413
- ? { filename: filenameOrOptions }
1414
- : filenameOrOptions || {};
1415
-
1416
- if (config) {
1417
- if (configType === "flat") {
1418
-
1419
- /*
1420
- * Because of how Webpack packages up the files, we can't
1421
- * compare directly to `FlatConfigArray` using `instanceof`
1422
- * because it's not the same `FlatConfigArray` as in the tests.
1423
- * So, we work around it by assuming an array is, in fact, a
1424
- * `FlatConfigArray` if it has a `getConfig()` method.
1425
- */
1426
- let configArray = config;
1427
-
1428
- if (!Array.isArray(config) || typeof config.getConfig !== "function") {
1429
- configArray = new FlatConfigArray(config, { basePath: cwd });
1430
- configArray.normalizeSync();
1431
- }
1432
-
1433
- return this._distinguishSuppressedMessages(this._verifyWithFlatConfigArray(textOrSourceCode, configArray, options, true));
1434
- }
1435
-
1436
- if (typeof config.extractConfig === "function") {
1437
- return this._distinguishSuppressedMessages(this._verifyWithConfigArray(textOrSourceCode, config, options));
1438
- }
1439
- }
1440
-
1441
- /*
1442
- * If we get to here, it means `config` is just an object rather
1443
- * than a config array so we can go right into linting.
1444
- */
1445
-
1446
- /*
1447
- * `Linter` doesn't support `overrides` property in configuration.
1448
- * So we cannot apply multiple processors.
1449
- */
1450
- if (options.preprocess || options.postprocess) {
1451
- return this._distinguishSuppressedMessages(this._verifyWithProcessor(textOrSourceCode, config, options));
1452
- }
1453
- return this._distinguishSuppressedMessages(this._verifyWithoutProcessors(textOrSourceCode, config, options));
1454
- }
1455
-
1456
- /**
1457
- * Verify with a processor.
1458
- * @param {string|SourceCode} textOrSourceCode The source code.
1459
- * @param {FlatConfig} config The config array.
1460
- * @param {VerifyOptions&ProcessorOptions} options The options.
1461
- * @param {FlatConfigArray} [configForRecursive] The `ConfigArray` object to apply multiple processors recursively.
1462
- * @returns {(LintMessage|SuppressedLintMessage)[]} The found problems.
1463
- */
1464
- _verifyWithFlatConfigArrayAndProcessor(textOrSourceCode, config, options, configForRecursive) {
1465
- const filename = options.filename || "<input>";
1466
- const filenameToExpose = normalizeFilename(filename);
1467
- const physicalFilename = options.physicalFilename || filenameToExpose;
1468
- const text = ensureText(textOrSourceCode);
1469
- const preprocess = options.preprocess || (rawText => [rawText]);
1470
- const postprocess = options.postprocess || (messagesList => messagesList.flat());
1471
- const filterCodeBlock =
1472
- options.filterCodeBlock ||
1473
- (blockFilename => blockFilename.endsWith(".js"));
1474
- const originalExtname = path.extname(filename);
1475
-
1476
- let blocks;
1477
-
1478
- try {
1479
- blocks = preprocess(text, filenameToExpose);
1480
- } catch (ex) {
1481
-
1482
- // If the message includes a leading line number, strip it:
1483
- const message = `Preprocessing error: ${ex.message.replace(/^line \d+:/iu, "").trim()}`;
1484
-
1485
- debug("%s\n%s", message, ex.stack);
1486
-
1487
- return [
1488
- {
1489
- ruleId: null,
1490
- fatal: true,
1491
- severity: 2,
1492
- message,
1493
- line: ex.lineNumber,
1494
- column: ex.column,
1495
- nodeType: null
1496
- }
1497
- ];
1498
- }
1499
-
1500
- const messageLists = blocks.map((block, i) => {
1501
- debug("A code block was found: %o", block.filename || "(unnamed)");
1502
-
1503
- // Keep the legacy behavior.
1504
- if (typeof block === "string") {
1505
- return this._verifyWithFlatConfigArrayAndWithoutProcessors(block, config, options);
1506
- }
1507
-
1508
- const blockText = block.text;
1509
- const blockName = path.join(filename, `${i}_${block.filename}`);
1510
-
1511
- // Skip this block if filtered.
1512
- if (!filterCodeBlock(blockName, blockText)) {
1513
- debug("This code block was skipped.");
1514
- return [];
1515
- }
1516
-
1517
- // Resolve configuration again if the file content or extension was changed.
1518
- if (configForRecursive && (text !== blockText || path.extname(blockName) !== originalExtname)) {
1519
- debug("Resolving configuration again because the file content or extension was changed.");
1520
- return this._verifyWithFlatConfigArray(
1521
- blockText,
1522
- configForRecursive,
1523
- { ...options, filename: blockName, physicalFilename }
1524
- );
1525
- }
1526
-
1527
- // Does lint.
1528
- return this._verifyWithFlatConfigArrayAndWithoutProcessors(
1529
- blockText,
1530
- config,
1531
- { ...options, filename: blockName, physicalFilename }
1532
- );
1533
- });
1534
-
1535
- return postprocess(messageLists, filenameToExpose);
1536
- }
1537
-
1538
- /**
1539
- * Same as linter.verify, except without support for processors.
1540
- * @param {string|SourceCode} textOrSourceCode The text to parse or a SourceCode object.
1541
- * @param {FlatConfig} providedConfig An ESLintConfig instance to configure everything.
1542
- * @param {VerifyOptions} [providedOptions] The optional filename of the file being checked.
1543
- * @throws {Error} If during rule execution.
1544
- * @returns {(LintMessage|SuppressedLintMessage)[]} The results as an array of messages or an empty array if no messages.
1545
- */
1546
- _verifyWithFlatConfigArrayAndWithoutProcessors(textOrSourceCode, providedConfig, providedOptions) {
1547
- const slots = internalSlotsMap.get(this);
1548
- const config = providedConfig || {};
1549
- const options = normalizeVerifyOptions(providedOptions, config);
1550
- let text;
1551
-
1552
- // evaluate arguments
1553
- if (typeof textOrSourceCode === "string") {
1554
- slots.lastSourceCode = null;
1555
- text = textOrSourceCode;
1556
- } else {
1557
- slots.lastSourceCode = textOrSourceCode;
1558
- text = textOrSourceCode.text;
1559
- }
1560
-
1561
- const languageOptions = config.languageOptions;
1562
-
1563
- languageOptions.ecmaVersion = normalizeEcmaVersionForLanguageOptions(
1564
- languageOptions.ecmaVersion
1565
- );
1566
-
1567
- // double check that there is a parser to avoid mysterious error messages
1568
- if (!languageOptions.parser) {
1569
- throw new TypeError(`No parser specified for ${options.filename}`);
1570
- }
1571
-
1572
- // Espree expects this information to be passed in
1573
- if (isEspree(languageOptions.parser)) {
1574
- const parserOptions = languageOptions.parserOptions;
1575
-
1576
- if (languageOptions.sourceType) {
1577
-
1578
- parserOptions.sourceType = languageOptions.sourceType;
1579
-
1580
- if (
1581
- parserOptions.sourceType === "module" &&
1582
- parserOptions.ecmaFeatures &&
1583
- parserOptions.ecmaFeatures.globalReturn
1584
- ) {
1585
- parserOptions.ecmaFeatures.globalReturn = false;
1586
- }
1587
- }
1588
- }
1589
-
1590
- const settings = config.settings || {};
1591
-
1592
- if (!slots.lastSourceCode) {
1593
- const parseResult = parse(
1594
- text,
1595
- languageOptions,
1596
- options.filename
1597
- );
1598
-
1599
- if (!parseResult.success) {
1600
- return [parseResult.error];
1601
- }
1602
-
1603
- slots.lastSourceCode = parseResult.sourceCode;
1604
- } else {
1605
-
1606
- /*
1607
- * If the given source code object as the first argument does not have scopeManager, analyze the scope.
1608
- * This is for backward compatibility (SourceCode is frozen so it cannot rebind).
1609
- */
1610
- if (!slots.lastSourceCode.scopeManager) {
1611
- slots.lastSourceCode = new SourceCode({
1612
- text: slots.lastSourceCode.text,
1613
- ast: slots.lastSourceCode.ast,
1614
- parserServices: slots.lastSourceCode.parserServices,
1615
- visitorKeys: slots.lastSourceCode.visitorKeys,
1616
- scopeManager: analyzeScope(slots.lastSourceCode.ast, languageOptions)
1617
- });
1618
- }
1619
- }
1620
-
1621
- const sourceCode = slots.lastSourceCode;
1622
-
1623
- /*
1624
- * Make adjustments based on the language options. For JavaScript,
1625
- * this is primarily about adding variables into the global scope
1626
- * to account for ecmaVersion and configured globals.
1627
- */
1628
- sourceCode.applyLanguageOptions(languageOptions);
1629
-
1630
- const mergedInlineConfig = {
1631
- rules: {}
1632
- };
1633
- const inlineConfigProblems = [];
1634
-
1635
- /*
1636
- * Inline config can be either enabled or disabled. If disabled, it's possible
1637
- * to detect the inline config and emit a warning (though this is not required).
1638
- * So we first check to see if inline config is allowed at all, and if so, we
1639
- * need to check if it's a warning or not.
1640
- */
1641
- if (options.allowInlineConfig) {
1642
-
1643
- // if inline config should warn then add the warnings
1644
- if (options.warnInlineConfig) {
1645
- sourceCode.getInlineConfigNodes().forEach(node => {
1646
- inlineConfigProblems.push(createLintingProblem({
1647
- ruleId: null,
1648
- message: `'${sourceCode.text.slice(node.range[0], node.range[1])}' has no effect because you have 'noInlineConfig' setting in ${options.warnInlineConfig}.`,
1649
- loc: node.loc,
1650
- severity: 1
1651
- }));
1652
-
1653
- });
1654
- } else {
1655
- const inlineConfigResult = sourceCode.applyInlineConfig();
1656
-
1657
- inlineConfigProblems.push(
1658
- ...inlineConfigResult.problems
1659
- .map(createLintingProblem)
1660
- .map(problem => {
1661
- problem.fatal = true;
1662
- return problem;
1663
- })
1664
- );
1665
-
1666
- // next we need to verify information about the specified rules
1667
- const ruleValidator = new RuleValidator();
1668
-
1669
- for (const { config: inlineConfig, node } of inlineConfigResult.configs) {
1670
-
1671
- Object.keys(inlineConfig.rules).forEach(ruleId => {
1672
- const rule = getRuleFromConfig(ruleId, config);
1673
- const ruleValue = inlineConfig.rules[ruleId];
1674
-
1675
- if (!rule) {
1676
- inlineConfigProblems.push(createLintingProblem({ ruleId, loc: node.loc }));
1677
- return;
1678
- }
1679
-
1680
- try {
1681
-
1682
- const ruleOptions = Array.isArray(ruleValue) ? ruleValue : [ruleValue];
1683
-
1684
- assertIsRuleOptions(ruleId, ruleValue);
1685
- assertIsRuleSeverity(ruleId, ruleOptions[0]);
1686
-
1687
- ruleValidator.validate({
1688
- plugins: config.plugins,
1689
- rules: {
1690
- [ruleId]: ruleOptions
1691
- }
1692
- });
1693
- mergedInlineConfig.rules[ruleId] = ruleValue;
1694
- } catch (err) {
1695
-
1696
- let baseMessage = err.message.slice(
1697
- err.message.startsWith("Key \"rules\":")
1698
- ? err.message.indexOf(":", 12) + 1
1699
- : err.message.indexOf(":") + 1
1700
- ).trim();
1701
-
1702
- if (err.messageTemplate) {
1703
- baseMessage += ` You passed "${ruleValue}".`;
1704
- }
1705
-
1706
- inlineConfigProblems.push(createLintingProblem({
1707
- ruleId,
1708
- message: `Inline configuration for rule "${ruleId}" is invalid:\n\t${baseMessage}\n`,
1709
- loc: node.loc
1710
- }));
1711
- }
1712
- });
1713
- }
1714
- }
1715
- }
1716
-
1717
- const commentDirectives = options.allowInlineConfig && !options.warnInlineConfig
1718
- ? getDirectiveCommentsForFlatConfig(
1719
- sourceCode,
1720
- ruleId => getRuleFromConfig(ruleId, config)
1721
- )
1722
- : { problems: [], disableDirectives: [] };
1723
-
1724
- const configuredRules = Object.assign({}, config.rules, mergedInlineConfig.rules);
1725
- let lintingProblems;
1726
-
1727
- sourceCode.finalize();
1728
-
1729
- try {
1730
- lintingProblems = runRules(
1731
- sourceCode,
1732
- configuredRules,
1733
- ruleId => getRuleFromConfig(ruleId, config),
1734
- void 0,
1735
- languageOptions,
1736
- settings,
1737
- options.filename,
1738
- options.disableFixes,
1739
- slots.cwd,
1740
- providedOptions.physicalFilename
1741
- );
1742
- } catch (err) {
1743
- err.message += `\nOccurred while linting ${options.filename}`;
1744
- debug("An error occurred while traversing");
1745
- debug("Filename:", options.filename);
1746
- if (err.currentNode) {
1747
- const { line } = err.currentNode.loc.start;
1748
-
1749
- debug("Line:", line);
1750
- err.message += `:${line}`;
1751
- }
1752
- debug("Parser Options:", languageOptions.parserOptions);
1753
-
1754
- // debug("Parser Path:", parserName);
1755
- debug("Settings:", settings);
1756
-
1757
- if (err.ruleId) {
1758
- err.message += `\nRule: "${err.ruleId}"`;
1759
- }
1760
-
1761
- throw err;
1762
- }
1763
-
1764
- return applyDisableDirectives({
1765
- directives: commentDirectives.disableDirectives,
1766
- disableFixes: options.disableFixes,
1767
- problems: lintingProblems
1768
- .concat(commentDirectives.problems)
1769
- .concat(inlineConfigProblems)
1770
- .sort((problemA, problemB) => problemA.line - problemB.line || problemA.column - problemB.column),
1771
- reportUnusedDisableDirectives: options.reportUnusedDisableDirectives
1772
- });
1773
- }
1774
-
1775
- /**
1776
- * Verify a given code with `ConfigArray`.
1777
- * @param {string|SourceCode} textOrSourceCode The source code.
1778
- * @param {ConfigArray} configArray The config array.
1779
- * @param {VerifyOptions&ProcessorOptions} options The options.
1780
- * @returns {(LintMessage|SuppressedLintMessage)[]} The found problems.
1781
- */
1782
- _verifyWithConfigArray(textOrSourceCode, configArray, options) {
1783
- debug("With ConfigArray: %s", options.filename);
1784
-
1785
- // Store the config array in order to get plugin envs and rules later.
1786
- internalSlotsMap.get(this).lastConfigArray = configArray;
1787
-
1788
- // Extract the final config for this file.
1789
- const config = configArray.extractConfig(options.filename);
1790
- const processor =
1791
- config.processor &&
1792
- configArray.pluginProcessors.get(config.processor);
1793
-
1794
- // Verify.
1795
- if (processor) {
1796
- debug("Apply the processor: %o", config.processor);
1797
- const { preprocess, postprocess, supportsAutofix } = processor;
1798
- const disableFixes = options.disableFixes || !supportsAutofix;
1799
-
1800
- return this._verifyWithProcessor(
1801
- textOrSourceCode,
1802
- config,
1803
- { ...options, disableFixes, postprocess, preprocess },
1804
- configArray
1805
- );
1806
- }
1807
- return this._verifyWithoutProcessors(textOrSourceCode, config, options);
1808
- }
1809
-
1810
- /**
1811
- * Verify a given code with a flat config.
1812
- * @param {string|SourceCode} textOrSourceCode The source code.
1813
- * @param {FlatConfigArray} configArray The config array.
1814
- * @param {VerifyOptions&ProcessorOptions} options The options.
1815
- * @param {boolean} [firstCall=false] Indicates if this is being called directly
1816
- * from verify(). (TODO: Remove once eslintrc is removed.)
1817
- * @returns {(LintMessage|SuppressedLintMessage)[]} The found problems.
1818
- */
1819
- _verifyWithFlatConfigArray(textOrSourceCode, configArray, options, firstCall = false) {
1820
- debug("With flat config: %s", options.filename);
1821
-
1822
- // we need a filename to match configs against
1823
- const filename = options.filename || "__placeholder__.js";
1824
-
1825
- // Store the config array in order to get plugin envs and rules later.
1826
- internalSlotsMap.get(this).lastConfigArray = configArray;
1827
- const config = configArray.getConfig(filename);
1828
-
1829
- if (!config) {
1830
- return [
1831
- {
1832
- ruleId: null,
1833
- severity: 1,
1834
- message: `No matching configuration found for ${filename}.`,
1835
- line: 0,
1836
- column: 0,
1837
- nodeType: null
1838
- }
1839
- ];
1840
- }
1841
-
1842
- // Verify.
1843
- if (config.processor) {
1844
- debug("Apply the processor: %o", config.processor);
1845
- const { preprocess, postprocess, supportsAutofix } = config.processor;
1846
- const disableFixes = options.disableFixes || !supportsAutofix;
1847
-
1848
- return this._verifyWithFlatConfigArrayAndProcessor(
1849
- textOrSourceCode,
1850
- config,
1851
- { ...options, filename, disableFixes, postprocess, preprocess },
1852
- configArray
1853
- );
1854
- }
1855
-
1856
- // check for options-based processing
1857
- if (firstCall && (options.preprocess || options.postprocess)) {
1858
- return this._verifyWithFlatConfigArrayAndProcessor(textOrSourceCode, config, options);
1859
- }
1860
-
1861
- return this._verifyWithFlatConfigArrayAndWithoutProcessors(textOrSourceCode, config, options);
1862
- }
1863
-
1864
- /**
1865
- * Verify with a processor.
1866
- * @param {string|SourceCode} textOrSourceCode The source code.
1867
- * @param {ConfigData|ExtractedConfig} config The config array.
1868
- * @param {VerifyOptions&ProcessorOptions} options The options.
1869
- * @param {ConfigArray} [configForRecursive] The `ConfigArray` object to apply multiple processors recursively.
1870
- * @returns {(LintMessage|SuppressedLintMessage)[]} The found problems.
1871
- */
1872
- _verifyWithProcessor(textOrSourceCode, config, options, configForRecursive) {
1873
- const filename = options.filename || "<input>";
1874
- const filenameToExpose = normalizeFilename(filename);
1875
- const physicalFilename = options.physicalFilename || filenameToExpose;
1876
- const text = ensureText(textOrSourceCode);
1877
- const preprocess = options.preprocess || (rawText => [rawText]);
1878
- const postprocess = options.postprocess || (messagesList => messagesList.flat());
1879
- const filterCodeBlock =
1880
- options.filterCodeBlock ||
1881
- (blockFilename => blockFilename.endsWith(".js"));
1882
- const originalExtname = path.extname(filename);
1883
-
1884
- let blocks;
1885
-
1886
- try {
1887
- blocks = preprocess(text, filenameToExpose);
1888
- } catch (ex) {
1889
-
1890
- // If the message includes a leading line number, strip it:
1891
- const message = `Preprocessing error: ${ex.message.replace(/^line \d+:/iu, "").trim()}`;
1892
-
1893
- debug("%s\n%s", message, ex.stack);
1894
-
1895
- return [
1896
- {
1897
- ruleId: null,
1898
- fatal: true,
1899
- severity: 2,
1900
- message,
1901
- line: ex.lineNumber,
1902
- column: ex.column,
1903
- nodeType: null
1904
- }
1905
- ];
1906
- }
1907
-
1908
- const messageLists = blocks.map((block, i) => {
1909
- debug("A code block was found: %o", block.filename || "(unnamed)");
1910
-
1911
- // Keep the legacy behavior.
1912
- if (typeof block === "string") {
1913
- return this._verifyWithoutProcessors(block, config, options);
1914
- }
1915
-
1916
- const blockText = block.text;
1917
- const blockName = path.join(filename, `${i}_${block.filename}`);
1918
-
1919
- // Skip this block if filtered.
1920
- if (!filterCodeBlock(blockName, blockText)) {
1921
- debug("This code block was skipped.");
1922
- return [];
1923
- }
1924
-
1925
- // Resolve configuration again if the file content or extension was changed.
1926
- if (configForRecursive && (text !== blockText || path.extname(blockName) !== originalExtname)) {
1927
- debug("Resolving configuration again because the file content or extension was changed.");
1928
- return this._verifyWithConfigArray(
1929
- blockText,
1930
- configForRecursive,
1931
- { ...options, filename: blockName, physicalFilename }
1932
- );
1933
- }
1934
-
1935
- // Does lint.
1936
- return this._verifyWithoutProcessors(
1937
- blockText,
1938
- config,
1939
- { ...options, filename: blockName, physicalFilename }
1940
- );
1941
- });
1942
-
1943
- return postprocess(messageLists, filenameToExpose);
1944
- }
1945
-
1946
- /**
1947
- * Given a list of reported problems, distinguish problems between normal messages and suppressed messages.
1948
- * The normal messages will be returned and the suppressed messages will be stored as lastSuppressedMessages.
1949
- * @param {Array<LintMessage|SuppressedLintMessage>} problems A list of reported problems.
1950
- * @returns {LintMessage[]} A list of LintMessage.
1951
- */
1952
- _distinguishSuppressedMessages(problems) {
1953
- const messages = [];
1954
- const suppressedMessages = [];
1955
- const slots = internalSlotsMap.get(this);
1956
-
1957
- for (const problem of problems) {
1958
- if (problem.suppressions) {
1959
- suppressedMessages.push(problem);
1960
- } else {
1961
- messages.push(problem);
1962
- }
1963
- }
1964
-
1965
- slots.lastSuppressedMessages = suppressedMessages;
1966
-
1967
- return messages;
1968
- }
1969
-
1970
- /**
1971
- * Gets the SourceCode object representing the parsed source.
1972
- * @returns {SourceCode} The SourceCode object.
1973
- */
1974
- getSourceCode() {
1975
- return internalSlotsMap.get(this).lastSourceCode;
1976
- }
1977
-
1978
- /**
1979
- * Gets the list of SuppressedLintMessage produced in the last running.
1980
- * @returns {SuppressedLintMessage[]} The list of SuppressedLintMessage
1981
- */
1982
- getSuppressedMessages() {
1983
- return internalSlotsMap.get(this).lastSuppressedMessages;
1984
- }
1985
-
1986
- /**
1987
- * Defines a new linting rule.
1988
- * @param {string} ruleId A unique rule identifier
1989
- * @param {Function | Rule} ruleModule Function from context to object mapping AST node types to event handlers
1990
- * @returns {void}
1991
- */
1992
- defineRule(ruleId, ruleModule) {
1993
- assertEslintrcConfig(this);
1994
- internalSlotsMap.get(this).ruleMap.define(ruleId, ruleModule);
1995
- }
1996
-
1997
- /**
1998
- * Defines many new linting rules.
1999
- * @param {Record<string, Function | Rule>} rulesToDefine map from unique rule identifier to rule
2000
- * @returns {void}
2001
- */
2002
- defineRules(rulesToDefine) {
2003
- assertEslintrcConfig(this);
2004
- Object.getOwnPropertyNames(rulesToDefine).forEach(ruleId => {
2005
- this.defineRule(ruleId, rulesToDefine[ruleId]);
2006
- });
2007
- }
2008
-
2009
- /**
2010
- * Gets an object with all loaded rules.
2011
- * @returns {Map<string, Rule>} All loaded rules
2012
- */
2013
- getRules() {
2014
- assertEslintrcConfig(this);
2015
- const { lastConfigArray, ruleMap } = internalSlotsMap.get(this);
2016
-
2017
- return new Map(function *() {
2018
- yield* ruleMap;
2019
-
2020
- if (lastConfigArray) {
2021
- yield* lastConfigArray.pluginRules;
2022
- }
2023
- }());
2024
- }
2025
-
2026
- /**
2027
- * Define a new parser module
2028
- * @param {string} parserId Name of the parser
2029
- * @param {Parser} parserModule The parser object
2030
- * @returns {void}
2031
- */
2032
- defineParser(parserId, parserModule) {
2033
- assertEslintrcConfig(this);
2034
- internalSlotsMap.get(this).parserMap.set(parserId, parserModule);
2035
- }
2036
-
2037
- /**
2038
- * Performs multiple autofix passes over the text until as many fixes as possible
2039
- * have been applied.
2040
- * @param {string} text The source text to apply fixes to.
2041
- * @param {ConfigData|ConfigArray|FlatConfigArray} config The ESLint config object to use.
2042
- * @param {VerifyOptions&ProcessorOptions&FixOptions} options The ESLint options object to use.
2043
- * @returns {{fixed:boolean,messages:LintMessage[],output:string}} The result of the fix operation as returned from the
2044
- * SourceCodeFixer.
2045
- */
2046
- verifyAndFix(text, config, options) {
2047
- let messages = [],
2048
- fixedResult,
2049
- fixed = false,
2050
- passNumber = 0,
2051
- currentText = text;
2052
- const debugTextDescription = options && options.filename || `${text.slice(0, 10)}...`;
2053
- const shouldFix = options && typeof options.fix !== "undefined" ? options.fix : true;
2054
-
2055
- /**
2056
- * This loop continues until one of the following is true:
2057
- *
2058
- * 1. No more fixes have been applied.
2059
- * 2. Ten passes have been made.
2060
- *
2061
- * That means anytime a fix is successfully applied, there will be another pass.
2062
- * Essentially, guaranteeing a minimum of two passes.
2063
- */
2064
- do {
2065
- passNumber++;
2066
-
2067
- debug(`Linting code for ${debugTextDescription} (pass ${passNumber})`);
2068
- messages = this.verify(currentText, config, options);
2069
-
2070
- debug(`Generating fixed text for ${debugTextDescription} (pass ${passNumber})`);
2071
- fixedResult = SourceCodeFixer.applyFixes(currentText, messages, shouldFix);
2072
-
2073
- /*
2074
- * stop if there are any syntax errors.
2075
- * 'fixedResult.output' is a empty string.
2076
- */
2077
- if (messages.length === 1 && messages[0].fatal) {
2078
- break;
2079
- }
2080
-
2081
- // keep track if any fixes were ever applied - important for return value
2082
- fixed = fixed || fixedResult.fixed;
2083
-
2084
- // update to use the fixed output instead of the original text
2085
- currentText = fixedResult.output;
2086
-
2087
- } while (
2088
- fixedResult.fixed &&
2089
- passNumber < MAX_AUTOFIX_PASSES
2090
- );
2091
-
2092
- /*
2093
- * If the last result had fixes, we need to lint again to be sure we have
2094
- * the most up-to-date information.
2095
- */
2096
- if (fixedResult.fixed) {
2097
- fixedResult.messages = this.verify(currentText, config, options);
2098
- }
2099
-
2100
- // ensure the last result properly reflects if fixes were done
2101
- fixedResult.fixed = fixed;
2102
- fixedResult.output = currentText;
2103
-
2104
- return fixedResult;
2105
- }
2106
- }
2107
-
2108
- module.exports = {
2109
- Linter,
2110
-
2111
- /**
2112
- * Get the internal slots of a given Linter instance for tests.
2113
- * @param {Linter} instance The Linter instance to get.
2114
- * @returns {LinterInternalSlots} The internal slots.
2115
- */
2116
- getLinterInternalSlots(instance) {
2117
- return internalSlotsMap.get(instance);
2118
- }
2119
- };