diff --git a/.typos.toml b/.typos.toml new file mode 100644 index 000000000..e0a4797ae --- /dev/null +++ b/.typos.toml @@ -0,0 +1,40 @@ +[default] +# Ignore patterns that match commit hashes and Git-related identifiers +extend-ignore-re = [ + # Git commit hashes in parentheses: (7553ede), (88d0ded), etc. + "\\([a-f0-9]{7,40}\\)", + # Git commit hashes in square brackets: [7553ede], [88d0ded], etc. + "\\[[a-f0-9]{7,40}\\]", + # Full GitHub commit URLs + "github\\.com/[^/]+/[^/]+/commit/[a-f0-9]{7,40}", + # Commit hash at end of markdown links: ...commit/abcd123) + "commit/[a-f0-9]{7,40}\\)", +] + +[files] +extend-exclude = [ + # Exclude lock files + "package-lock.json", + "yarn.lock", + "pnpm-lock.yaml", + # Exclude build artifacts + "dist/", + "build/", + "*.min.js", + # Exclude node_modules + "node_modules/", + # Exclude Xcode project files that contain hex identifiers - these files have + # automatically generated hex IDs that look like typos but must not be changed + "**/project.pbxproj", + "**/*.xcscheme", + "**/*.storyboard", + # Exclude all CHANGELOG files - they contain commit hashes and historical text + # that should not be modified by typo fixes + "CHANGELOG.md", + "*/CHANGELOG.md", +] + +[default.extend-words] +# Add any custom words that should not be corrected +# Format: incorrectword = "incorrectword" +thn = "thn" diff --git a/android/capacitor/src/main/java/com/getcapacitor/cordova/MockCordovaWebViewImpl.java b/android/capacitor/src/main/java/com/getcapacitor/cordova/MockCordovaWebViewImpl.java index 1115429d7..502294843 100644 --- a/android/capacitor/src/main/java/com/getcapacitor/cordova/MockCordovaWebViewImpl.java +++ b/android/capacitor/src/main/java/com/getcapacitor/cordova/MockCordovaWebViewImpl.java @@ -182,8 +182,8 @@ public void handleDestroy() { @Deprecated @Override - public void sendJavascript(String statememt) { - nativeToJsMessageQueue.addJavaScript(statememt); + public void sendJavascript(String statement) { + nativeToJsMessageQueue.addJavaScript(statement); } public void eval(final String js, final ValueCallback callback) { diff --git a/cli/src/android/update.ts b/cli/src/android/update.ts index 8c04a1527..b6a7f3196 100644 --- a/cli/src/android/update.ts +++ b/cli/src/android/update.ts @@ -149,10 +149,10 @@ export async function installGradlePlugins( const settingsPath = config.android.platformDirAbs; const dependencyPath = config.android.appDirAbs; - const relativeCapcitorAndroidPath = convertToUnixPath(relative(settingsPath, capacitorAndroidPath)); + const relativeCapacitorAndroidPath = convertToUnixPath(relative(settingsPath, capacitorAndroidPath)); const settingsLines = `// DO NOT EDIT THIS FILE! IT IS GENERATED EACH TIME "capacitor update" IS RUN include ':capacitor-android' -project(':capacitor-android').projectDir = new File('${relativeCapcitorAndroidPath}') +project(':capacitor-android').projectDir = new File('${relativeCapacitorAndroidPath}') ${capacitorPlugins .map((p) => { if (!p.android) { diff --git a/cli/src/declarations.ts b/cli/src/declarations.ts index 046516efa..9c8e6d6d4 100644 --- a/cli/src/declarations.ts +++ b/cli/src/declarations.ts @@ -554,7 +554,7 @@ export interface CapacitorConfig { * Configure the local scheme on Android. * * Custom schemes on Android are unable to change the URL path as of Webview 117. Changing this value from anything other than `http` or `https` can result in your - * application unable to resolve routing. If you must change this for some reason, consider using a hash-based url strategy, but there are no guarentees that this + * application unable to resolve routing. If you must change this for some reason, consider using a hash-based url strategy, but there are no guarantees that this * will continue to work long term as allowing non-standard schemes to modify query parameters and url fragments is only allowed for compatibility reasons. * https://ionic.io/blog/capacitor-android-customscheme-issue-with-chrome-117 * diff --git a/cli/src/definitions.ts b/cli/src/definitions.ts index 893a9d030..f1eec0bb6 100644 --- a/cli/src/definitions.ts +++ b/cli/src/definitions.ts @@ -154,7 +154,7 @@ export interface FrameworkConfig { /** * Specific UI libraries (Ionic) and higher-level frameworks (NextJs/Gatsby) * should be prioritorized over a more generic framework like React/Angular/Vue. - * Lower the priorty number the more important it is (1 has more priority over 2). + * Lower the priority number the more important it is (1 has more priority over 2). * This helps to make sure a specific framework like "NextJs" is chosen before * the more generic "React". */ diff --git a/cli/src/ios/doctor.ts b/cli/src/ios/doctor.ts index 77d9b8b17..1b90e1701 100644 --- a/cli/src/ios/doctor.ts +++ b/cli/src/ios/doctor.ts @@ -16,7 +16,7 @@ export async function doctorIOS(config: Config): Promise { // check plugins versions // check native project deps are up-to-date === npm install // check if npm install was updated - // check online datebase of common errors + // check online database of common errors // check if www folder is empty (index.html does not exist) try { await check([() => checkBundler(config) || checkCocoaPods(config), () => checkWebDir(config), checkXcode]); diff --git a/cli/src/sysconfig.ts b/cli/src/sysconfig.ts index 487095404..6619e51e8 100644 --- a/cli/src/sysconfig.ts +++ b/cli/src/sysconfig.ts @@ -24,7 +24,7 @@ export interface SystemConfig { readonly telemetry?: boolean; /** - * Wheter the user choose to signup or not. + * Whether the user choose to signup or not. * * If undefined, the prompt has not been shown. */ diff --git a/cli/src/tasks/migrate.ts b/cli/src/tasks/migrate.ts index 4b76836e6..e94fb8144 100644 --- a/cli/src/tasks/migrate.ts +++ b/cli/src/tasks/migrate.ts @@ -404,12 +404,12 @@ async function getAndroidVariablesAndClasspaths(config: Config) { } deleteFolderRecursive(tempAndroidTemplateFolder); - const firstIndxOfCATBGV = buildGradleFile.indexOf(`classpath 'com.android.tools.build:gradle:`) + 42; - const firstIndxOfCGGGS = buildGradleFile.indexOf(`com.google.gms:google-services:`) + 31; + const firstIndexOfCATBGV = buildGradleFile.indexOf(`classpath 'com.android.tools.build:gradle:`) + 42; + const firstIndexOfCGGGS = buildGradleFile.indexOf(`com.google.gms:google-services:`) + 31; const comAndroidToolsBuildGradleVersion = - '' + buildGradleFile.substring(firstIndxOfCATBGV, buildGradleFile.indexOf("'", firstIndxOfCATBGV)); + '' + buildGradleFile.substring(firstIndexOfCATBGV, buildGradleFile.indexOf("'", firstIndexOfCATBGV)); const comGoogleGmsGoogleServices = - '' + buildGradleFile.substring(firstIndxOfCGGGS, buildGradleFile.indexOf("'", firstIndxOfCGGGS)); + '' + buildGradleFile.substring(firstIndexOfCGGGS, buildGradleFile.indexOf("'", firstIndexOfCGGGS)); const variablesGradleAsJSON = JSON.parse( variablesGradleFile diff --git a/cli/src/util/emoji.ts b/cli/src/util/emoji.ts index f86b7166b..9791dad0a 100644 --- a/cli/src/util/emoji.ts +++ b/cli/src/util/emoji.ts @@ -1,4 +1,4 @@ -// Emoji falback, right now just uses fallback on windows, +// Emoji fallback, right now just uses fallback on windows, // but could expand to be more sophisticated to allow emoji // on Hyper term on windows, for example. export const emoji = (x: string, fallback: string): string => { diff --git a/cli/src/util/spm.ts b/cli/src/util/spm.ts index b5dc1a8af..e040cba4b 100644 --- a/cli/src/util/spm.ts +++ b/cli/src/util/spm.ts @@ -54,7 +54,7 @@ export async function checkPluginsForPackageSwift(config: Config, plugins: Plugi logger.debug(`Found ${plugins.length} iOS plugins, ${packageSwiftPluginList.length} have a Package.swift file`); logger.info('All plugins have a Package.swift file and will be included in Package.swift'); } else { - logger.warn('Some installed packages are not compatable with SPM'); + logger.warn('Some installed packages are not compatible with SPM'); } return packageSwiftPluginList; diff --git a/core/cordova.js b/core/cordova.js index b0219ff5a..0ad1746a1 100644 --- a/core/cordova.js +++ b/core/cordova.js @@ -1014,7 +1014,7 @@ } capacitorExec.nativeFetchMessages = function () { - // Stop listing for window detatch once native side confirms poke. + // Stop listing for window detach once native side confirms poke. if (failSafeTimerId) { clearTimeout(failSafeTimerId); failSafeTimerId = 0; diff --git a/core/http.md b/core/http.md index 77ba4582b..f459597c1 100644 --- a/core/http.md +++ b/core/http.md @@ -212,7 +212,7 @@ Make a Http DELETE Request to a server using native libraries. | **`data`** | any | Additional data received with the Http response. | | **`status`** | number | The status code received from the Http response. | | **`headers`** | HttpHeaders | The headers received from the Http response. | -| **`url`** | string | The response URL recieved from the Http response. | +| **`url`** | string | The response URL received from the Http response. | #### HttpHeaders diff --git a/core/src/core-plugins.ts b/core/src/core-plugins.ts index 84cfd5fca..64a30eecc 100644 --- a/core/src/core-plugins.ts +++ b/core/src/core-plugins.ts @@ -276,7 +276,7 @@ export interface HttpResponse { */ headers: HttpHeaders; /** - * The response URL recieved from the Http response. + * The response URL received from the Http response. */ url: string; } diff --git a/ios/Capacitor/Capacitor/CAPBridgeViewController.swift b/ios/Capacitor/Capacitor/CAPBridgeViewController.swift index a7285213d..f9c36d9ed 100644 --- a/ios/Capacitor/Capacitor/CAPBridgeViewController.swift +++ b/ios/Capacitor/Capacitor/CAPBridgeViewController.swift @@ -302,7 +302,7 @@ extension CAPBridgeViewController { aWebView.scrollView.contentInsetAdjustmentBehavior = configuration.contentInsetAdjustmentBehavior aWebView.allowsLinkPreview = configuration.allowLinkPreviews aWebView.scrollView.isScrollEnabled = configuration.scrollingEnabled - if let overrideUserAgent = configuration.overridenUserAgentString { + if let overrideUserAgent = configuration.overriddenUserAgentString { aWebView.customUserAgent = overrideUserAgent } if let backgroundColor = configuration.backgroundColor { diff --git a/ios/Capacitor/Capacitor/CAPInstanceConfiguration.h b/ios/Capacitor/Capacitor/CAPInstanceConfiguration.h index 171dbb463..ce8769bd5 100644 --- a/ios/Capacitor/Capacitor/CAPInstanceConfiguration.h +++ b/ios/Capacitor/Capacitor/CAPInstanceConfiguration.h @@ -8,7 +8,7 @@ NS_SWIFT_NAME(InstanceConfiguration) @interface CAPInstanceConfiguration: NSObject @property (nonatomic, readonly, nullable) NSString *appendedUserAgentString; -@property (nonatomic, readonly, nullable) NSString *overridenUserAgentString; +@property (nonatomic, readonly, nullable) NSString *overriddenUserAgentString; @property (nonatomic, readonly, nullable) UIColor *backgroundColor; @property (nonatomic, readonly, nonnull) NSArray *allowedNavigationHostnames; @property (nonatomic, readonly, nonnull) NSURL *localURL; diff --git a/ios/Capacitor/Capacitor/CAPInstanceConfiguration.m b/ios/Capacitor/Capacitor/CAPInstanceConfiguration.m index d6b7785e3..092f4d2f0 100644 --- a/ios/Capacitor/Capacitor/CAPInstanceConfiguration.m +++ b/ios/Capacitor/Capacitor/CAPInstanceConfiguration.m @@ -14,7 +14,7 @@ - (instancetype)initWithDescriptor:(CAPInstanceDescriptor *)descriptor isDebug:( [descriptor normalize]; // now copy the simple properties _appendedUserAgentString = descriptor.appendedUserAgentString; - _overridenUserAgentString = descriptor.overridenUserAgentString; + _overriddenUserAgentString = descriptor.overriddenUserAgentString; _backgroundColor = descriptor.backgroundColor; _allowedNavigationHostnames = descriptor.allowedNavigationHostnames; switch (descriptor.loggingBehavior) { @@ -59,7 +59,7 @@ - (instancetype)initWithDescriptor:(CAPInstanceDescriptor *)descriptor isDebug:( - (instancetype)initWithConfiguration:(CAPInstanceConfiguration*)configuration andLocation:(NSURL*)location { if (self = [super init]) { _appendedUserAgentString = [[configuration appendedUserAgentString] copy]; - _overridenUserAgentString = [[configuration overridenUserAgentString] copy]; + _overriddenUserAgentString = [[configuration overriddenUserAgentString] copy]; _backgroundColor = configuration.backgroundColor; _allowedNavigationHostnames = [[configuration allowedNavigationHostnames] copy]; _localURL = [[configuration localURL] copy]; diff --git a/ios/Capacitor/Capacitor/CAPInstanceDescriptor.h b/ios/Capacitor/Capacitor/CAPInstanceDescriptor.h index f477ef55b..a0c303f00 100644 --- a/ios/Capacitor/Capacitor/CAPInstanceDescriptor.h +++ b/ios/Capacitor/Capacitor/CAPInstanceDescriptor.h @@ -29,7 +29,7 @@ extern NSString * _Nonnull const CAPInstanceDescriptorDefaultHostname NS_SWIFT_U NS_SWIFT_NAME(InstanceDescriptor) @interface CAPInstanceDescriptor : NSObject /** - @brief A value to append to the @c User-Agent string. Ignored if @c overridenUserAgentString is set. + @brief A value to append to the @c User-Agent string. Ignored if @c overriddenUserAgentString is set. @discussion Set by @c appendUserAgent in the configuration file. */ @property (nonatomic, copy, nullable) NSString *appendedUserAgentString; @@ -37,7 +37,7 @@ NS_SWIFT_NAME(InstanceDescriptor) @brief A value that will completely replace the @c User-Agent string. Overrides @c appendedUserAgentString. @discussion Set by @c overrideUserAgent in the configuration file. */ -@property (nonatomic, copy, nullable) NSString *overridenUserAgentString; +@property (nonatomic, copy, nullable) NSString *overriddenUserAgentString; /** @brief The background color to set on the web view where content is not visible. @discussion Set by @c backgroundColor in the configuration file. @@ -120,7 +120,7 @@ NS_SWIFT_NAME(InstanceDescriptor) */ @property (nonatomic, copy, nonnull) NSURL *appLocation; /** - @brief The path (relative to @c appLocation) which Capacitor will use for the inital URL at launch. + @brief The path (relative to @c appLocation) which Capacitor will use for the initial URL at launch. @discussion Defaults to nil, in which case Capacitor will attempt to load @c index.html. */ @property (nonatomic, copy, nullable) NSString *appStartPath; @@ -135,7 +135,7 @@ NS_SWIFT_NAME(InstanceDescriptor) */ @property (nonatomic, copy, nullable) NSString *preferredContentMode; /** - @brief The parser used to load the cofiguration for Cordova plugins. + @brief The parser used to load the configuration for Cordova plugins. */ @property (nonatomic, copy, nonnull) CDVConfigParser *cordovaConfiguration; /** diff --git a/ios/Capacitor/Capacitor/CAPInstanceDescriptor.swift b/ios/Capacitor/Capacitor/CAPInstanceDescriptor.swift index a7eff5f62..423e24a8c 100644 --- a/ios/Capacitor/Capacitor/CAPInstanceDescriptor.swift +++ b/ios/Capacitor/Capacitor/CAPInstanceDescriptor.swift @@ -78,7 +78,7 @@ internal extension InstanceDescriptor { appendedUserAgentString = agentString } if let agentString = (config[keyPath: "ios.overrideUserAgent"] as? String) ?? (config[keyPath: "overrideUserAgent"] as? String) { - overridenUserAgentString = agentString + overriddenUserAgentString = agentString } if let colorString = (config[keyPath: "ios.backgroundColor"] as? String) ?? (config[keyPath: "backgroundColor"] as? String), let color = UIColor.capacitor.color(fromHex: colorString) { diff --git a/ios/Capacitor/Capacitor/CAPNotifications.swift b/ios/Capacitor/Capacitor/CAPNotifications.swift index 03d80aa87..f372213d0 100644 --- a/ios/Capacitor/Capacitor/CAPNotifications.swift +++ b/ios/Capacitor/Capacitor/CAPNotifications.swift @@ -1,5 +1,5 @@ /** - Notificaton types for NotificationCenter and NSNotificationCenter + Notification types for NotificationCenter and NSNotificationCenter We want to include `capacitor` in the name(s) to uniquely identify these even though it can make the names long and the deprecated notifications are only here for backwards compatibility. diff --git a/ios/Capacitor/Capacitor/Codable/JSValueDecoder.swift b/ios/Capacitor/Capacitor/Codable/JSValueDecoder.swift index 43042e4f4..dc3966e4f 100644 --- a/ios/Capacitor/Capacitor/Codable/JSValueDecoder.swift +++ b/ios/Capacitor/Capacitor/Codable/JSValueDecoder.swift @@ -16,7 +16,7 @@ public final class JSValueDecoder: TopLevelDecoder { /// The strategies available for decoding raw data. public typealias DataDecodingStrategy = JSONDecoder.DataDecodingStrategy - /// The strategies availble for decoding NaN, Infinity, and -Infinity + /// The strategies available for decoding NaN, Infinity, and -Infinity public enum NonConformingFloatDecodingStrategy { /// Decodes directly into the floating point type as .infinity, -.infinity, or .nan case deferred @@ -127,7 +127,7 @@ extension _JSValueDecoder: Decoder { SingleValueContainer(data: data, codingPath: codingPath, userInfo: userInfo, options: options) } - // force casting is fine becasue we've already determined that T is the type in the case + // force casting is fine because we've already determined that T is the type in the case // the swift standard library also force casts in their similar functions // https://github.com/swiftlang/swift-foundation/blob/da80d51fa3e77f3e7ed57c4300a870689e755713/Sources/FoundationEssentials/JSON/JSONEncoder.swift#L1140 // swiftlint:disable force_cast diff --git a/ios/Capacitor/Capacitor/Codable/JSValueEncoder.swift b/ios/Capacitor/Capacitor/Codable/JSValueEncoder.swift index 926aa118d..938405b80 100644 --- a/ios/Capacitor/Capacitor/Codable/JSValueEncoder.swift +++ b/ios/Capacitor/Capacitor/Codable/JSValueEncoder.swift @@ -72,18 +72,18 @@ public final class JSValueEncoder: TopLevelEncoder { /// - Parameter optionalEncodingStrategy: The strategy to use when encoding `nil` values. Defaults to ``OptionalEncodingStrategy-swift.enum/undefined`` /// - Parameter dateEncodingStrategy: Defaults to `DateEncodingStrategy.deferredToDate` /// - Parameter dataEncodingStrategy: Defaults to `DataEncodingStrategy.deferredToData` - /// - Parameter nonConformingFloatEncodingStategy: Defaults to ``NonConformingFloatEncodingStrategy-swift.enum/deferred`` + /// - Parameter nonConformingFloatEncodingStrategy: Defaults to ``NonConformingFloatEncodingStrategy-swift.enum/deferred`` public init( optionalEncodingStrategy: OptionalEncodingStrategy = .undefined, dateEncodingStrategy: DateEncodingStrategy = .deferredToDate, dataEncodingStrategy: DataEncodingStrategy = .deferredToData, - nonConformingFloatEncodingStategy: NonConformingFloatEncodingStrategy = .deferred + nonConformingFloatEncodingStrategy: NonConformingFloatEncodingStrategy = .deferred ) { self.options = .init( optionalStrategy: optionalEncodingStrategy, dateStrategy: dateEncodingStrategy, dataStrategy: dataEncodingStrategy, - nonConformingFloatStrategy: nonConformingFloatEncodingStategy + nonConformingFloatStrategy: nonConformingFloatEncodingStrategy ) } diff --git a/ios/Capacitor/Capacitor/Plugins/HttpRequestHandler.swift b/ios/Capacitor/Capacitor/Plugins/HttpRequestHandler.swift index 651c1b76b..cc58600b5 100644 --- a/ios/Capacitor/Capacitor/Plugins/HttpRequestHandler.swift +++ b/ios/Capacitor/Capacitor/Plugins/HttpRequestHandler.swift @@ -194,7 +194,7 @@ open class HttpRequestHandler { .openConnection() .build() - if let userAgentString = config?.overridenUserAgentString, headers["User-Agent"] == nil, headers["user-agent"] == nil { + if let userAgentString = config?.overriddenUserAgentString, headers["User-Agent"] == nil, headers["user-agent"] == nil { headers["User-Agent"] = userAgentString } diff --git a/ios/Capacitor/Capacitor/UIStatusBarManager+CAPHandleTapAction.m b/ios/Capacitor/Capacitor/UIStatusBarManager+CAPHandleTapAction.m index 44272a33b..47c0adc8f 100644 --- a/ios/Capacitor/Capacitor/UIStatusBarManager+CAPHandleTapAction.m +++ b/ios/Capacitor/Capacitor/UIStatusBarManager+CAPHandleTapAction.m @@ -9,7 +9,7 @@ + (void)load { dispatch_once(&onceToken, ^{ Class class = [self class]; SEL originalSelector = NSSelectorFromString(@"handleTapAction:"); - SEL swizzledSelector = @selector(nofity_handleTapAction:); + SEL swizzledSelector = @selector(notify_handleTapAction:); Method originalMethod = class_getInstanceMethod(class, originalSelector); Method swizzledMethod = class_getInstanceMethod(class, swizzledSelector); @@ -29,9 +29,9 @@ + (void)load { }); } --(void)nofity_handleTapAction:(id)arg1 { +-(void)notify_handleTapAction:(id)arg1 { [[NSNotificationCenter defaultCenter] postNotification:[NSNotification notificationWithName:NSNotification.capacitorStatusBarTapped object:nil]]; - [self nofity_handleTapAction:arg1]; + [self notify_handleTapAction:arg1]; } @end diff --git a/ios/Capacitor/Capacitor/WebViewDelegationHandler.swift b/ios/Capacitor/Capacitor/WebViewDelegationHandler.swift index d0870ad1e..3bc220d18 100644 --- a/ios/Capacitor/Capacitor/WebViewDelegationHandler.swift +++ b/ios/Capacitor/Capacitor/WebViewDelegationHandler.swift @@ -27,7 +27,7 @@ open class WebViewDelegationHandler: NSObject, WKNavigationDelegate, WKUIDelegat } open func willLoadWebview(_ webView: WKWebView?) { - // Set the webview to be not opaque on the inital load. This prevents + // Set the webview to be not opaque on the initial load. This prevents // the webview from showing a white background, which is its default // loading display, as that can appear as a screen flash. The opacity // might have been set by something else, like a plugin, so we want diff --git a/ios/Capacitor/CapacitorTests/BridgedTypesTests.swift b/ios/Capacitor/CapacitorTests/BridgedTypesTests.swift index f88b4e320..23695ab65 100644 --- a/ios/Capacitor/CapacitorTests/BridgedTypesTests.swift +++ b/ios/Capacitor/CapacitorTests/BridgedTypesTests.swift @@ -25,7 +25,7 @@ class BridgedTypesTests: XCTestCase { override class func setUp() { let formatter = ISO8601DateFormatter() // an ISO 8601 string does not necessarily include subsecond precision, so we can't just capture the current date - // or else we won't be able to compare the objects since they could differ by milliseconds or nanoseonds. so instead + // or else we won't be able to compare the objects since they could differ by milliseconds or nanoseconds. so instead // we use a fixed timestamp at a whole hour. let date = NSDate(timeIntervalSinceReferenceDate: 632854800) let subDictionary: [AnyHashable: Any] = ["testIntArray": [0, 1, 2], "testStringArray": ["1", "2", "3"], "testDictionary":["foo":"bar"]] diff --git a/ios/Capacitor/CapacitorTests/ConfigurationTests.swift b/ios/Capacitor/CapacitorTests/ConfigurationTests.swift index 778bfd688..2457818e4 100644 --- a/ios/Capacitor/CapacitorTests/ConfigurationTests.swift +++ b/ios/Capacitor/CapacitorTests/ConfigurationTests.swift @@ -81,7 +81,7 @@ class ConfigurationTests: XCTestCase { let url = Bundle.main.url(forResource: "configurations", withExtension: "")! let descriptor = InstanceDescriptor.init(at: url, configuration: ConfigurationTests.files[.flat], cordovaConfiguration: nil) XCTAssertEqual(descriptor.backgroundColor, UIColor(red: 1, green: 1, blue: 1, alpha: 1)) - XCTAssertEqual(descriptor.overridenUserAgentString, "level 1 override") + XCTAssertEqual(descriptor.overriddenUserAgentString, "level 1 override") XCTAssertEqual(descriptor.appendedUserAgentString, "level 1 append") XCTAssertEqual(descriptor.loggingBehavior, .debug) } @@ -90,7 +90,7 @@ class ConfigurationTests: XCTestCase { let url = Bundle.main.url(forResource: "configurations", withExtension: "")! let descriptor = InstanceDescriptor.init(at: url, configuration: ConfigurationTests.files[.nested], cordovaConfiguration: nil) XCTAssertEqual(descriptor.backgroundColor, UIColor(red: 0, green: 0, blue: 0, alpha: 1)) - XCTAssertEqual(descriptor.overridenUserAgentString, "level 2 override") + XCTAssertEqual(descriptor.overriddenUserAgentString, "level 2 override") XCTAssertEqual(descriptor.appendedUserAgentString, "level 2 append") XCTAssertEqual(descriptor.loggingBehavior, .none) XCTAssertFalse(descriptor.scrollingEnabled) diff --git a/ios/Capacitor/CapacitorTests/RouterTests.swift b/ios/Capacitor/CapacitorTests/RouterTests.swift index 181551ee7..7923dbc0f 100644 --- a/ios/Capacitor/CapacitorTests/RouterTests.swift +++ b/ios/Capacitor/CapacitorTests/RouterTests.swift @@ -15,7 +15,7 @@ class RouterTests: XCTestCase { checkRouter(path: "", expected: "/index.html") } - func testRouterReturnsIndexWhenProviedPathWithoutExtension() { + func testRouterReturnsIndexWhenProvidedPathWithoutExtension() { checkRouter(path: "/a/valid/path/no/ext", expected: "/index.html") } diff --git a/ios/Capacitor/CodableTests/CodableTests.swift b/ios/Capacitor/CodableTests/CodableTests.swift index bfdbe5716..9e4dfb828 100644 --- a/ios/Capacitor/CodableTests/CodableTests.swift +++ b/ios/Capacitor/CodableTests/CodableTests.swift @@ -161,7 +161,7 @@ final class JSValueEncoderTest: XCTestCase { XCTAssertEqual(person.family?[1].age as? NSNumber, leiaAge) } - func testEncode__when_provided_an_instance_of_a_nested_unkeyed_container__encoding_succedds() throws { + func testEncode__when_provided_an_instance_of_a_nested_unkeyed_container__encoding_succeeds() throws { let encoder = JSValueEncoder() let encodedValue = try encoder.encode([person.family, person.family]) let encodedArray = try XCTUnwrap(encodedValue as? [[JSObject]]) diff --git a/ios/Capacitor/CodableTests/NonconformingFloatCodableTests.swift b/ios/Capacitor/CodableTests/NonconformingFloatCodableTests.swift index 9cfdb3615..e9dc9d956 100644 --- a/ios/Capacitor/CodableTests/NonconformingFloatCodableTests.swift +++ b/ios/Capacitor/CodableTests/NonconformingFloatCodableTests.swift @@ -38,7 +38,7 @@ class JSValueEncoderNonConformingFloatTests: XCTestCase { func testEncode_float__convertToString_root() throws { let encoder = JSValueEncoder( - nonConformingFloatEncodingStategy: .convertToString( + nonConformingFloatEncodingStrategy: .convertToString( positiveInfinity: "pos", negativeInfinity: "neg", nan: "nan" @@ -60,7 +60,7 @@ class JSValueEncoderNonConformingFloatTests: XCTestCase { func testEncode_float__convertToString_array() throws { let encoder = JSValueEncoder( - nonConformingFloatEncodingStategy: .convertToString( + nonConformingFloatEncodingStrategy: .convertToString( positiveInfinity: "pos", negativeInfinity: "neg", nan: "nan" @@ -74,7 +74,7 @@ class JSValueEncoderNonConformingFloatTests: XCTestCase { func testEncode_float__convertToString_struct() throws { let encoder = JSValueEncoder( - nonConformingFloatEncodingStategy: .convertToString( + nonConformingFloatEncodingStrategy: .convertToString( positiveInfinity: "pos", negativeInfinity: "neg", nan: "nan" @@ -95,17 +95,17 @@ class JSValueEncoderNonConformingFloatTests: XCTestCase { } func testEncode_float__throw_root() throws { - let encoder = JSValueEncoder(nonConformingFloatEncodingStategy: .throw) + let encoder = JSValueEncoder(nonConformingFloatEncodingStrategy: .throw) XCTAssertThrowsError(try encoder.encode(Double.infinity)) } func testEncode_float__throw_array() throws { - let encoder = JSValueEncoder(nonConformingFloatEncodingStategy: .throw) + let encoder = JSValueEncoder(nonConformingFloatEncodingStrategy: .throw) XCTAssertThrowsError(try encoder.encode([Double.infinity, -.infinity, .nan])) } func testEncode_float__throw_struct() throws { - let encoder = JSValueEncoder(nonConformingFloatEncodingStategy: .throw) + let encoder = JSValueEncoder(nonConformingFloatEncodingStrategy: .throw) XCTAssertThrowsError(try encoder.encode(Foo(number: .infinity))) } }