Skip to content

Commit 9d11e45

Browse files
committed
format/lint Swift files
1 parent a0771fa commit 9d11e45

3 files changed

Lines changed: 12 additions & 10 deletions

File tree

.swiftlint.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ disabled_rules:
33
- opening_brace # Conflicts with SwiftFormat
44
- trailing_comma
55
excluded:
6+
- example/*/DerivedData/
67
- example/*/Pods/
8+
- example/*/build/
79
- example/node_modules/
810
- node_modules/

ios/ReactTestApp/ContentView.swift

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ final class ContentViewController: UITableViewController {
3939
private let reactInstance: ReactInstance
4040
private var sections: [SectionData]
4141

42-
public init(reactInstance: ReactInstance) {
42+
init(reactInstance: ReactInstance) {
4343
self.reactInstance = reactInstance
4444
sections = []
4545

@@ -53,7 +53,7 @@ final class ContentViewController: UITableViewController {
5353

5454
// MARK: - UIResponder overrides
5555

56-
override public func motionEnded(_: UIEvent.EventSubtype, with event: UIEvent?) {
56+
override func motionEnded(_: UIEvent.EventSubtype, with event: UIEvent?) {
5757
guard event?.subtype == .motionShake, let host = reactInstance.host else {
5858
return
5959
}
@@ -73,7 +73,7 @@ final class ContentViewController: UITableViewController {
7373

7474
// MARK: - UIViewController overrides
7575

76-
override public func viewDidLoad() {
76+
override func viewDidLoad() {
7777
super.viewDidLoad()
7878

7979
let manifest = Manifest.load()
@@ -154,21 +154,21 @@ final class ContentViewController: UITableViewController {
154154

155155
// MARK: - UITableViewDelegate overrides
156156

157-
override public func tableView(_: UITableView, shouldHighlightRowAt indexPath: IndexPath) -> Bool {
157+
override func tableView(_: UITableView, shouldHighlightRowAt indexPath: IndexPath) -> Bool {
158158
indexPath.section == Section.components
159159
}
160160

161-
override public func tableView(_: UITableView, didSelectRowAt indexPath: IndexPath) {
161+
override func tableView(_: UITableView, didSelectRowAt indexPath: IndexPath) {
162162
sections[indexPath.section].items[indexPath.row].action?()
163163
}
164164

165165
// MARK: - UITableViewDataSource overrides
166166

167-
override public func tableView(_: UITableView, numberOfRowsInSection section: Int) -> Int {
167+
override func tableView(_: UITableView, numberOfRowsInSection section: Int) -> Int {
168168
sections[section].items.count
169169
}
170170

171-
override public func tableView(_: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
171+
override func tableView(_: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
172172
let link = sections[indexPath.section].items[indexPath.row]
173173
let cell = UITableViewCell(style: .default, reuseIdentifier: "cell")
174174

@@ -193,11 +193,11 @@ final class ContentViewController: UITableViewController {
193193
return cell
194194
}
195195

196-
override public func numberOfSections(in _: UITableView) -> Int {
196+
override func numberOfSections(in _: UITableView) -> Int {
197197
sections.count
198198
}
199199

200-
override public func tableView(_: UITableView, titleForFooterInSection section: Int) -> String? {
200+
override func tableView(_: UITableView, titleForFooterInSection section: Int) -> String? {
201201
sections[section].footer
202202
}
203203

ios/ReactTestApp/ReactInstance.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import ReactNativeHost
33
import ReactTestApp_DevSupport
44

55
final class ReactInstance: NSObject, RNXHostConfig {
6-
public static let scanForQRCodeNotification =
6+
static let scanForQRCodeNotification =
77
NSNotification.Name("ReactInstance.scanForQRCodeNotification")
88

99
static func jsBundleURL() -> URL? {

0 commit comments

Comments
 (0)