-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: refactor the repository by implementing generics
- Loading branch information
Mohammed Rokon Uddin
committed
Feb 9, 2024
1 parent
642c30c
commit 5b7c573
Showing
78 changed files
with
2,643 additions
and
4,874 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
{ | ||
"fileScopedDeclarationPrivacy" : { | ||
"accessLevel" : "private" | ||
}, | ||
"indentation" : { | ||
"spaces" : 2 | ||
}, | ||
"indentConditionalCompilationBlocks" : true, | ||
"indentSwitchCaseLabels" : false, | ||
"lineBreakAroundMultilineExpressionChainComponents" : false, | ||
"lineBreakBeforeControlFlowKeywords" : false, | ||
"lineBreakBeforeEachArgument" : false, | ||
"lineBreakBeforeEachGenericRequirement" : false, | ||
"lineLength" : 80, | ||
"tabWidth" : 8, | ||
"maximumBlankLines" : 1, | ||
"prioritizeKeepingFunctionOutputTogether" : false, | ||
"respectsExistingLineBreaks" : true, | ||
"version" : 1, | ||
"rules" : { | ||
"AllPublicDeclarationsHaveDocumentation" : false, | ||
"AlwaysUseLowerCamelCase" : true, | ||
"AmbiguousTrailingClosureOverload" : true, | ||
"BeginDocumentationCommentWithOneLineSummary" : false, | ||
"DoNotUseSemicolons" : true, | ||
"DontRepeatTypeInStaticProperties" : true, | ||
"FileScopedDeclarationPrivacy" : true, | ||
"FullyIndirectEnum" : true, | ||
"GroupNumericLiterals" : true, | ||
"IdentifiersMustBeASCII" : true, | ||
"NeverForceUnwrap" : false, | ||
"NeverUseForceTry" : false, | ||
"NeverUseImplicitlyUnwrappedOptionals" : false, | ||
"NoAccessLevelOnExtensionDeclaration" : true, | ||
"NoBlockComments" : true, | ||
"NoCasesWithOnlyFallthrough" : true, | ||
"NoEmptyTrailingClosureParentheses" : true, | ||
"NoLabelsInCasePatterns" : true, | ||
"NoLeadingUnderscores" : false, | ||
"NoParensAroundConditions" : true, | ||
"NoVoidReturnOnFunctionSignature" : true, | ||
"OneCasePerLine" : true, | ||
"OneVariableDeclarationPerLine" : true, | ||
"OnlyOneTrailingClosureArgument" : false, | ||
"OrderedImports" : true, | ||
"ReturnVoidInsteadOfEmptyTuple" : true, | ||
"UseEarlyExits" : false, | ||
"UseLetInEveryBoundCaseVariable" : false, | ||
"UseShorthandTypeNames" : true, | ||
"UseSingleLinePropertyGetter" : true, | ||
"UseSynthesizedInitializer" : true, | ||
"UseTripleSlashForDocumentationComments" : true, | ||
"UseWhereClausesInForLoops" : false, | ||
"ValidateDocumentationComments" : false | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
{{cookiecutter.app_name}}/Common/Sources/Common/BaseAction.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// | ||
// BaseAction.swift | ||
// Common | ||
// | ||
// Created by {{ cookiecutter.creator }} on {% now 'utc', '%d/%m/%Y' %}. | ||
// Copyright © {% now 'utc', '%Y' %} {{cookiecutter.company_name}}. All rights reserved. | ||
// | ||
|
||
import Foundation | ||
|
||
// keep Actions organized and their intent explicit | ||
// https://github.com/pointfreeco/swift-composable-architecture/discussions/1440 | ||
|
||
public protocol BaseAction { | ||
associatedtype ViewAction | ||
associatedtype DelegateAction | ||
associatedtype InlyingAction | ||
|
||
static func view(_: ViewAction) -> Self | ||
static func delegate(_: DelegateAction) -> Self | ||
static func inlying(_: InlyingAction) -> Self | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.