Configured the Swift Format rules for the project.
This commit is contained in:
@@ -0,0 +1,76 @@
|
||||
{
|
||||
"fileScopedDeclarationPrivacy": {
|
||||
"accessLevel": "private"
|
||||
},
|
||||
"indentBlankLines": false,
|
||||
"indentConditionalCompilationBlocks": false,
|
||||
"indentSwitchCaseLabels": true,
|
||||
"indentation": {
|
||||
"spaces": 4
|
||||
},
|
||||
"lineBreakAroundMultilineExpressionChainComponents": true,
|
||||
"lineBreakBeforeControlFlowKeywords": true,
|
||||
"lineBreakBeforeEachArgument": true,
|
||||
"lineBreakBeforeEachGenericRequirement": false,
|
||||
"lineBreakBetweenDeclarationAttributes": true,
|
||||
"lineLength": 120,
|
||||
"maximumBlankLines": 1,
|
||||
"multilineTrailingCommaBehavior": "keptAsWritten",
|
||||
"multiElementCollectionTrailingCommas": true,
|
||||
"noAssignmentInExpressions" : {
|
||||
"allowedFunctions" : [
|
||||
"XCTAssertNoThrow"
|
||||
]
|
||||
},
|
||||
"orderedImports": {
|
||||
"includeConditionalImports": true,
|
||||
"shouldGroupImports": true
|
||||
},
|
||||
"prioritizeKeepingFunctionOutputTogether": true,
|
||||
"reflowMultilineStringLiterals": "always",
|
||||
"respectsExistingLineBreaks": true,
|
||||
"rules": {
|
||||
"AllPublicDeclarationsHaveDocumentation": true,
|
||||
"AlwaysUseLiteralForEmptyCollectionInit": true,
|
||||
"AlwaysUseLowerCamelCase": true,
|
||||
"AmbiguousTrailingClosureOverload": false,
|
||||
"AvoidRetroactiveConformances": true,
|
||||
"BeginDocumentationCommentWithOneLineSummary": true,
|
||||
"DoNotUseSemicolons": true,
|
||||
"DontRepeatTypeInStaticProperties": true,
|
||||
"FullyIndirectEnum": true,
|
||||
"IdentifiersMustBeASCII": true,
|
||||
"NeverForceUnwrap": true,
|
||||
"NeverUseForceTry": true,
|
||||
"NeverUseImplicitlyUnwrappedOptionals": true,
|
||||
"NoAccessLevelOnExtensionDeclarations": false,
|
||||
"NoAssignmentInExpressions": true,
|
||||
"NoBlockComments": true,
|
||||
"NoCasesWithOnlyFallthrough": true,
|
||||
"NoEmptyLinesOpeningClosingBraces": false,
|
||||
"NoEmptyTrailingClosureParentheses": true,
|
||||
"NoLabelsInCasePatterns": true,
|
||||
"NoLeadingUnderscores": true,
|
||||
"NoParensAroundConditions": true,
|
||||
"NoPlaygroundLiterals": true,
|
||||
"NoVoidReturnOnFunctionSignature": true,
|
||||
"OneCasePerLine": true,
|
||||
"OneVariableDeclarationPerLine": true,
|
||||
"OnlyOneTrailingClosureArgument": true,
|
||||
"OrderedImports" : true,
|
||||
"ReturnVoidInsteadOfEmptyTuple": true,
|
||||
"TypeNamesShouldBeCapitalized": true,
|
||||
"UseEarlyExits": true,
|
||||
"UseExplicitNilCheckInConditions": true,
|
||||
"UseLetInEveryBoundCaseVariable": true,
|
||||
"UseShorthandTypeNames": true,
|
||||
"UseSynthesizedInitializer": true,
|
||||
"UseTripleSlashForDocumentationComments": true,
|
||||
"UseWhereClausesInForLoops": true,
|
||||
"ValidateDocumentationComments": true
|
||||
},
|
||||
"spacesAroundRangeFormationOperators": true,
|
||||
"spacesBeforeEndOfLineComments" : 2,
|
||||
"tabWidth": 4,
|
||||
"version": 1
|
||||
}
|
||||
Reference in New Issue
Block a user