@geops/rvf-mobility-web-component 0.1.45 → 0.1.47-beta.0

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 (195) hide show
  1. package/.prettierrc.js +3 -1
  2. package/CHANGELOG.md +7 -0
  3. package/README.md +1 -1
  4. package/doc/package.json +4 -3
  5. package/doc/postcss.config.mjs +1 -1
  6. package/doc/src/app/components/GeopsMobilityDoc.tsx +13 -224
  7. package/doc/src/app/components/GeopsMobilitySearchDoc.tsx +11 -107
  8. package/doc/src/app/components/WebComponentDoc.tsx +45 -56
  9. package/doc/src/app/geops-mobility/page.tsx +7 -2
  10. package/doc/src/app/geops-mobility-search/page.tsx +6 -2
  11. package/doc/src/app/globals.css +47 -27
  12. package/doc/src/app/layout.tsx +4 -2
  13. package/docutils.js +33 -17
  14. package/eslint.config.mjs +28 -34
  15. package/iframe.html +5624 -201
  16. package/index.html +108 -88
  17. package/index.js +2229 -1976
  18. package/input.css +21 -3
  19. package/package.json +37 -40
  20. package/scripts/build.mjs +2 -2
  21. package/scripts/dev.mjs +3 -3
  22. package/search.html +70 -23
  23. package/src/BaseLayer/BaseLayer.tsx +2 -1
  24. package/src/Copyright/Copyright.tsx +4 -2
  25. package/src/DebugDeparture/DebugDeparture.tsx +16 -12
  26. package/src/DebugStop/DebugStop.tsx +2 -2
  27. package/src/Departure/Departure.tsx +2 -3
  28. package/src/EmbedNavigation/DragPanWarning.ts +125 -0
  29. package/src/EmbedNavigation/EmbedNavigation.tsx +52 -0
  30. package/src/EmbedNavigation/index.js +1 -0
  31. package/src/EmbedNavigation/index.tsx +1 -0
  32. package/src/GeolocationButton/GeolocationButton.tsx +11 -35
  33. package/src/GeolocationButton/index.tsx +1 -1
  34. package/src/Map/Map.tsx +5 -3
  35. package/src/MapDispatchEvents/MapDispatchEvents.tsx +78 -0
  36. package/src/MapDispatchEvents/index.tsx +1 -0
  37. package/src/MobilityMap/MobilityMap.tsx +117 -162
  38. package/src/MobilityMap/MobilityMapAttributes.test.ts +21 -0
  39. package/src/MobilityMap/MobilityMapAttributes.ts +243 -0
  40. package/src/MobilityMap/index.tsx +1 -0
  41. package/src/MobilitySearch/MobilitySearch.tsx +35 -0
  42. package/src/MobilitySearch/MobilitySearchAttributes.test.ts +21 -0
  43. package/src/MobilitySearch/MobilitySearchAttributes.ts +68 -0
  44. package/src/MobilitySearch/index.ts +2 -0
  45. package/src/NotificationLayer/NotificationLayer.tsx +27 -4
  46. package/src/Overlay/Overlay.tsx +24 -11
  47. package/src/Permalink/Permalink.tsx +77 -0
  48. package/src/Permalink/index.tsx +1 -0
  49. package/src/RealtimeLayer/RealtimeLayer.tsx +72 -33
  50. package/src/RouteDestination/RouteDestination.tsx +3 -3
  51. package/src/RouteIcon/RouteIcon.tsx +33 -25
  52. package/src/RouteIcon/index.tsx +1 -1
  53. package/src/RouteIdentifier/RouteIdentifer.tsx +6 -5
  54. package/src/RouteInfos/RouteInfos.tsx +7 -3
  55. package/src/RouteSchedule/RouteSchedule.tsx +3 -3
  56. package/src/RouteScheduleFooter/RouteScheduleFooter.tsx +1 -1
  57. package/src/RouteScheduleHeader/RouteScheduleHeader.tsx +7 -29
  58. package/src/RouteStop/RouteStop.tsx +8 -11
  59. package/src/RouteStopDelay/RouteStopDelay.tsx +2 -1
  60. package/src/RouteStopName/RouteStopName.tsx +2 -2
  61. package/src/RouteStopPlatform/RouteStopPlatform.tsx +2 -2
  62. package/src/RouteStopProgress/RouteStopProgress.tsx +2 -1
  63. package/src/RouteStopServices/RouteStopServices.tsx +2 -2
  64. package/src/RouteStopStation/RouteStopStation.tsx +8 -2
  65. package/src/RouteStopTime/RouteStopTime.tsx +2 -1
  66. package/src/RvfButton/RvfButton.tsx +14 -5
  67. package/src/RvfCheckbox/RvfCheckbox.tsx +8 -8
  68. package/src/RvfEmbedNavigation/DragPanWarning.ts +5 -5
  69. package/src/RvfEmbedNavigation/RvfEmbedNavigation.tsx +1 -0
  70. package/src/RvfExportMenu/RvfExportMenu.tsx +14 -12
  71. package/src/RvfExportMenuButton/RvfExportMenuButton.tsx +6 -7
  72. package/src/RvfFeatureDetails/RvfFeatureDetails.tsx +5 -5
  73. package/src/RvfFeatureDetails/RvfLineNetworkDetails/RvfLineNetworkDetails.tsx +164 -138
  74. package/src/RvfFeatureDetails/RvfNotificationDetails/RvfNotificationDetails.tsx +151 -109
  75. package/src/RvfFeatureDetails/RvfSellingPointDetails/RvfSellingPointDetails.tsx +2 -2
  76. package/src/RvfFeatureDetails/RvfSharedMobilityDetail/FloatingVehiclesDetails/FloatingVehiclesDetails.tsx +3 -3
  77. package/src/RvfFeatureDetails/RvfSharedMobilityDetail/RvfSharedMobilityDetails.tsx +8 -6
  78. package/src/RvfFeatureDetails/RvfSharedMobilityDetail/StationDetails/StationDetails.tsx +5 -4
  79. package/src/RvfFeatureDetailsTitle/RvfFeatureDetailsTitle.tsx +81 -0
  80. package/src/RvfFeatureDetailsTitle/index.tsx +1 -0
  81. package/src/RvfFloatingMenu/RvfFloatingMenu.tsx +4 -4
  82. package/src/RvfGeolocationButton/GeolocationButton.tsx +98 -0
  83. package/src/RvfGeolocationButton/index.tsx +1 -0
  84. package/src/RvfIconButton/RvfIconButton.tsx +20 -9
  85. package/src/RvfInputCopy/RvfInputCopy.tsx +8 -8
  86. package/src/RvfLayerTree/RvfLayerTree.tsx +5 -2
  87. package/src/RvfLayerTree/TreeItem/TreeItem.tsx +13 -16
  88. package/src/RvfLayerTree/layersTreeReducer.ts +23 -18
  89. package/src/RvfLayerTreeButton/RvfLayerTreeButton.tsx +6 -6
  90. package/src/RvfLineNetworkPlanLayer/RvfLineNetworkPlanLayer.tsx +2 -1
  91. package/src/RvfLink/RvfLink.tsx +4 -3
  92. package/src/RvfMobilityMap/RvfMobilityMap.tsx +314 -322
  93. package/src/RvfModal/RvfModal.tsx +4 -3
  94. package/src/RvfOverlayContent/RvfOverlayContent.tsx +126 -0
  95. package/src/RvfOverlayContent/index.ts +0 -0
  96. package/src/RvfOverlayHeader/RvfOverlayHeader.tsx +13 -10
  97. package/src/RvfPermalink/RvfPermalink.tsx +2 -2
  98. package/src/RvfPoisLayer/RvfPoisLayer.tsx +2 -1
  99. package/src/RvfRadioButton/RvfRadioButton.tsx +1 -1
  100. package/src/RvfRouteIcon/RvfRouteIcon.tsx +10 -0
  101. package/src/RvfRouteIcon/index.tsx +1 -0
  102. package/src/RvfSearch/RvfSearch.tsx +4 -1
  103. package/src/RvfSearchButton/RvfSearchButton.tsx +27 -0
  104. package/src/RvfSearchButton/index.tsx +1 -0
  105. package/src/RvfSelect/RvfSelect.tsx +7 -5
  106. package/src/RvfSelectedFeatureHighlightLayer/RvfSelectedFeatureHighlightLayer.tsx +1 -2
  107. package/src/RvfSellingPointsLayer/RvfSellingPointsLayer.tsx +2 -1
  108. package/src/RvfShare/RvfPermalinkButton/RvfPermalinkButton.tsx +13 -12
  109. package/src/RvfShare/RvfShare.tsx +11 -10
  110. package/src/RvfShareMenuButton/RvfShareMenuButton.tsx +5 -5
  111. package/src/RvfSharedMobilityLayerGroup/RvfSharedMobilityLayerGroup.tsx +25 -22
  112. package/src/RvfSingleClickListener/RvfSingleClickListener.tsx +46 -31
  113. package/src/RvfTarifZonenLayer/RvfTarifZonenLayer.tsx +2 -1
  114. package/src/RvfTopics/RvfTopics.tsx +6 -5
  115. package/src/RvfZoomButtons/RvfZoomButtons.tsx +3 -3
  116. package/src/ScaleLine/ScaleLine.tsx +5 -4
  117. package/src/ScrollableHandler/ScrollableHandler.tsx +2 -1
  118. package/src/ScrollableHandler/index.tsx +1 -1
  119. package/src/SingleClickListener/SingleClickListener.tsx +47 -4
  120. package/src/Station/Station.tsx +5 -5
  121. package/src/StationName/StationName.tsx +3 -3
  122. package/src/StationServices/StationServices.tsx +3 -3
  123. package/src/StationsLayer/StationsLayer.tsx +5 -4
  124. package/src/StopsSearch/StopsSearch.tsx +115 -84
  125. package/src/WindowMessageListener/WindowMessageListener.tsx +67 -0
  126. package/src/WindowMessageListener/index.tsx +1 -0
  127. package/src/icons/Airport/Airport.tsx +4 -4
  128. package/src/icons/ArrowDown/ArrowDown.tsx +1 -1
  129. package/src/icons/ArrowUp/ArrowUp.tsx +1 -1
  130. package/src/icons/ArrowUpRight/ArrowUpRight.tsx +1 -1
  131. package/src/icons/BarAndRestaurants/BarAndRestaurants.tsx +2 -2
  132. package/src/icons/Bathroom/Bathroom.tsx +1 -1
  133. package/src/icons/Copy/Copy.tsx +1 -1
  134. package/src/icons/Doc/Doc.tsx +1 -1
  135. package/src/icons/Email/Email.tsx +1 -1
  136. package/src/icons/FilePdf/FilePdf.tsx +1 -1
  137. package/src/icons/Geolocation/Geolocation.tsx +3 -5
  138. package/src/icons/Image/Image.tsx +1 -1
  139. package/src/icons/Menu/Menu.tsx +1 -1
  140. package/src/icons/Minus/Minus.tsx +1 -1
  141. package/src/icons/NoRealtime/NoRealtime.tsx +1 -1
  142. package/src/icons/Plus/Plus.tsx +1 -1
  143. package/src/icons/Police/Police.tsx +3 -3
  144. package/src/icons/Share/Share.tsx +1 -1
  145. package/src/icons/Stack/Stack.tsx +1 -1
  146. package/src/icons/Tracking/Tracking.tsx +29 -0
  147. package/src/icons/Tracking/airport-14-svgrepo-com.svg +41 -0
  148. package/src/icons/Tracking/index.tsx +1 -0
  149. package/src/icons/WaitingAreas/WaitingAreas.tsx +1 -1
  150. package/src/icons/WheelChair/WheelChair.tsx +1 -1
  151. package/src/index.tsx +8 -46
  152. package/src/indexDoc.ts +13 -0
  153. package/src/ui/Button/Button.tsx +57 -0
  154. package/src/ui/Button/index.tsx +1 -0
  155. package/src/ui/IconButton/IconButton.tsx +44 -0
  156. package/src/ui/IconButton/index.tsx +1 -0
  157. package/src/utils/MobilityEvent.ts +4 -3
  158. package/src/utils/applyInitialLayerVisibility.ts +3 -3
  159. package/src/utils/centerOnStation.ts +3 -2
  160. package/src/utils/centerOnVehicle.ts +5 -4
  161. package/src/utils/constants.ts +17 -3
  162. package/src/utils/exportPdf.ts +26 -20
  163. package/src/utils/fullTrajectoryStyle.ts +2 -2
  164. package/src/utils/getAllLayers.ts +4 -3
  165. package/src/utils/getDelayColor.test.ts +1 -0
  166. package/src/utils/getDelayColorForVehicle.test.ts +2 -0
  167. package/src/utils/getDelayString.test.ts +3 -0
  168. package/src/utils/getDelayTextForVehicle.test.ts +4 -0
  169. package/src/utils/getFullTrajectoryAndFit.ts +4 -3
  170. package/src/utils/getHoursAndMinutes.test.ts +1 -0
  171. package/src/utils/getLayersAsFlatArray.ts +2 -2
  172. package/src/utils/getLinkByDevice.ts +1 -1
  173. package/src/utils/getMainColorForVehicle.ts +3 -3
  174. package/src/utils/getPermalinkParameters.ts +2 -2
  175. package/src/utils/getStopStatus.test.ts +2 -1
  176. package/src/utils/getStopStatus.ts +1 -1
  177. package/src/utils/getTextForVehicle.ts +1 -1
  178. package/src/utils/hooks/useDeparture.tsx +6 -5
  179. package/src/utils/hooks/useI18n.tsx +6 -4
  180. package/src/utils/hooks/useInitialLayersVisiblity.tsx +2 -1
  181. package/src/utils/hooks/useLayerConfig.tsx +39 -0
  182. package/src/utils/hooks/useMapContext.tsx +30 -18
  183. package/src/utils/hooks/useRouteStop.tsx +3 -2
  184. package/src/utils/hooks/useRvfContext.tsx +11 -3
  185. package/src/utils/hooks/useStation.tsx +2 -1
  186. package/src/utils/hooks/useUpdatePermalink.tsx +25 -24
  187. package/src/utils/hooks/useZoom.tsx +4 -4
  188. package/src/utils/realtimeRVFStyle.ts +5 -4
  189. package/src/utils/sharingGraphqlUtils.ts +3 -2
  190. package/src/utils/sharingStylesUtils.ts +7 -7
  191. package/src/utils/sharingWFSUtils.ts +9 -15
  192. package/tailwind.config.mjs +1 -0
  193. package/tsconfig.json +1 -1
  194. package/doc/tailwind.config.ts +0 -20
  195. package/src/utils/getFeatureInformationTitle.tsx +0 -54
