@stripe/stripe-react-native 0.64.0 → 0.65.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 (168) hide show
  1. package/android/.idea/AndroidProjectSystem.xml +6 -0
  2. package/android/.idea/caches/deviceStreaming.xml +835 -0
  3. package/android/.idea/compiler.xml +6 -0
  4. package/android/.idea/gradle.xml +17 -0
  5. package/android/.idea/migrations.xml +10 -0
  6. package/android/.idea/misc.xml +10 -0
  7. package/android/.idea/runConfigurations.xml +17 -0
  8. package/android/.idea/vcs.xml +6 -0
  9. package/android/build.gradle +2 -2
  10. package/android/detekt/detekt-baseline.xml +146 -0
  11. package/android/detekt/detekt.gradle +45 -0
  12. package/android/detekt/detekt.yml +722 -0
  13. package/android/gradle.properties +1 -1
  14. package/android/local.properties +8 -0
  15. package/android/src/main/java/com/reactnativestripesdk/PaymentLauncherManager.kt +0 -1
  16. package/android/src/main/java/com/reactnativestripesdk/PaymentMethodMessagingElementConfig.kt +2 -3
  17. package/android/src/main/java/com/reactnativestripesdk/StripeSdkModule.kt +76 -4
  18. package/android/src/main/java/com/reactnativestripesdk/utils/Mappers.kt +0 -4
  19. package/android/src/oldarch/java/com/reactnativestripesdk/NativeStripeSdkModuleSpec.java +36 -0
  20. package/android/src/test/java/com/reactnativestripesdk/PaymentMethodMessagingElementConfigTest.kt +3 -3
  21. package/ios/Mappers.swift +0 -5
  22. package/ios/PaymentMethodMessagingElementConfig.swift +6 -3
  23. package/ios/PaymentMethodMessagingElementView.swift +19 -0
  24. package/ios/StripeSdkImpl.swift +0 -92
  25. package/jest/mock.js +1 -0
  26. package/lib/commonjs/components/AddToWalletButton.js +1 -1
  27. package/lib/commonjs/components/AddToWalletButton.js.map +1 -1
  28. package/lib/commonjs/components/AddressSheet.js +1 -1
  29. package/lib/commonjs/components/AddressSheet.js.map +1 -1
  30. package/lib/commonjs/components/AuBECSDebitForm.js +1 -1
  31. package/lib/commonjs/components/AuBECSDebitForm.js.map +1 -1
  32. package/lib/commonjs/components/CardField.js +1 -1
  33. package/lib/commonjs/components/CardField.js.map +1 -1
  34. package/lib/commonjs/components/CardForm.js +1 -1
  35. package/lib/commonjs/components/CardForm.js.map +1 -1
  36. package/lib/commonjs/components/PaymentMethodMessagingElement.js +2 -0
  37. package/lib/commonjs/components/PaymentMethodMessagingElement.js.map +1 -0
  38. package/lib/commonjs/components/PlatformPayButton.js +1 -1
  39. package/lib/commonjs/components/PlatformPayButton.js.map +1 -1
  40. package/lib/commonjs/components/StripeContainer.js +1 -1
  41. package/lib/commonjs/components/StripeContainer.js.map +1 -1
  42. package/lib/commonjs/connect/Components.js +1 -1
  43. package/lib/commonjs/connect/Components.js.map +1 -1
  44. package/lib/commonjs/connect/ConnectComponentsProvider.js +1 -1
  45. package/lib/commonjs/connect/ConnectComponentsProvider.js.map +1 -1
  46. package/lib/commonjs/connect/EmbeddedComponent.js +1 -1
  47. package/lib/commonjs/connect/EmbeddedComponent.js.map +1 -1
  48. package/lib/commonjs/connect/ModalCloseButton.js +1 -1
  49. package/lib/commonjs/connect/ModalCloseButton.js.map +1 -1
  50. package/lib/commonjs/connect/NavigationBar.js +1 -1
  51. package/lib/commonjs/connect/NavigationBar.js.map +1 -1
  52. package/lib/commonjs/helpers.js +1 -1
  53. package/lib/commonjs/hooks/useCheckout.js +2 -0
  54. package/lib/commonjs/hooks/useCheckout.js.map +1 -0
  55. package/lib/commonjs/hooks/useOnramp.js +1 -1
  56. package/lib/commonjs/hooks/useOnramp.js.map +1 -1
  57. package/lib/commonjs/index.js +1 -1
  58. package/lib/commonjs/index.js.map +1 -1
  59. package/lib/commonjs/specs/NativeAddToWalletButton.js +1 -1
  60. package/lib/commonjs/specs/NativeAddressSheet.js +1 -1
  61. package/lib/commonjs/specs/NativeApplePayButton.js +1 -1
  62. package/lib/commonjs/specs/NativeAuBECSDebitForm.js +1 -1
  63. package/lib/commonjs/specs/NativeCardField.js +1 -1
  64. package/lib/commonjs/specs/NativeCardField.js.map +1 -1
  65. package/lib/commonjs/specs/NativeCardForm.js +1 -1
  66. package/lib/commonjs/specs/NativeCardForm.js.map +1 -1
  67. package/lib/commonjs/specs/NativeConnectAccountOnboardingView.js +1 -1
  68. package/lib/commonjs/specs/NativeEmbeddedPaymentElement.js +1 -1
  69. package/lib/commonjs/specs/NativeEmbeddedPaymentElement.js.map +1 -1
  70. package/lib/commonjs/specs/NativeGooglePayButton.js +1 -1
  71. package/lib/commonjs/specs/NativeNavigationBar.js +1 -1
  72. package/lib/commonjs/specs/NativePaymentMethodMessagingElement.js +1 -1
  73. package/lib/commonjs/specs/NativePaymentMethodMessagingElement.js.map +1 -1
  74. package/lib/commonjs/specs/NativeStripeContainer.js +1 -1
  75. package/lib/commonjs/specs/NativeStripeSdkModule.js.map +1 -1
  76. package/lib/commonjs/types/Checkout.js +2 -0
  77. package/lib/commonjs/types/Checkout.js.map +1 -0
  78. package/lib/commonjs/types/EmbeddedPaymentElement.js +1 -1
  79. package/lib/commonjs/types/EmbeddedPaymentElement.js.map +1 -1
  80. package/lib/commonjs/types/PaymentSheet.js.map +1 -1
  81. package/lib/module/components/AddToWalletButton.js +1 -1
  82. package/lib/module/components/AddToWalletButton.js.map +1 -1
  83. package/lib/module/components/AddressSheet.js +1 -1
  84. package/lib/module/components/AddressSheet.js.map +1 -1
  85. package/lib/module/components/AuBECSDebitForm.js +1 -1
  86. package/lib/module/components/AuBECSDebitForm.js.map +1 -1
  87. package/lib/module/components/CardField.js +1 -1
  88. package/lib/module/components/CardField.js.map +1 -1
  89. package/lib/module/components/CardForm.js +1 -1
  90. package/lib/module/components/CardForm.js.map +1 -1
  91. package/lib/module/components/PaymentMethodMessagingElement.js +2 -0
  92. package/lib/module/components/PaymentMethodMessagingElement.js.map +1 -0
  93. package/lib/module/components/PlatformPayButton.js +1 -1
  94. package/lib/module/components/PlatformPayButton.js.map +1 -1
  95. package/lib/module/components/StripeContainer.js +1 -1
  96. package/lib/module/components/StripeContainer.js.map +1 -1
  97. package/lib/module/connect/Components.js +1 -1
  98. package/lib/module/connect/Components.js.map +1 -1
  99. package/lib/module/connect/ConnectComponentsProvider.js +1 -1
  100. package/lib/module/connect/ConnectComponentsProvider.js.map +1 -1
  101. package/lib/module/connect/EmbeddedComponent.js +1 -1
  102. package/lib/module/connect/EmbeddedComponent.js.map +1 -1
  103. package/lib/module/connect/ModalCloseButton.js +1 -1
  104. package/lib/module/connect/ModalCloseButton.js.map +1 -1
  105. package/lib/module/connect/NavigationBar.js +1 -1
  106. package/lib/module/connect/NavigationBar.js.map +1 -1
  107. package/lib/module/helpers.js +1 -1
  108. package/lib/module/hooks/useCheckout.js +2 -0
  109. package/lib/module/hooks/useCheckout.js.map +1 -0
  110. package/lib/module/hooks/useOnramp.js +1 -1
  111. package/lib/module/hooks/useOnramp.js.map +1 -1
  112. package/lib/module/index.js +1 -1
  113. package/lib/module/index.js.map +1 -1
  114. package/lib/module/specs/NativeAddToWalletButton.js +1 -1
  115. package/lib/module/specs/NativeAddressSheet.js +1 -1
  116. package/lib/module/specs/NativeApplePayButton.js +1 -1
  117. package/lib/module/specs/NativeAuBECSDebitForm.js +1 -1
  118. package/lib/module/specs/NativeCardField.js +1 -1
  119. package/lib/module/specs/NativeCardField.js.map +1 -1
  120. package/lib/module/specs/NativeCardForm.js +1 -1
  121. package/lib/module/specs/NativeCardForm.js.map +1 -1
  122. package/lib/module/specs/NativeConnectAccountOnboardingView.js +1 -1
  123. package/lib/module/specs/NativeEmbeddedPaymentElement.js +1 -1
  124. package/lib/module/specs/NativeEmbeddedPaymentElement.js.map +1 -1
  125. package/lib/module/specs/NativeGooglePayButton.js +1 -1
  126. package/lib/module/specs/NativeNavigationBar.js +1 -1
  127. package/lib/module/specs/NativePaymentMethodMessagingElement.js +1 -1
  128. package/lib/module/specs/NativePaymentMethodMessagingElement.js.map +1 -1
  129. package/lib/module/specs/NativeStripeContainer.js +1 -1
  130. package/lib/module/specs/NativeStripeSdkModule.js.map +1 -1
  131. package/lib/module/types/Checkout.js +2 -0
  132. package/lib/module/types/Checkout.js.map +1 -0
  133. package/lib/module/types/EmbeddedPaymentElement.js +1 -1
  134. package/lib/module/types/EmbeddedPaymentElement.js.map +1 -1
  135. package/lib/module/types/PaymentSheet.js.map +1 -1
  136. package/lib/typescript/src/components/PaymentMethodMessagingElement.d.ts +41 -0
  137. package/lib/typescript/src/components/PaymentMethodMessagingElement.d.ts.map +1 -0
  138. package/lib/typescript/src/hooks/useCheckout.d.ts +21 -0
  139. package/lib/typescript/src/hooks/useCheckout.d.ts.map +1 -0
  140. package/lib/typescript/src/hooks/useOnramp.d.ts +1 -0
  141. package/lib/typescript/src/hooks/useOnramp.d.ts.map +1 -1
  142. package/lib/typescript/src/index.d.ts +3 -0
  143. package/lib/typescript/src/index.d.ts.map +1 -1
  144. package/lib/typescript/src/specs/NativePaymentMethodMessagingElement.d.ts +1 -6
  145. package/lib/typescript/src/specs/NativePaymentMethodMessagingElement.d.ts.map +1 -1
  146. package/lib/typescript/src/specs/NativeStripeSdkModule.d.ts +13 -0
  147. package/lib/typescript/src/specs/NativeStripeSdkModule.d.ts.map +1 -1
  148. package/lib/typescript/src/types/Checkout.d.ts +336 -0
  149. package/lib/typescript/src/types/Checkout.d.ts.map +1 -0
  150. package/lib/typescript/src/types/PaymentMethod.d.ts +1 -5
  151. package/lib/typescript/src/types/PaymentMethod.d.ts.map +1 -1
  152. package/lib/typescript/src/types/PaymentSheet.d.ts +22 -6
  153. package/lib/typescript/src/types/PaymentSheet.d.ts.map +1 -1
  154. package/lib/typescript/src/types/components/PaymentMethodMessagingElementComponent.d.ts +16 -1
  155. package/lib/typescript/src/types/components/PaymentMethodMessagingElementComponent.d.ts.map +1 -1
  156. package/package.json +8 -5
  157. package/src/components/PaymentMethodMessagingElement.tsx +109 -0
  158. package/src/hooks/useCheckout.tsx +168 -0
  159. package/src/hooks/useOnramp.tsx +9 -3
  160. package/src/index.tsx +4 -0
  161. package/src/specs/NativePaymentMethodMessagingElement.ts +0 -7
  162. package/src/specs/NativeStripeSdkModule.ts +50 -0
  163. package/src/types/Checkout.ts +377 -0
  164. package/src/types/PaymentMethod.ts +0 -6
  165. package/src/types/PaymentSheet.ts +29 -6
  166. package/src/types/components/PaymentMethodMessagingElementComponent.tsx +17 -1
  167. package/stripe-react-native.podspec +8 -8
  168. package/android/spotless.gradle +0 -19
