@pnp/spfx-controls-react 3.25.0-beta.2833072 → 3.25.0-beta.2845329

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 (248) hide show
  1. package/CHANGELOG.json +7 -2
  2. package/CHANGELOG.md +5 -1
  3. package/eslint.config.js +14 -0
  4. package/jest-output/JUnit.xml +87 -87
  5. package/lib/common/telemetry/version.js +1 -1
  6. package/lib/common/utilities/GeneralHelper.d.ts +1 -0
  7. package/lib/common/utilities/GeneralHelper.d.ts.map +1 -1
  8. package/lib/common/utilities/GeneralHelper.js +4 -0
  9. package/lib/common/utilities/GeneralHelper.js.map +1 -1
  10. package/lib/controls/TermSetNavigation/RenderNoOptions.d.ts.map +1 -1
  11. package/lib/controls/TermSetNavigation/RenderNoOptions.js.map +1 -1
  12. package/lib/controls/adaptiveCardDesignerHost/AdaptiveCardDesigner.Styles.d.ts.map +1 -1
  13. package/lib/controls/adaptiveCardDesignerHost/AdaptiveCardDesigner.Styles.js +1 -0
  14. package/lib/controls/adaptiveCardDesignerHost/AdaptiveCardDesigner.Styles.js.map +1 -1
  15. package/lib/controls/animatedDialog/AnimatedDialog.d.ts.map +1 -1
  16. package/lib/controls/animatedDialog/AnimatedDialog.js +1 -0
  17. package/lib/controls/animatedDialog/AnimatedDialog.js.map +1 -1
  18. package/lib/controls/dashboard/Dashboard.module.scss.css +3 -0
  19. package/lib/controls/dateTimePicker/DateTimePicker.js +1 -1
  20. package/lib/controls/dateTimePicker/DateTimePicker.js.map +1 -1
  21. package/lib/controls/dateTimePicker/DateTimePicker.module.scss.css +3 -0
  22. package/lib/controls/dragDropFiles/DragDropFiles.module.scss.css +3 -0
  23. package/lib/controls/errorMessage/ErrorMessage.module.scss.css +3 -0
  24. package/lib/controls/fields/fieldAttachmentsRenderer/FieldAttachmentsRenderer.module.scss.css +3 -0
  25. package/lib/controls/fields/fieldBaseTextRenderer/FieldBaseTextRenderer.module.scss.css +3 -0
  26. package/lib/controls/fields/fieldFileTypeRenderer/FieldFileTypeRenderer.module.scss.css +3 -0
  27. package/lib/controls/fields/fieldLookupRenderer/FieldLookupRenderer.module.scss.css +3 -0
  28. package/lib/controls/fields/fieldNameRenderer/FieldNameRenderer.module.scss.css +3 -0
  29. package/lib/controls/fields/fieldTaxonomyRenderer/FieldTaxonomyRenderer.module.scss.css +3 -0
  30. package/lib/controls/fields/fieldTextRenderer/FieldTextRenderer.module.scss.css +3 -0
  31. package/lib/controls/fields/fieldUrlRenderer/FieldUrlRenderer.module.scss.css +3 -0
  32. package/lib/controls/fields/fieldUserRenderer/FieldUserRenderer.module.scss.css +3 -0
  33. package/lib/controls/filePicker/LinkFilePickerTab/LinkFilePickerTab.module.scss.css +3 -0
  34. package/lib/controls/filePicker/MultipleUploadFilePickerTab/MultipleUploadFilePickerTab.module.scss.css +3 -0
  35. package/lib/controls/filePicker/OneDriveFilesTab/OneDriveFilesTab.module.scss.css +3 -0
  36. package/lib/controls/filePicker/RecentFilesTab/RecentFilesTab.module.scss.css +3 -0
  37. package/lib/controls/filePicker/SiteFilePickerTab/SiteFilePickerTab.module.scss.css +3 -0
  38. package/lib/controls/filePicker/StockImagesTab/StockImages.module.scss.css +3 -0
  39. package/lib/controls/filePicker/UploadFilePickerTab/UploadFilePickerTab.module.scss.css +3 -0
  40. package/lib/controls/filePicker/WebSearchTab/WebSearchTab.module.scss.css +3 -0
  41. package/lib/controls/filePicker/controls/DocumentTile/DocumentTile.module.scss.css +9 -0
  42. package/lib/controls/filePicker/controls/FileBrowser/FileBrowser.module.scss.css +6 -0
  43. package/lib/controls/filePicker/controls/FolderTile/FolderTile.module.scss.css +9 -0
  44. package/lib/controls/filePicker/controls/TilesList/TilesList.module.scss.css +6 -0
  45. package/lib/controls/iFrameDialog/IFrameDialogContent.module.scss.css +3 -0
  46. package/lib/controls/iFramePanel/IFramePanelContent.module.scss.css +3 -0
  47. package/lib/controls/imagePicker/selectFromSharePoint.d.ts.map +1 -1
  48. package/lib/controls/imagePicker/selectFromSharePoint.js +1 -0
  49. package/lib/controls/imagePicker/selectFromSharePoint.js.map +1 -1
  50. package/lib/controls/listItemAttachments/ListItemAttachments.module.scss.css +3 -0
  51. package/lib/controls/listItemPicker/ComboBoxListItemPicker.module.scss.css +3 -0
  52. package/lib/controls/listPicker/ListPicker.module.scss.css +3 -0
  53. package/lib/controls/map/Maps.module.scss.css +3 -0
  54. package/lib/controls/modernAudio/ModernAudio.module.scss.css +3 -0
  55. package/lib/controls/modernTaxonomyPicker/ModernTaxonomyPicker.module.scss.css +3 -0
  56. package/lib/controls/pagination/Pagination.module.scss.css +3 -0
  57. package/lib/controls/peoplepicker/PeoplePickerComponent.js +1 -1
  58. package/lib/controls/peoplepicker/PeoplePickerComponent.js.map +1 -1
  59. package/lib/controls/peoplepicker/PeoplePickerComponent.module.scss.css +3 -0
  60. package/lib/controls/progress/Progress.module.scss.css +3 -0
  61. package/lib/controls/siteBreadcrumb/SiteBreadcrumb.module.scss.css +3 -0
  62. package/lib/controls/taxonomyPicker/TaxonomyPicker.module.scss.css +3 -0
  63. package/lib/controls/toolbar/Toolbar.module.scss.css +3 -0
  64. package/lib/controls/viewPicker/ViewPicker.module.scss.css +3 -0
  65. package/lib/controls/webPartTitle/WebPartTitle.module.scss.css +3 -0
  66. package/lib/loc/bg-bg.d.ts.map +1 -1
  67. package/lib/loc/bg-bg.js.map +1 -1
  68. package/lib/loc/ca-es.d.ts.map +1 -1
  69. package/lib/loc/ca-es.js.map +1 -1
  70. package/lib/loc/cs-cz.d.ts.map +1 -1
  71. package/lib/loc/cs-cz.js.map +1 -1
  72. package/lib/loc/da-dk.d.ts.map +1 -1
  73. package/lib/loc/da-dk.js.map +1 -1
  74. package/lib/loc/de-de.d.ts.map +1 -1
  75. package/lib/loc/de-de.js.map +1 -1
  76. package/lib/loc/el-gr.d.ts.map +1 -1
  77. package/lib/loc/el-gr.js.map +1 -1
  78. package/lib/loc/en-us.d.ts.map +1 -1
  79. package/lib/loc/en-us.js.map +1 -1
  80. package/lib/loc/es-es.d.ts.map +1 -1
  81. package/lib/loc/es-es.js.map +1 -1
  82. package/lib/loc/et-ee.d.ts.map +1 -1
  83. package/lib/loc/et-ee.js.map +1 -1
  84. package/lib/loc/eu-es.d.ts.map +1 -1
  85. package/lib/loc/eu-es.js.map +1 -1
  86. package/lib/loc/fi-fi.d.ts.map +1 -1
  87. package/lib/loc/fi-fi.js.map +1 -1
  88. package/lib/loc/fr-ca.d.ts.map +1 -1
  89. package/lib/loc/fr-ca.js.map +1 -1
  90. package/lib/loc/fr-fr.d.ts.map +1 -1
  91. package/lib/loc/fr-fr.js.map +1 -1
  92. package/lib/loc/it-it.d.ts.map +1 -1
  93. package/lib/loc/it-it.js.map +1 -1
  94. package/lib/loc/ja-jp.d.ts.map +1 -1
  95. package/lib/loc/ja-jp.js.map +1 -1
  96. package/lib/loc/lt-lt.d.ts.map +1 -1
  97. package/lib/loc/lt-lt.js.map +1 -1
  98. package/lib/loc/lv-lv.d.ts.map +1 -1
  99. package/lib/loc/lv-lv.js.map +1 -1
  100. package/lib/loc/nb-no.d.ts.map +1 -1
  101. package/lib/loc/nb-no.js.map +1 -1
  102. package/lib/loc/nl-nl.d.ts.map +1 -1
  103. package/lib/loc/nl-nl.js.map +1 -1
  104. package/lib/loc/pl-pl.d.ts.map +1 -1
  105. package/lib/loc/pl-pl.js.map +1 -1
  106. package/lib/loc/pt-br.d.ts.map +1 -1
  107. package/lib/loc/pt-br.js.map +1 -1
  108. package/lib/loc/pt-pt.d.ts.map +1 -1
  109. package/lib/loc/pt-pt.js.map +1 -1
  110. package/lib/loc/ro-ro.d.ts.map +1 -1
  111. package/lib/loc/ro-ro.js.map +1 -1
  112. package/lib/loc/ru-ru.d.ts.map +1 -1
  113. package/lib/loc/ru-ru.js.map +1 -1
  114. package/lib/loc/sk-sk.d.ts.map +1 -1
  115. package/lib/loc/sk-sk.js.map +1 -1
  116. package/lib/loc/sr-latn-rs.d.ts.map +1 -1
  117. package/lib/loc/sr-latn-rs.js.map +1 -1
  118. package/lib/loc/sv-se.d.ts.map +1 -1
  119. package/lib/loc/sv-se.js.map +1 -1
  120. package/lib/loc/tr-tr.d.ts.map +1 -1
  121. package/lib/loc/tr-tr.js.map +1 -1
  122. package/lib/loc/vi-vn.d.ts.map +1 -1
  123. package/lib/loc/vi-vn.js.map +1 -1
  124. package/lib/loc/zh-cn.d.ts.map +1 -1
  125. package/lib/loc/zh-cn.js.map +1 -1
  126. package/lib/loc/zh-tw.d.ts.map +1 -1
  127. package/lib/loc/zh-tw.js.map +1 -1
  128. package/lib/services/PeopleSearchService.d.ts +1 -1
  129. package/lib/services/PeopleSearchService.d.ts.map +1 -1
  130. package/lib/services/PeopleSearchService.js +12 -5
  131. package/lib/services/PeopleSearchService.js.map +1 -1
  132. package/lib/services/SPService.d.ts.map +1 -1
  133. package/lib/services/SPService.js +8 -22
  134. package/lib/services/SPService.js.map +1 -1
  135. package/lib-commonjs/common/telemetry/version.js +1 -1
  136. package/lib-commonjs/common/utilities/GeneralHelper.js +5 -0
  137. package/lib-commonjs/common/utilities/GeneralHelper.js.map +1 -1
  138. package/lib-commonjs/controls/TermSetNavigation/RenderNoOptions.js.map +1 -1
  139. package/lib-commonjs/controls/adaptiveCardDesignerHost/AdaptiveCardDesigner.Styles.js +1 -0
  140. package/lib-commonjs/controls/adaptiveCardDesignerHost/AdaptiveCardDesigner.Styles.js.map +1 -1
  141. package/lib-commonjs/controls/animatedDialog/AnimatedDialog.js +1 -0
  142. package/lib-commonjs/controls/animatedDialog/AnimatedDialog.js.map +1 -1
  143. package/lib-commonjs/controls/dashboard/Dashboard.module.scss.css +3 -0
  144. package/lib-commonjs/controls/dateTimePicker/DateTimePicker.js +1 -1
  145. package/lib-commonjs/controls/dateTimePicker/DateTimePicker.js.map +1 -1
  146. package/lib-commonjs/controls/dateTimePicker/DateTimePicker.module.scss.css +3 -0
  147. package/lib-commonjs/controls/dragDropFiles/DragDropFiles.module.scss.css +3 -0
  148. package/lib-commonjs/controls/errorMessage/ErrorMessage.module.scss.css +3 -0
  149. package/lib-commonjs/controls/fields/fieldAttachmentsRenderer/FieldAttachmentsRenderer.module.scss.css +3 -0
  150. package/lib-commonjs/controls/fields/fieldBaseTextRenderer/FieldBaseTextRenderer.module.scss.css +3 -0
  151. package/lib-commonjs/controls/fields/fieldFileTypeRenderer/FieldFileTypeRenderer.module.scss.css +3 -0
  152. package/lib-commonjs/controls/fields/fieldLookupRenderer/FieldLookupRenderer.module.scss.css +3 -0
  153. package/lib-commonjs/controls/fields/fieldNameRenderer/FieldNameRenderer.module.scss.css +3 -0
  154. package/lib-commonjs/controls/fields/fieldTaxonomyRenderer/FieldTaxonomyRenderer.module.scss.css +3 -0
  155. package/lib-commonjs/controls/fields/fieldTextRenderer/FieldTextRenderer.module.scss.css +3 -0
  156. package/lib-commonjs/controls/fields/fieldUrlRenderer/FieldUrlRenderer.module.scss.css +3 -0
  157. package/lib-commonjs/controls/fields/fieldUserRenderer/FieldUserRenderer.module.scss.css +3 -0
  158. package/lib-commonjs/controls/filePicker/LinkFilePickerTab/LinkFilePickerTab.module.scss.css +3 -0
  159. package/lib-commonjs/controls/filePicker/MultipleUploadFilePickerTab/MultipleUploadFilePickerTab.module.scss.css +3 -0
  160. package/lib-commonjs/controls/filePicker/OneDriveFilesTab/OneDriveFilesTab.module.scss.css +3 -0
  161. package/lib-commonjs/controls/filePicker/RecentFilesTab/RecentFilesTab.module.scss.css +3 -0
  162. package/lib-commonjs/controls/filePicker/SiteFilePickerTab/SiteFilePickerTab.module.scss.css +3 -0
  163. package/lib-commonjs/controls/filePicker/StockImagesTab/StockImages.module.scss.css +3 -0
  164. package/lib-commonjs/controls/filePicker/UploadFilePickerTab/UploadFilePickerTab.module.scss.css +3 -0
  165. package/lib-commonjs/controls/filePicker/WebSearchTab/WebSearchTab.module.scss.css +3 -0
  166. package/lib-commonjs/controls/filePicker/controls/DocumentTile/DocumentTile.module.scss.css +9 -0
  167. package/lib-commonjs/controls/filePicker/controls/FileBrowser/FileBrowser.module.scss.css +6 -0
  168. package/lib-commonjs/controls/filePicker/controls/FolderTile/FolderTile.module.scss.css +9 -0
  169. package/lib-commonjs/controls/filePicker/controls/TilesList/TilesList.module.scss.css +6 -0
  170. package/lib-commonjs/controls/iFrameDialog/IFrameDialogContent.module.scss.css +3 -0
  171. package/lib-commonjs/controls/iFramePanel/IFramePanelContent.module.scss.css +3 -0
  172. package/lib-commonjs/controls/imagePicker/selectFromSharePoint.js +1 -0
  173. package/lib-commonjs/controls/imagePicker/selectFromSharePoint.js.map +1 -1
  174. package/lib-commonjs/controls/listItemAttachments/ListItemAttachments.module.scss.css +3 -0
  175. package/lib-commonjs/controls/listItemPicker/ComboBoxListItemPicker.module.scss.css +3 -0
  176. package/lib-commonjs/controls/listPicker/ListPicker.module.scss.css +3 -0
  177. package/lib-commonjs/controls/map/Maps.module.scss.css +3 -0
  178. package/lib-commonjs/controls/modernAudio/ModernAudio.module.scss.css +3 -0
  179. package/lib-commonjs/controls/modernTaxonomyPicker/ModernTaxonomyPicker.module.scss.css +3 -0
  180. package/lib-commonjs/controls/pagination/Pagination.module.scss.css +3 -0
  181. package/lib-commonjs/controls/peoplepicker/PeoplePickerComponent.js +1 -1
  182. package/lib-commonjs/controls/peoplepicker/PeoplePickerComponent.js.map +1 -1
  183. package/lib-commonjs/controls/peoplepicker/PeoplePickerComponent.module.scss.css +3 -0
  184. package/lib-commonjs/controls/progress/Progress.module.scss.css +3 -0
  185. package/lib-commonjs/controls/siteBreadcrumb/SiteBreadcrumb.module.scss.css +3 -0
  186. package/lib-commonjs/controls/taxonomyPicker/TaxonomyPicker.module.scss.css +3 -0
  187. package/lib-commonjs/controls/toolbar/Toolbar.module.scss.css +3 -0
  188. package/lib-commonjs/controls/viewPicker/ViewPicker.module.scss.css +3 -0
  189. package/lib-commonjs/controls/webPartTitle/WebPartTitle.module.scss.css +3 -0
  190. package/lib-commonjs/extensions/ootbFields/OotbFieldsFieldCustomizer.js +1 -1
  191. package/lib-commonjs/extensions/ootbFields/OotbFieldsFieldCustomizer.js.map +1 -1
  192. package/lib-commonjs/extensions/ootbFields/components/Customizer/OotbFields.js +1 -1
  193. package/lib-commonjs/extensions/ootbFields/components/Customizer/OotbFields.js.map +1 -1
  194. package/lib-commonjs/extensions/ootbFields/components/Customizer/OotbFields.module.scss.css +3 -0
  195. package/lib-commonjs/extensions/testApp/TestApp.module.scss.css +3 -0
  196. package/lib-commonjs/extensions/testForm/components/TestForm.module.scss.css +3 -0
  197. package/lib-commonjs/loc/bg-bg.js.map +1 -1
  198. package/lib-commonjs/loc/ca-es.js.map +1 -1
  199. package/lib-commonjs/loc/cs-cz.js.map +1 -1
  200. package/lib-commonjs/loc/da-dk.js.map +1 -1
  201. package/lib-commonjs/loc/de-de.js.map +1 -1
  202. package/lib-commonjs/loc/el-gr.js.map +1 -1
  203. package/lib-commonjs/loc/en-us.js.map +1 -1
  204. package/lib-commonjs/loc/es-es.js.map +1 -1
  205. package/lib-commonjs/loc/et-ee.js.map +1 -1
  206. package/lib-commonjs/loc/eu-es.js.map +1 -1
  207. package/lib-commonjs/loc/fi-fi.js.map +1 -1
  208. package/lib-commonjs/loc/fr-ca.js.map +1 -1
  209. package/lib-commonjs/loc/fr-fr.js.map +1 -1
  210. package/lib-commonjs/loc/it-it.js.map +1 -1
  211. package/lib-commonjs/loc/ja-jp.js.map +1 -1
  212. package/lib-commonjs/loc/lt-lt.js.map +1 -1
  213. package/lib-commonjs/loc/lv-lv.js.map +1 -1
  214. package/lib-commonjs/loc/nb-no.js.map +1 -1
  215. package/lib-commonjs/loc/nl-nl.js.map +1 -1
  216. package/lib-commonjs/loc/pl-pl.js.map +1 -1
  217. package/lib-commonjs/loc/pt-br.js.map +1 -1
  218. package/lib-commonjs/loc/pt-pt.js.map +1 -1
  219. package/lib-commonjs/loc/ro-ro.js.map +1 -1
  220. package/lib-commonjs/loc/ru-ru.js.map +1 -1
  221. package/lib-commonjs/loc/sk-sk.js.map +1 -1
  222. package/lib-commonjs/loc/sr-latn-rs.js.map +1 -1
  223. package/lib-commonjs/loc/sv-se.js.map +1 -1
  224. package/lib-commonjs/loc/tr-tr.js.map +1 -1
  225. package/lib-commonjs/loc/vi-vn.js.map +1 -1
  226. package/lib-commonjs/loc/zh-cn.js.map +1 -1
  227. package/lib-commonjs/loc/zh-tw.js.map +1 -1
  228. package/lib-commonjs/services/PeopleSearchService.js +12 -5
  229. package/lib-commonjs/services/PeopleSearchService.js.map +1 -1
  230. package/lib-commonjs/services/SPService.js +7 -21
  231. package/lib-commonjs/services/SPService.js.map +1 -1
  232. package/lib-commonjs/webparts/controlsTest/components/ControlsTest.js +17 -22
  233. package/lib-commonjs/webparts/controlsTest/components/ControlsTest.js.map +1 -1
  234. package/package.json +26 -29
  235. package/release/analysis-logs/lint.sarif +27851 -3
  236. package/release/component-dependency-audit/sp-dev-fx-controls-react.json +85 -85
  237. package/release/manifests/45165954-80f9-44c1-9967-cd38ae92a33b.manifest.json +9 -9
  238. package/release/manifests/57ebd944-98ed-43f9-b722-e959d6dac6ad.manifest.json +5 -5
  239. package/release/manifests/ca9eac70-7343-4972-88d6-672d50e9cf38.manifest.json +3 -3
  240. package/release/manifests/f9c6b930-8d5d-4550-bfd9-ed5f6ca443a8.manifest.json +6 -6
  241. package/.eslintrc.js +0 -328
  242. package/upgrade.md +0 -923
  243. /package/lib/controls/accessibleAccordion/css/{AccordionStylesOverride.css → AccordionStylesOverride.css.css} +0 -0
  244. /package/lib/controls/adaptiveCardDesignerHost/{AdaptiveCardDesigner.Styles.css → AdaptiveCardDesigner.Styles.css.css} +0 -0
  245. /package/lib/controls/toolbar/{toolbar.css → toolbar.css.css} +0 -0
  246. /package/lib-commonjs/controls/accessibleAccordion/css/{AccordionStylesOverride.css → AccordionStylesOverride.css.css} +0 -0
  247. /package/lib-commonjs/controls/adaptiveCardDesignerHost/{AdaptiveCardDesigner.Styles.css → AdaptiveCardDesigner.Styles.css.css} +0 -0
  248. /package/lib-commonjs/controls/toolbar/{toolbar.css → toolbar.css.css} +0 -0