@@ -1,38 +1,58 @@
1
- @tailwind base;
2
- @tailwind components;
3
- @tailwind utilities;
1
+ @import 'tailwindcss';
4
2
 
5
- :root {
6
- --background: #ffffff;
7
- --foreground: #171717;
3
+ @theme {
4
+ --font-sans: Lato, sans-serif;
5
+ --font-serif: Merriweather, serif;
8
6
  }
9
7
 
10
- body {
11
- color: var(--foreground);
12
- background: var(--background);
13
- font-family: Arial, Helvetica, sans-serif;
14
- margin: 0;
15
- font-family: Lato, Arial, sans-serif;
16
- color: #353535;
17
- position: relative;
18
- min-height: 100%;
19
- overflow-y: scroll;
20
- font-size: 18px;
21
- }
8
+ /*
9
+ The default border color has changed to `currentColor` in Tailwind CSS v4,
10
+ so we've added these compatibility styles to make sure everything still
11
+ looks the same as it did with Tailwind CSS v3.
22
12
 
23
- a {
24
- text-decoration: none;
25
- color: #76b833;
13
+ If we ever want to remove these styles, we need to add an explicit border
14
+ color utility to any element that depends on these defaults.
15
+ */
16
+ @layer base {
17
+ *,
18
+ ::after,
19
+ ::before,
20
+ ::backdrop,
21
+ ::file-selector-button {
22
+ border-color: var(--color-gray-200, currentColor);
23
+ }
26
24
  }
27
25
 
28
- a:focus-visible {
29
- outline: 2px solid black;
30
- outline-offset: 2px;
26
+ @utility text-balance {
27
+ text-wrap: balance;
31
28
  }
32
29
 
33
-
34
30
  @layer utilities {
35
- .text-balance {
36
- text-wrap: balance;
31
+ :root {
32
+ --background: #ffffff;
33
+ --foreground: #171717;
34
+ }
35
+
36
+ body {
37
+ color: var(--foreground);
38
+ background: var(--background);
39
+ font-family: Arial, Helvetica, sans-serif;
40
+ margin: 0;
41
+ font-family: Lato, Arial, sans-serif;
42
+ color: #353535;
43
+ position: relative;
44
+ min-height: 100%;
45
+ overflow-y: scroll;
46
+ font-size: 18px;
47
+ }
48
+
49
+ a {
50
+ text-decoration: none;
51
+ color: #76b833;
52
+ }
53
+
54
+ a:focus-visible {
55
+ outline: 2px solid black;
56
+ outline-offset: 2px;
37
57
  }
38
58
  }
@@ -1,5 +1,3 @@
1
- import type { Metadata } from "next";
2
-
3
1
  import { Container } from "@mui/material";
4
2
  import { AppRouterCacheProvider } from "@mui/material-nextjs/v14-appRouter";
5
3
  import { ThemeProvider } from "@mui/material/styles";
@@ -7,8 +5,11 @@ import Script from "next/script";
7
5
  import { Suspense } from "react";
8
6
 
9
7
  import { Footer, geopsTheme, Header } from "../geops-ui";
8
+
10
9
  import "./globals.css";
11
10
 
11
+ import type { Metadata } from "next";
12
+
12
13
  const tabs = [
13
14
  {
14
15
  component: "a",
@@ -45,6 +46,7 @@ export default function RootLayout({
45
46
  </ThemeProvider>
46
47
  </AppRouterCacheProvider>
47
48
  <Script src="index.js" />
49
+ <Script src="indexDoc.js" />
48
50
  </body>
49
51
  </html>
50
52
  );
package/docutils.js CHANGED
@@ -1,4 +1,3 @@
1
- /* eslint-disable no-undef */
2
1
  /* eslint-disable @typescript-eslint/no-unused-vars */
3
2
  function applyPermalinkParameters(wc) {
4
3
  const params = new URLSearchParams(window.location.search);
@@ -7,14 +6,15 @@ function applyPermalinkParameters(wc) {
7
6
  if (params.get("fullscreen") === "true") {
8
7
  wc.parentElement.removeChild(wc);
9
8
  wc.className = "absolute w-full h-full inset-0";
10
- document.body.className = "absolute w-full h-full inset-0 p-0";
11
9
  document.body.appendChild(wc);
10
+ document.body.style = "padding:0;";
12
11
  } else {
13
12
  const doc = document.querySelectorAll("#doc");
14
13
  doc.forEach((d) => {
15
14
  return (d.style.display = "block");
16
15
  });
17
16
  }
17
+
18
18
  // Apply x,y,z
19
19
  if (
20
20
  params.get("permalink") === "true" &&
@@ -46,15 +46,15 @@ function applyPermalinkParameters(wc) {
46
46
 
47
47
  // Get an apikey if there is none defined
48
48
  if (!wc.getAttribute("apikey")) {
49
- // fetch("https://backend.developer.geops.io/publickey")
50
- // .then((response) => {
51
- // return response.json();
52
- // })
53
- // .then((data) => {
54
- // if (data && data.success) {
55
- // // wc.setAttribute("apikey", data.key);
56
- // }
57
- // });
49
+ fetch("https://backend.developer.geops.io/publickey")
50
+ .then((response) => {
51
+ return response.json();
52
+ })
53
+ .then((data) => {
54
+ if (data && data.success) {
55
+ wc.setAttribute("apikey", data.key);
56
+ }
57
+ });
58
58
  }
59
59
  }
60
60
 
@@ -65,6 +65,7 @@ function generateAttributesTable(
65
65
  booleanAttrs = [],
66
66
  booleanTrueByDefault = [],
67
67
  descriptionByAttr = {},
68
+ defaultValueByAttr = {},
68
69
  ) {
69
70
  let innerHMTL = `<table class="table-auto w-full" >
70
71
  <thead>
@@ -78,6 +79,7 @@ function generateAttributesTable(
78
79
  <tbody>`;
79
80
  innerHMTL += attrs
80
81
  .sort()
82
+ .filter((key) => descriptionByAttr[key])
81
83
  .map((key) => {
82
84
  const isBoolean = booleanAttrs.includes(key);
83
85
  const defaultChecked = booleanTrueByDefault.includes(key)
@@ -110,6 +112,7 @@ function generateAttributesTable(
110
112
  class="border"
111
113
  name="${key}"
112
114
  value="${wc.getAttribute(key) || ""}"
115
+ placeholder="${defaultValueByAttr[key] || ""}"
113
116
  />
114
117
  <button class="border p-2 bg-black hover:bg-gray-700 text-white" onclick="document.querySelector('${wc.localName}').setAttribute('${key}', this.previousElementSibling.value);onAttributeUpdate(document.querySelector('${wc.localName}'),this.previousElementSibling.name, this.previousElementSibling.value);">Update</button>`
115
118
  }
@@ -135,12 +138,19 @@ function generateCodeText(
135
138
  let codeText = "";
136
139
  codeText = `&lt;script\n\ttype="module"\n\tsrc="${pkgSrc}"&gt;
137
140
  &lt;/script&gt;
138
- &lt;${wc.localName} style="display:block;width:100%;height:500px;border:1px solid #e5e7eb;border-radius:16px;"`;
141
+ &lt;${wc.localName}\n\tid="map"\n\tstyle="display:block;width:100%;height:500px;border:1px solid #e5e7eb;border-radius:16px;"`;
139
142
 
140
143
  attrs.forEach((key) => {
141
144
  const attributeValue = wc.getAttribute(key);
142
- const inputValue = document.querySelector(`[name=${key}]`)?.value;
143
- if (attributeValue !== null && attributeValue === inputValue) {
145
+ const input = document.querySelector(`[name=${key}]`);
146
+ const inputValue =
147
+ input?.type === "checkbox" ? input.checked : input?.value;
148
+ if (
149
+ attributeValue !== null &&
150
+ (attributeValue === inputValue ||
151
+ (attributeValue === "true" && inputValue === true) ||
152
+ (attributeValue === "false" && inputValue === false))
153
+ ) {
144
154
  codeText += `\n\t${[key, '"' + wc.getAttribute(key) + '"'].join("=")}`;
145
155
  }
146
156
  });
@@ -149,7 +159,7 @@ function generateCodeText(
149
159
  }
150
160
 
151
161
  // Generates a HTML table with all events of a web component
152
- function generateEventsTable(wc, events) {
162
+ function generateEventsTable(wc, events, descriptionByEvent = {}) {
153
163
  let innerHMTL = `<table class="table-auto w-full" >
154
164
  <thead>
155
165
  <tr>
@@ -184,10 +194,16 @@ function generateEventsTable(wc, events) {
184
194
  <tr>
185
195
  <td class="border px-4 py-2">${key}</td>
186
196
  <td class="border px-4 py-2">
187
- <div class="flex gap-4">
197
+ <div class="flex flex-col gap-4">
198
+ <p>
199
+ ${descriptionByEvent[key] || ""}
200
+ </p>
201
+ <p>
202
+ Last event received:
203
+ </p>
188
204
  <textarea
189
205
  type="text"
190
- class="border w-full h-300"
206
+ class="border h-300 w-full"
191
207
  style="height:300px;"
192
208
  name="${key}"
193
209
  ></textarea>
package/eslint.config.mjs CHANGED
@@ -1,40 +1,34 @@
1
- import { FlatCompat } from "@eslint/eslintrc";
2
- import eslint from "@eslint/js";
3
- import jsxA11y from "eslint-plugin-jsx-a11y";
4
- import perfectionist from "eslint-plugin-perfectionist";
5
- import prettier from "eslint-plugin-prettier/recommended";
6
- import react from "eslint-plugin-react";
7
- import tailwind from "eslint-plugin-tailwindcss";
8
- import ts from "typescript-eslint";
1
+ import flat from "@geops/eslint-config-react/flat";
9
2
 
10
- // FlatCompat convert old definition to the new ones
11
- const compat = new FlatCompat();
3
+ // tailwind@4 only supported in beta channel
4
+ // import tailwind from "eslint-plugin-tailwindcss";
12
5
 
13
6
  export default [
7
+ ...flat,
8
+ // tailwind@4 only supported in beta channel
9
+ // ...tailwind.configs["flat/recommended"],
10
+ // {
11
+ // settings: {
12
+ // react: {
13
+ // version: "18.3.1",
14
+ // },
15
+ // },
16
+ // },
14
17
  {
15
- ignores: ["build/*", "node_modules/*"],
16
- },
17
- ...ts.config(
18
- eslint.configs.recommended,
19
- ...ts.configs.strict,
20
- ...ts.configs.stylistic,
21
- react.configs.flat.recommended,
22
- react.configs.flat["jsx-runtime"], // Avoid having the React-in-jsx-scope rule activated
23
- ...compat.config({
24
- extends: ["plugin:react-hooks/recommended"],
25
- rules: {
26
- "react-hooks/exhaustive-deps": "error",
27
- },
28
- }),
29
- jsxA11y.flatConfigs.recommended,
30
- perfectionist.configs["recommended-alphabetical"],
31
- prettier,
32
- ...tailwind.configs["flat/recommended"],
33
- {
34
- rules: {
35
- "arrow-body-style": ["error", "always"],
36
- curly: "error",
37
- },
18
+ rules: {
19
+ "@typescript-eslint/no-empty-function": "off",
20
+ "@typescript-eslint/no-unsafe-call": "off",
21
+ "@typescript-eslint/no-unsafe-member-access": "off",
22
+ "@typescript-eslint/no-unsafe-assignment": "off",
23
+ "@typescript-eslint/no-unsafe-return": "off",
24
+ "@typescript-eslint/unbound-method": "off",
25
+ "@typescript-eslint/no-unsafe-argument": "off",
26
+ "mocha/no-setup-in-describe": "off",
27
+ "mocha/consistent-spacing-between-blocks": "off",
28
+ "@typescript-eslint/no-redundant-type-constituents": "off",
29
+ "mocha/no-pending-tests": "off",
30
+ "@typescript-eslint/prefer-nullish-coalescing": "off",
31
+ "react-compiler/react-compiler": "off",
38
32
  },
39
- ),
33
+ },
40
34
  ];