@@ -0,0 +1,722 @@
1
+ config:
2
+ validation: true
3
+ warningsAsErrors: false
4
+ checkExhaustiveness: false
5
+ # when writing own rules with new properties, exclude the property path e.g.: ['my_rule_set', '.*>.*>[my_property]']
6
+ excludes: []
7
+
8
+ processors:
9
+ active: true
10
+ exclude:
11
+ - 'DetektProgressListener'
12
+ # - 'KtFileCountProcessor'
13
+ # - 'PackageCountProcessor'
14
+ # - 'ClassCountProcessor'
15
+ # - 'FunctionCountProcessor'
16
+ # - 'PropertyCountProcessor'
17
+ # - 'ProjectComplexityProcessor'
18
+ # - 'ProjectCognitiveComplexityProcessor'
19
+ # - 'ProjectLLOCProcessor'
20
+ # - 'ProjectCLOCProcessor'
21
+ # - 'ProjectLOCProcessor'
22
+ # - 'ProjectSLOCProcessor'
23
+ # - 'LicenseHeaderLoaderExtension'
24
+
25
+ console-reports:
26
+ active: true
27
+ exclude:
28
+ - 'ProjectStatisticsReport'
29
+ - 'ComplexityReport'
30
+ - 'NotificationReport'
31
+ # - 'IssuesReport'
32
+ - 'FileBasedIssuesReport'
33
+ - 'LiteIssuesReport'
34
+
35
+ comments:
36
+ active: true
37
+ AbsentOrWrongFileLicense:
38
+ active: false
39
+ licenseTemplate: ''
40
+ licenseTemplateIsRegex: false
41
+ DocumentationOverPrivateFunction:
42
+ active: false
43
+ DocumentationOverPrivateProperty:
44
+ active: false
45
+ DeprecatedBlockTag:
46
+ active: false
47
+ EndOfSentenceFormat:
48
+ active: false
49
+ endOfSentenceFormat: '([.?!][ \t\n\r\f<])|([.?!:]$)'
50
+ OutdatedDocumentation:
51
+ active: false
52
+ matchTypeParameters: true
53
+ matchDeclarationsOrder: true
54
+ UndocumentedPublicClass:
55
+ active: false
56
+ excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**']
57
+ searchInNestedClass: true
58
+ searchInInnerClass: true
59
+ searchInInnerObject: true
60
+ searchInInnerInterface: true
61
+ UndocumentedPublicFunction:
62
+ active: false
63
+ excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**']
64
+ UndocumentedPublicProperty:
65
+ active: false
66
+ excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**']
67
+
68
+ complexity:
69
+ active: true
70
+ ComplexCondition:
71
+ active: true
72
+ allowedConditions: 4
73
+ ComplexInterface:
74
+ active: false
75
+ allowedDefinitions: 10
76
+ includeStaticDeclarations: false
77
+ includePrivateDeclarations: false
78
+ CyclomaticComplexMethod:
79
+ active: true
80
+ allowedComplexity: 15
81
+ ignoreSingleWhenExpression: false
82
+ ignoreSimpleWhenEntries: false
83
+ ignoreNestingFunctions: false
84
+ nestingFunctions:
85
+ - 'also'
86
+ - 'apply'
87
+ - 'forEach'
88
+ - 'isNotNull'
89
+ - 'ifNull'
90
+ - 'let'
91
+ - 'run'
92
+ - 'use'
93
+ - 'with'
94
+ LabeledExpression:
95
+ active: false
96
+ ignoredLabels: []
97
+ LargeClass:
98
+ active: true
99
+ allowedLines: 600
100
+ LongMethod:
101
+ active: true
102
+ allowedLines: 60
103
+ LongParameterList:
104
+ active: false
105
+ excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**']
106
+ allowedFunctionParameters: 6
107
+ allowedConstructorParameters: 7
108
+ ignoreDefaultParameters: true
109
+ ignoreDataClasses: true
110
+ ignoreAnnotatedParameter: []
111
+ MethodOverloading:
112
+ active: false
113
+ allowedOverloads: 6
114
+ NamedArguments:
115
+ active: false
116
+ allowedArguments: 3
117
+ NestedBlockDepth:
118
+ active: true
119
+ allowedDepth: 4
120
+ ReplaceSafeCallChainWithRun:
121
+ active: false
122
+ StringLiteralDuplication:
123
+ active: false
124
+ excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**']
125
+ allowedDuplications: 3
126
+ ignoreAnnotation: true
127
+ allowedWithLengthLessThan: 5
128
+ ignoreStringsRegex: '$^'
129
+ TooManyFunctions:
130
+ active: true
131
+ excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**']
132
+ allowedFunctionsPerFile: 11
133
+ allowedFunctionsPerClass: 11
134
+ allowedFunctionsPerInterface: 11
135
+ allowedFunctionsPerObject: 11
136
+ allowedFunctionsPerEnum: 11
137
+ ignoreDeprecated: false
138
+ ignorePrivate: true
139
+ ignoreOverridden: false
140
+
141
+ coroutines:
142
+ active: true
143
+ GlobalCoroutineUsage:
144
+ active: false
145
+ InjectDispatcher:
146
+ active: false
147
+ dispatcherNames:
148
+ - 'IO'
149
+ - 'Default'
150
+ - 'Unconfined'
151
+ RedundantSuspendModifier:
152
+ active: false
153
+ SleepInsteadOfDelay:
154
+ active: false
155
+ SuspendFunWithFlowReturnType:
156
+ active: false
157
+
158
+ empty-blocks:
159
+ active: true
160
+ EmptyCatchBlock:
161
+ active: true
162
+ allowedExceptionNameRegex: '_|(ignore|expected).*'
163
+ EmptyClassBlock:
164
+ active: true
165
+ EmptyDefaultConstructor:
166
+ active: true
167
+ EmptyDoWhileBlock:
168
+ active: true
169
+ EmptyElseBlock:
170
+ active: true
171
+ EmptyFinallyBlock:
172
+ active: true
173
+ EmptyForBlock:
174
+ active: true
175
+ EmptyFunctionBlock:
176
+ active: true
177
+ ignoreOverridden: false
178
+ EmptyIfBlock:
179
+ active: true
180
+ EmptyInitBlock:
181
+ active: true
182
+ EmptyKotlinFile:
183
+ active: true
184
+ EmptySecondaryConstructor:
185
+ active: true
186
+ EmptyTryBlock:
187
+ active: true
188
+ EmptyWhenBlock:
189
+ active: true
190
+ EmptyWhileBlock:
191
+ active: true
192
+
193
+ exceptions:
194
+ active: true
195
+ ExceptionRaisedInUnexpectedLocation:
196
+ active: true
197
+ methodNames:
198
+ - 'equals'
199
+ - 'finalize'
200
+ - 'hashCode'
201
+ - 'toString'
202
+ InstanceOfCheckForException:
203
+ active: false
204
+ excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**']
205
+ NotImplementedDeclaration:
206
+ active: false
207
+ ObjectExtendsThrowable:
208
+ active: false
209
+ PrintStackTrace:
210
+ active: true
211
+ RethrowCaughtException:
212
+ active: true
213
+ ReturnFromFinally:
214
+ active: true
215
+ ignoreLabeled: false
216
+ SwallowedException:
217
+ active: true
218
+ ignoredExceptionTypes:
219
+ - 'InterruptedException'
220
+ - 'MalformedURLException'
221
+ - 'NumberFormatException'
222
+ - 'ParseException'
223
+ allowedExceptionNameRegex: '_|(ignore|expected).*'
224
+ ThrowingExceptionFromFinally:
225
+ active: true
226
+ ThrowingExceptionInMain:
227
+ active: false
228
+ ThrowingExceptionsWithoutMessageOrCause:
229
+ active: true
230
+ excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**']
231
+ exceptions:
232
+ - 'ArrayIndexOutOfBoundsException'
233
+ - 'Exception'
234
+ - 'IllegalArgumentException'
235
+ - 'IllegalMonitorStateException'
236
+ - 'IllegalStateException'
237
+ - 'IndexOutOfBoundsException'
238
+ - 'NullPointerException'
239
+ - 'RuntimeException'
240
+ - 'Throwable'
241
+ ThrowingNewInstanceOfSameException:
242
+ active: true
243
+ TooGenericExceptionCaught:
244
+ active: true
245
+ excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**']
246
+ exceptionNames:
247
+ - 'ArrayIndexOutOfBoundsException'
248
+ - 'Error'
249
+ - 'Exception'
250
+ - 'IllegalMonitorStateException'
251
+ - 'IndexOutOfBoundsException'
252
+ - 'NullPointerException'
253
+ - 'RuntimeException'
254
+ - 'Throwable'
255
+ allowedExceptionNameRegex: '_|(ignore|expected).*'
256
+ TooGenericExceptionThrown:
257
+ active: true
258
+ exceptionNames:
259
+ - 'Error'
260
+ - 'Exception'
261
+ - 'RuntimeException'
262
+ - 'Throwable'
263
+
264
+ naming:
265
+ active: true
266
+ BooleanPropertyNaming:
267
+ active: false
268
+ excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**']
269
+ allowedPattern: '^(is|has|are)'
270
+ ClassNaming:
271
+ active: true
272
+ excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**']
273
+ classPattern: '[A-Z][a-zA-Z0-9]*'
274
+ ConstructorParameterNaming:
275
+ active: true
276
+ excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**']
277
+ parameterPattern: '[a-z][A-Za-z0-9]*'
278
+ privateParameterPattern: '[a-z][A-Za-z0-9]*'
279
+ excludeClassPattern: '$^'
280
+ EnumNaming:
281
+ active: true
282
+ excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**']
283
+ enumEntryPattern: '[A-Z][_a-zA-Z0-9]*'
284
+ ForbiddenClassName:
285
+ active: false
286
+ excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**']
287
+ forbiddenName: []
288
+ FunctionNameMaxLength:
289
+ active: false
290
+ excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**']
291
+ maximumFunctionNameLength: 30
292
+ FunctionNameMinLength:
293
+ active: false
294
+ excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**']
295
+ minimumFunctionNameLength: 3
296
+ FunctionNaming:
297
+ active: true
298
+ excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**']
299
+ functionPattern: '([a-zA-Z][a-zA-Z0-9]*)|(`.*`)'
300
+ excludeClassPattern: '$^'
301
+ FunctionParameterNaming:
302
+ active: true
303
+ excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**']
304
+ parameterPattern: '[a-z][A-Za-z0-9]*'
305
+ excludeClassPattern: '$^'
306
+ InvalidPackageDeclaration:
307
+ active: false
308
+ rootPackage: ''
309
+ LambdaParameterNaming:
310
+ active: false
311
+ excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**']
312
+ parameterPattern: '[a-z][A-Za-z0-9]*|_'
313
+ MatchingDeclarationName:
314
+ active: true
315
+ mustBeFirst: true
316
+ MemberNameEqualsClassName:
317
+ active: true
318
+ ignoreOverridden: true
319
+ NoNameShadowing:
320
+ active: false
321
+ NonBooleanPropertyPrefixedWithIs:
322
+ active: false
323
+ excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**']
324
+ ObjectPropertyNaming:
325
+ active: true
326
+ excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**']
327
+ constantPattern: '[A-Za-z][_A-Za-z0-9]*'
328
+ propertyPattern: '[A-Za-z][_A-Za-z0-9]*'
329
+ privatePropertyPattern: '(_)?[A-Za-z][_A-Za-z0-9]*'
330
+ PackageNaming:
331
+ active: true
332
+ excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**']
333
+ packagePattern: '[a-z]+(\.[a-z][A-Za-z0-9]*)*'
334
+ TopLevelPropertyNaming:
335
+ active: true
336
+ excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**']
337
+ constantPattern: '[A-Z][_A-Za-z0-9]*'
338
+ propertyPattern: '[A-Za-z][_A-Za-z0-9]*'
339
+ privatePropertyPattern: '_?[A-Za-z][_A-Za-z0-9]*'
340
+ VariableMaxLength:
341
+ active: false
342
+ excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**']
343
+ maximumVariableNameLength: 64
344
+ VariableMinLength:
345
+ active: false
346
+ excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**']
347
+ minimumVariableNameLength: 1
348
+ VariableNaming:
349
+ active: true
350
+ excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**']
351
+ variablePattern: '[a-z][A-Za-z0-9]*'
352
+ privateVariablePattern: '(_)?[a-z][A-Za-z0-9]*'
353
+ excludeClassPattern: '$^'
354
+
355
+ performance:
356
+ active: true
357
+ ArrayPrimitive:
358
+ active: true
359
+ ForEachOnRange:
360
+ active: true
361
+ excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**']
362
+ SpreadOperator:
363
+ active: true
364
+ excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**']
365
+ UnnecessaryTemporaryInstantiation:
366
+ active: true
367
+
368
+ potential-bugs:
369
+ active: true
370
+ AvoidReferentialEquality:
371
+ active: false
372
+ forbiddenTypePatterns:
373
+ - 'kotlin.String'
374
+ CastToNullableType:
375
+ active: false
376
+ Deprecation:
377
+ active: false
378
+ DontDowncastCollectionTypes:
379
+ active: false
380
+ DoubleMutabilityForCollection:
381
+ active: false
382
+ EqualsAlwaysReturnsTrueOrFalse:
383
+ active: true
384
+ EqualsWithHashCodeExist:
385
+ active: true
386
+ ExitOutsideMain:
387
+ active: false
388
+ ExplicitGarbageCollectionCall:
389
+ active: true
390
+ HasPlatformType:
391
+ active: false
392
+ IgnoredReturnValue:
393
+ active: false
394
+ restrictToConfig: true
395
+ returnValueAnnotations:
396
+ - '*.CheckResult'
397
+ - '*.CheckReturnValue'
398
+ ignoreReturnValueAnnotations:
399
+ - '*.CanIgnoreReturnValue'
400
+ ImplicitDefaultLocale:
401
+ active: true
402
+ ImplicitUnitReturnType:
403
+ active: false
404
+ allowExplicitReturnType: true
405
+ InvalidRange:
406
+ active: true
407
+ IteratorHasNextCallsNextMethod:
408
+ active: true
409
+ IteratorNotThrowingNoSuchElementException:
410
+ active: true
411
+ LateinitUsage:
412
+ active: false
413
+ excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**']
414
+ ignoreOnClassesPattern: ''
415
+ MapGetWithNotNullAssertionOperator:
416
+ active: false
417
+ MissingPackageDeclaration:
418
+ active: false
419
+ excludes: ['**/*.kts']
420
+ NullableToStringCall:
421
+ active: false
422
+ UnconditionalJumpStatementInLoop:
423
+ active: false
424
+ UnnecessaryNotNullOperator:
425
+ active: true
426
+ UnnecessarySafeCall:
427
+ active: true
428
+ UnreachableCatchBlock:
429
+ active: false
430
+ UnreachableCode:
431
+ active: true
432
+ UnsafeCallOnNullableType:
433
+ active: true
434
+ excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**']
435
+ UnsafeCast:
436
+ active: true
437
+ UnusedUnaryOperator:
438
+ active: false
439
+ UselessPostfixExpression:
440
+ active: false
441
+ WrongEqualsTypeParameter:
442
+ active: true
443
+
444
+ style:
445
+ active: true
446
+ AbstractClassCanBeConcreteClass:
447
+ active: true
448
+ AbstractClassCanBeInterface:
449
+ active: true
450
+ BracesOnIfStatements:
451
+ active: false
452
+ singleLine: 'never'
453
+ multiLine: 'always'
454
+ ClassOrdering:
455
+ active: false
456
+ CollapsibleIfStatements:
457
+ active: false
458
+ DataClassContainsFunctions:
459
+ active: false
460
+ conversionFunctionPrefix:
461
+ - 'to'
462
+ DataClassShouldBeImmutable:
463
+ active: false
464
+ DestructuringDeclarationWithTooManyEntries:
465
+ active: false
466
+ maxDestructuringEntries: 3
467
+ EqualsNullCall:
468
+ active: true
469
+ EqualsOnSignatureLine:
470
+ active: false
471
+ ExplicitCollectionElementAccessMethod:
472
+ active: false
473
+ ExplicitItLambdaMultipleParameters:
474
+ active: false
475
+ ExplicitItLambdaParameter:
476
+ active: false
477
+ ExpressionBodySyntax:
478
+ active: false
479
+ includeLineWrapping: false
480
+ ForbiddenComment:
481
+ active: true
482
+ comments:
483
+ - reason: 'Forbidden FIXME todo marker in comment, please fix the problem.'
484
+ value: 'FIXME:'
485
+ - reason: 'Forbidden STOPSHIP todo marker in comment, please address the problem before shipping the code.'
486
+ value: 'STOPSHIP:'
487
+ - reason: 'Forbidden TODO todo marker in comment, please do the changes.'
488
+ value: 'TODO:'
489
+ allowedPatterns: ''
490
+ ForbiddenImport:
491
+ active: false
492
+ forbiddenImports: []
493
+ allowedImports: []
494
+ ForbiddenMethodCall:
495
+ active: false
496
+ methods:
497
+ - 'kotlin.io.print'
498
+ - 'kotlin.io.println'
499
+ ForbiddenVoid:
500
+ active: false
501
+ ignoreOverridden: false
502
+ ignoreUsageInGenerics: false
503
+ FunctionOnlyReturningConstant:
504
+ active: true
505
+ ignoreOverridableFunction: true
506
+ ignoreActualFunction: true
507
+ excludedFunctions: []
508
+ LoopWithTooManyJumpStatements:
509
+ active: true
510
+ maxJumpCount: 1
511
+ MagicNumber:
512
+ active: true
513
+ excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**']
514
+ ignoreNumbers:
515
+ - '-1'
516
+ - '0'
517
+ - '1'
518
+ - '2'
519
+ ignoreHashCodeFunction: true
520
+ ignorePropertyDeclaration: true
521
+ ignoreLocalVariableDeclaration: false
522
+ ignoreConstantDeclaration: true
523
+ ignoreCompanionObjectPropertyDeclaration: true
524
+ ignoreAnnotation: false
525
+ ignoreNamedArgument: true
526
+ ignoreEnums: false
527
+ ignoreRanges: false
528
+ ignoreExtensionFunctions: true
529
+ MandatoryBracesLoops:
530
+ active: false
531
+ MaxLineLength:
532
+ active: true
533
+ maxLineLength: 120
534
+ excludePackageStatements: true
535
+ excludeImportStatements: true
536
+ excludeCommentStatements: false
537
+ MayBeConstant:
538
+ active: true
539
+ ModifierOrder:
540
+ active: true
541
+ MultilineLambdaItParameter:
542
+ active: false
543
+ NestedClassesVisibility:
544
+ active: true
545
+ NewLineAtEndOfFile:
546
+ active: true
547
+ NoTabs:
548
+ active: false
549
+ ObjectLiteralToLambda:
550
+ active: false
551
+ OptionalAbstractKeyword:
552
+ active: true
553
+ OptionalUnit:
554
+ active: false
555
+ ProtectedMemberInFinalClass:
556
+ active: true
557
+ RangeUntilInsteadOfRangeTo:
558
+ active: false
559
+ RedundantExplicitType:
560
+ active: false
561
+ RedundantHigherOrderMapUsage:
562
+ active: false
563
+ RedundantVisibilityModifier:
564
+ active: false
565
+ ReturnCount:
566
+ active: false
567
+ SafeCast:
568
+ active: true
569
+ SerialVersionUIDInSerializableClass:
570
+ active: true
571
+ SpacingAfterPackageDeclaration:
572
+ active: false
573
+ ThrowsCount:
574
+ active: true
575
+ max: 2
576
+ excludeGuardClauses: false
577
+ TrailingWhitespace:
578
+ active: false
579
+ UnderscoresInNumericLiterals:
580
+ active: false
581
+ acceptableLength: 4
582
+ UnnecessaryApply:
583
+ active: true
584
+ UnnecessaryFilter:
585
+ active: false
586
+ UnnecessaryInheritance:
587
+ active: true
588
+ UnnecessaryLet:
589
+ active: false
590
+ UnnecessaryParentheses:
591
+ active: false
592
+ UnusedImport:
593
+ active: true
594
+ UnusedPrivateClass:
595
+ active: true
596
+ UnusedPrivateFunction:
597
+ active: true
598
+ allowedNames: '(_|ignored|expected|serialVersionUID)'
599
+ UnusedPrivateProperty:
600
+ active: true
601
+ allowedNames: '(_|ignored|expected|serialVersionUID)'
602
+ UnusedParameter:
603
+ active: true
604
+ allowedNames: '(_|ignored|expected|serialVersionUID)'
605
+ UnusedVariable:
606
+ active: true
607
+ allowedNames: '(_|ignored|expected|serialVersionUID)'
608
+ UseAnyOrNoneInsteadOfFind:
609
+ active: false
610
+ UseArrayLiteralsInAnnotations:
611
+ active: false
612
+ UseCheckNotNull:
613
+ active: false
614
+ UseCheckOrError:
615
+ active: false
616
+ UseDataClass:
617
+ active: false
618
+ allowVars: false
619
+ UseEmptyCounterpart:
620
+ active: false
621
+ UseIfEmptyOrIfBlank:
622
+ active: false
623
+ UseIfInsteadOfWhen:
624
+ active: false
625
+ UseIsNullOrEmpty:
626
+ active: false
627
+ UseOrEmpty:
628
+ active: false
629
+ UseRequire:
630
+ active: false
631
+ UseRequireNotNull:
632
+ active: false
633
+ UselessCallOnNotNull:
634
+ active: true
635
+ UtilityClassWithPublicConstructor:
636
+ active: true
637
+ VarCouldBeVal:
638
+ active: true
639
+ WildcardImport:
640
+ active: true
641
+ excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**']
642
+ excludeImports:
643
+ - 'java.util.*'
644
+
645
+ # Rules from detekt-rules-ktlint-wrapper. Disabled rules should match .editorconfig.
646
+ ktlint:
647
+ Annotation:
648
+ active: false
649
+ AnnotationOnSeparateLine:
650
+ active: false
651
+ ArgumentListWrapping:
652
+ active: false
653
+ BackingPropertyNaming:
654
+ active: false
655
+ BinaryExpressionWrapping:
656
+ active: false
657
+ BlankLineBeforeDeclaration:
658
+ active: false
659
+ BlankLineBetweenWhenConditions:
660
+ active: false
661
+ ChainMethodContinuation:
662
+ active: false
663
+ ClassSignature:
664
+ active: false
665
+ EnumWrapping:
666
+ active: false
667
+ FunctionExpressionBody:
668
+ active: false
669
+ FunctionLiteral:
670
+ active: false
671
+ FunctionNaming:
672
+ active: false
673
+ FunctionReturnTypeSpacing:
674
+ active: false
675
+ FunctionSignature:
676
+ active: false
677
+ IfElseWrapping:
678
+ active: false
679
+ ImportOrdering:
680
+ active: true
681
+ Indentation:
682
+ active: false
683
+ Kdoc:
684
+ active: false
685
+ MaximumLineLength:
686
+ active: false
687
+ MixedConditionOperators:
688
+ active: false
689
+ MultilineExpressionWrapping:
690
+ active: false
691
+ NoConsecutiveComments:
692
+ active: false
693
+ NoEmptyFirstLineInClassBody:
694
+ active: false
695
+ NoSemicolons:
696
+ active: false
697
+ NoSingleLineBlockComment:
698
+ active: false
699
+ PackageName:
700
+ active: false
701
+ ParameterListSpacing:
702
+ active: false
703
+ ParameterListWrapping:
704
+ active: false
705
+ PropertyName:
706
+ active: false
707
+ StatementWrapping:
708
+ active: false
709
+ StringTemplateIndent:
710
+ active: false
711
+ TrailingCommaOnCallSite:
712
+ active: false
713
+ TrailingCommaOnDeclarationSite:
714
+ active: false
715
+ TryCatchFinallySpacing:
716
+ active: false
717
+ TypeParameterListSpacing:
718
+ active: false
719
+ ValueParameterComment:
720
+ active: false
721
+ WhenEntryBracing:
722
+ active: false