@@ -14,7 +14,7 @@
14
14
  "scriptResources": {
15
15
  "controls-test-form-customizer": {
16
16
  "type": "path",
17
- "path": "controls-test-form-customizer_aad389c92dbf2aac4c72.js"
17
+ "path": "controls-test-form-customizer_8fed2f6a74afa0d6fe01.js"
18
18
  },
19
19
  "react": {
20
20
  "type": "component",
@@ -29,17 +29,17 @@
29
29
  "@microsoft/sp-core-library": {
30
30
  "type": "component",
31
31
  "id": "7263c7d0-1d6a-45ec-8d85-d4d1d234171b",
32
- "version": "1.22.2"
32
+ "version": "1.23.0"
33
33
  },
34
34
  "@microsoft/sp-listview-extensibility": {
35
35
  "type": "component",
36
36
  "id": "d37b65ee-c7d8-4570-bc74-2b294ff3b380",
37
- "version": "1.22.2"
37
+ "version": "1.23.0"
38
38
  },
39
39
  "@microsoft/sp-webpart-base": {
40
40
  "type": "component",
41
41
  "id": "974a7777-0990-4136-8fa6-95d80114c2e0",
42
- "version": "1.22.2"
42
+ "version": "1.23.0"
43
43
  },
44
44
  "ControlStrings": {
45
45
  "type": "localizedPath",
@@ -81,12 +81,12 @@
81
81
  "@microsoft/sp-lodash-subset": {
82
82
  "type": "component",
83
83
  "id": "73e1dc6c-8441-42cc-ad47-4bd3659f8a3a",
84
- "version": "1.22.2"
84
+ "version": "1.23.0"
85
85
  },
86
86
  "@microsoft/sp-http": {
87
87
  "type": "component",
88
88
  "id": "c07208f0-ea3b-4c1a-9965-ac1b825211a6",
89
- "version": "1.22.2"
89
+ "version": "1.23.0"
90
90
  }
91
91
  }
92
92
  }
package/.eslintrc.js DELETED
@@ -1,328 +0,0 @@
1
- require('@rushstack/eslint-config/patch/modern-module-resolution');
2
- module.exports = {
3
- extends: ['@microsoft/eslint-config-spfx/lib/profiles/react'],
4
- parserOptions: { tsconfigRootDir: __dirname },
5
- ignorePatterns: [
6
- "src/webparts/controlsTest/components/*.tsx",
7
- "src/webparts/controlsTest/ControlsTestWebPart.ts",
8
- "src/loc/*.ts",
9
- "src/extensions/ootbFields/**/*.ts",
10
- "src/extensions/ootbFields/**/*.tsx"
11
- ],
12
- overrides: [
13
- {
14
- files: ['*.ts', '*.tsx'],
15
- parser: '@typescript-eslint/parser',
16
- 'parserOptions': {
17
- 'project': './tsconfig.json',
18
- 'ecmaVersion': 2018,
19
- 'sourceType': 'module'
20
- },
21
- rules: {
22
- // Require chunk names for dynamic imports in SPFx projects. https://www.npmjs.com/package/@rushstack/eslint-plugin
23
- '@rushstack/import-requires-chunk-name': 1,
24
- // Prevent usage of the JavaScript null value, while allowing code to access existing APIs that may require null. https://www.npmjs.com/package/@rushstack/eslint-plugin
25
- '@rushstack/no-new-null': 1,
26
- // Require Jest module mocking APIs to be called before any other statements in their code block. https://www.npmjs.com/package/@rushstack/eslint-plugin
27
- '@rushstack/hoist-jest-mock': 1,
28
- // Require regular expressions to be constructed from string constants rather than dynamically building strings at runtime. https://www.npmjs.com/package/@rushstack/eslint-plugin-security
29
- '@rushstack/security/no-unsafe-regexp': 0,
30
- // STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json
31
- '@typescript-eslint/adjacent-overload-signatures': 1,
32
- // RATIONALE: Code is more readable when the type of every variable is immediately obvious.
33
- // Even if the compiler may be able to infer a type, this inference will be unavailable
34
- // to a person who is reviewing a GitHub diff. This rule makes writing code harder,
35
- // but writing code is a much less important activity than reading it.
36
- //
37
- // STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json
38
- '@typescript-eslint/explicit-function-return-type': [
39
- 1,
40
- {
41
- 'allowExpressions': true,
42
- 'allowTypedFunctionExpressions': true,
43
- 'allowHigherOrderFunctions': false
44
- }
45
- ],
46
- // STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json
47
- // Rationale to disable: although this is a recommended rule, it is up to dev to select coding style.
48
- // Set to 1 (warning) or 2 (error) to enable.
49
- '@typescript-eslint/explicit-member-accessibility': 0,
50
- // STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json
51
- '@typescript-eslint/no-array-constructor': 1,
52
- // STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json
53
- //
54
- // RATIONALE: The "any" keyword disables static type checking, the main benefit of using TypeScript.
55
- // This rule should be suppressed only in very special cases such as JSON.stringify()
56
- // where the type really can be anything. Even if the type is flexible, another type
57
- // may be more appropriate such as "unknown", "{}", or "Record<k,V>".
58
- '@typescript-eslint/no-explicit-any': 1,
59
- // RATIONALE: The #1 rule of promises is that every promise chain must be terminated by a catch()
60
- // handler. Thus wherever a Promise arises, the code must either append a catch handler,
61
- // or else return the object to a caller (who assumes this responsibility). Unterminated
62
- // promise chains are a serious issue. Besides causing errors to be silently ignored,
63
- // they can also cause a NodeJS process to terminate unexpectedly.
64
- '@typescript-eslint/no-floating-promises': 2,
65
- // RATIONALE: Catches a common coding mistake.
66
- '@typescript-eslint/no-for-in-array': 2,
67
- // STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json
68
- '@typescript-eslint/no-misused-new': 2,
69
- // RATIONALE: The "namespace" keyword is not recommended for organizing code because JavaScript lacks
70
- // a "using" statement to traverse namespaces. Nested namespaces prevent certain bundler
71
- // optimizations. If you are declaring loose functions/variables, it's better to make them
72
- // static members of a class, since classes support property getters and their private
73
- // members are accessible by unit tests. Also, the exercise of choosing a meaningful
74
- // class name tends to produce more discoverable APIs: for example, search+replacing
75
- // the function "reverse()" is likely to return many false matches, whereas if we always
76
- // write "Text.reverse()" is more unique. For large scale organization, it's recommended
77
- // to decompose your code into separate NPM packages, which ensures that component
78
- // dependencies are tracked more conscientiously.
79
- //
80
- // STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json
81
- '@typescript-eslint/no-namespace': [
82
- 1,
83
- {
84
- 'allowDeclarations': false,
85
- 'allowDefinitionFiles': false
86
- }
87
- ],
88
- // RATIONALE: Parameter properties provide a shorthand such as "constructor(public title: string)"
89
- // that avoids the effort of declaring "title" as a field. This TypeScript feature makes
90
- // code easier to write, but arguably sacrifices readability: In the notes for
91
- // "@typescript-eslint/member-ordering" we pointed out that fields are central to
92
- // a class's design, so we wouldn't want to bury them in a constructor signature
93
- // just to save some typing.
94
- //
95
- // STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json
96
- // Set to 1 (warning) or 2 (error) to enable the rule
97
- '@typescript-eslint/parameter-properties': 0,
98
- // RATIONALE: When left in shipping code, unused variables often indicate a mistake. Dead code
99
- // may impact performance.
100
- //
101
- // STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json
102
- '@typescript-eslint/no-unused-vars': [
103
- 1,
104
- {
105
- 'vars': 'all',
106
- // Unused function arguments often indicate a mistake in JavaScript code. However in TypeScript code,
107
- // the compiler catches most of those mistakes, and unused arguments are fairly common for type signatures
108
- // that are overriding a base class method or implementing an interface.
109
- 'args': 'none'
110
- }
111
- ],
112
- // STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json
113
- '@typescript-eslint/no-use-before-define': [
114
- 2,
115
- {
116
- 'functions': false,
117
- 'classes': true,
118
- 'variables': true,
119
- 'enums': true,
120
- 'typedefs': true
121
- }
122
- ],
123
- // Disallows require statements except in import statements.
124
- // In other words, the use of forms such as var foo = require("foo") are banned. Instead use ES6 style imports or import foo = require("foo") imports.
125
- '@typescript-eslint/no-var-requires': 'error',
126
- // RATIONALE: The "module" keyword is deprecated except when describing legacy libraries.
127
- //
128
- // STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json
129
- '@typescript-eslint/prefer-namespace-keyword': 1,
130
- // STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json
131
- // Rationale to disable: it's up to developer to decide if he wants to add type annotations
132
- // Set to 1 (warning) or 2 (error) to enable the rule
133
- '@typescript-eslint/no-inferrable-types': 0,
134
- // STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json
135
- // Rationale to disable: declaration of empty interfaces may be helpful for generic types scenarios
136
- '@typescript-eslint/no-empty-interface': 0,
137
- // RATIONALE: This rule warns if setters are defined without getters, which is probably a mistake.
138
- 'accessor-pairs': 1,
139
- // RATIONALE: In TypeScript, if you write x["y"] instead of x.y, it disables type checking.
140
- 'dot-notation': [
141
- 1,
142
- {
143
- 'allowPattern': '^_'
144
- }
145
- ],
146
- // RATIONALE: Catches code that is likely to be incorrect
147
- 'eqeqeq': 1,
148
- // STANDARDIZED BY: eslint\conf\eslint-recommended.js
149
- 'for-direction': 1,
150
- // RATIONALE: Catches a common coding mistake.
151
- 'guard-for-in': 2,
152
- // RATIONALE: If you have more than 2,000 lines in a single source file, it's probably time
153
- // to split up your code.
154
- 'max-lines': ['warn', { max: 2000 }],
155
- // STANDARDIZED BY: eslint\conf\eslint-recommended.js
156
- 'no-async-promise-executor': 2,
157
- // RATIONALE: Deprecated language feature.
158
- 'no-caller': 2,
159
- // STANDARDIZED BY: eslint\conf\eslint-recommended.js
160
- 'no-compare-neg-zero': 2,
161
- // STANDARDIZED BY: eslint\conf\eslint-recommended.js
162
- 'no-cond-assign': 2,
163
- // STANDARDIZED BY: eslint\conf\eslint-recommended.js
164
- 'no-constant-condition': 1,
165
- // STANDARDIZED BY: eslint\conf\eslint-recommended.js
166
- 'no-control-regex': 2,
167
- // STANDARDIZED BY: eslint\conf\eslint-recommended.js
168
- 'no-debugger': 1,
169
- // STANDARDIZED BY: eslint\conf\eslint-recommended.js
170
- 'no-delete-var': 2,
171
- // RATIONALE: Catches code that is likely to be incorrect
172
- // STANDARDIZED BY: eslint\conf\eslint-recommended.js
173
- 'no-duplicate-case': 2,
174
- // STANDARDIZED BY: eslint\conf\eslint-recommended.js
175
- 'no-empty': 1,
176
- // STANDARDIZED BY: eslint\conf\eslint-recommended.js
177
- 'no-empty-character-class': 2,
178
- // STANDARDIZED BY: eslint\conf\eslint-recommended.js
179
- 'no-empty-pattern': 1,
180
- // RATIONALE: Eval is a security concern and a performance concern.
181
- 'no-eval': 1,
182
- // RATIONALE: Catches code that is likely to be incorrect
183
- // STANDARDIZED BY: eslint\conf\eslint-recommended.js
184
- 'no-ex-assign': 2,
185
- // RATIONALE: System types are global and should not be tampered with in a scalable code base.
186
- // If two different libraries (or two versions of the same library) both try to modify
187
- // a type, only one of them can win. Polyfills are acceptable because they implement
188
- // a standardized interoperable contract, but polyfills are generally coded in plain
189
- // JavaScript.
190
- 'no-extend-native': 1,
191
- // Disallow unnecessary labels
192
- 'no-extra-label': 1,
193
- // STANDARDIZED BY: eslint\conf\eslint-recommended.js
194
- 'no-fallthrough': 2,
195
- // STANDARDIZED BY: eslint\conf\eslint-recommended.js
196
- 'no-func-assign': 1,
197
- // RATIONALE: Catches a common coding mistake.
198
- 'no-implied-eval': 2,
199
- // STANDARDIZED BY: eslint\conf\eslint-recommended.js
200
- 'no-invalid-regexp': 2,
201
- // RATIONALE: Catches a common coding mistake.
202
- 'no-label-var': 2,
203
- // RATIONALE: Eliminates redundant code.
204
- 'no-lone-blocks': 1,
205
- // STANDARDIZED BY: eslint\conf\eslint-recommended.js
206
- 'no-misleading-character-class': 2,
207
- // RATIONALE: Catches a common coding mistake.
208
- 'no-multi-str': 2,
209
- // RATIONALE: It's generally a bad practice to call "new Thing()" without assigning the result to
210
- // a variable. Either it's part of an awkward expression like "(new Thing()).doSomething()",
211
- // or else implies that the constructor is doing nontrivial computations, which is often
212
- // a poor class design.
213
- 'no-new': 1,
214
- // RATIONALE: Obsolete language feature that is deprecated.
215
- 'no-new-func': 2,
216
- // RATIONALE: Obsolete language feature that is deprecated.
217
- 'no-new-object': 2,
218
- // RATIONALE: Obsolete notation.
219
- 'no-new-wrappers': 1,
220
- // RATIONALE: Catches code that is likely to be incorrect
221
- // STANDARDIZED BY: eslint\conf\eslint-recommended.js
222
- 'no-octal': 2,
223
- // RATIONALE: Catches code that is likely to be incorrect
224
- 'no-octal-escape': 2,
225
- // RATIONALE: Catches code that is likely to be incorrect
226
- // STANDARDIZED BY: eslint\conf\eslint-recommended.js
227
- 'no-regex-spaces': 2,
228
- // RATIONALE: Catches a common coding mistake.
229
- 'no-return-assign': 2,
230
- // RATIONALE: Security risk.
231
- 'no-script-url': 1,
232
- // STANDARDIZED BY: eslint\conf\eslint-recommended.js
233
- 'no-self-assign': 2,
234
- // RATIONALE: Catches a common coding mistake.
235
- 'no-self-compare': 2,
236
- // RATIONALE: This avoids statements such as "while (a = next(), a && a.length);" that use
237
- // commas to create compound expressions. In general code is more readable if each
238
- // step is split onto a separate line. This also makes it easier to set breakpoints
239
- // in the debugger.
240
- 'no-sequences': 1,
241
- // RATIONALE: Catches code that is likely to be incorrect
242
- // STANDARDIZED BY: eslint\conf\eslint-recommended.js
243
- 'no-shadow-restricted-names': 2,
244
- // RATIONALE: Obsolete language feature that is deprecated.
245
- // STANDARDIZED BY: eslint\conf\eslint-recommended.js
246
- 'no-sparse-arrays': 2,
247
- // RATIONALE: Although in theory JavaScript allows any possible data type to be thrown as an exception,
248
- // such flexibility adds pointless complexity, by requiring every catch block to test
249
- // the type of the object that it receives. Whereas if catch blocks can always assume
250
- // that their object implements the "Error" contract, then the code is simpler, and
251
- // we generally get useful additional information like a call stack.
252
- 'no-throw-literal': 2,
253
- // RATIONALE: Catches a common coding mistake.
254
- 'no-unmodified-loop-condition': 1,
255
- // STANDARDIZED BY: eslint\conf\eslint-recommended.js
256
- 'no-unsafe-finally': 2,
257
- // RATIONALE: Catches a common coding mistake.
258
- 'no-unused-expressions': 1,
259
- // STANDARDIZED BY: eslint\conf\eslint-recommended.js
260
- 'no-unused-labels': 1,
261
- // STANDARDIZED BY: eslint\conf\eslint-recommended.js
262
- 'no-useless-catch': 1,
263
- // RATIONALE: Avoids a potential performance problem.
264
- 'no-useless-concat': 1,
265
- // RATIONALE: The "var" keyword is deprecated because of its confusing "hoisting" behavior.
266
- // Always use "let" or "const" instead.
267
- //
268
- // STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json
269
- 'no-var': 2,
270
- // RATIONALE: Generally not needed in modern code.
271
- 'no-void': 1,
272
- // RATIONALE: Obsolete language feature that is deprecated.
273
- // STANDARDIZED BY: eslint\conf\eslint-recommended.js
274
- 'no-with': 2,
275
- // RATIONALE: Makes logic easier to understand, since constants always have a known value
276
- // @typescript-eslint\eslint-plugin\dist\configs\eslint-recommended.js
277
- 'prefer-const': 1,
278
- // RATIONALE: Catches a common coding mistake where "resolve" and "reject" are confused.
279
- 'promise/param-names': 2,
280
- // RATIONALE: Catches code that is likely to be incorrect
281
- // STANDARDIZED BY: eslint\conf\eslint-recommended.js
282
- 'require-atomic-updates': 2,
283
- // STANDARDIZED BY: eslint\conf\eslint-recommended.js
284
- 'require-yield': 1,
285
- // "Use strict" is redundant when using the TypeScript compiler.
286
- 'strict': [
287
- 2,
288
- 'never'
289
- ],
290
- // RATIONALE: Catches code that is likely to be incorrect
291
- // STANDARDIZED BY: eslint\conf\eslint-recommended.js
292
- 'use-isnan': 2,
293
- // STANDARDIZED BY: eslint\conf\eslint-recommended.js
294
- // Set to 1 (warning) or 2 (error) to enable.
295
- // Rationale to disable: !!{}
296
- 'no-extra-boolean-cast': 0,
297
- // ====================================================================
298
- // @microsoft/eslint-plugin-spfx
299
- // ====================================================================
300
- '@microsoft/spfx/no-require-ensure': 2
301
- }
302
- },
303
- {
304
- // For unit tests, we can be a little bit less strict. The settings below revise the
305
- // defaults specified in the extended configurations, as well as above.
306
- files: [
307
- // Test files
308
- '*.test.ts',
309
- '*.test.tsx',
310
- '*.spec.ts',
311
- '*.spec.tsx',
312
-
313
- // Facebook convention
314
- '**/__mocks__/*.ts',
315
- '**/__mocks__/*.tsx',
316
- '**/__tests__/*.ts',
317
- '**/__tests__/*.tsx',
318
-
319
- // Microsoft convention
320
- '**/test/*.ts',
321
- '**/test/*.tsx'
322
- ],
323
- rules: {
324
- "@typescript-eslint/no-empty-function": 0
325
- }
326
- }
327
- ]
328
- };