-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
wip: Full refactor of the server to swift with vapor
- Loading branch information
Showing
361 changed files
with
60,047 additions
and
978 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 @@ | ||
DB_URL=sqlite://memory |
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,122 @@ | ||
# server | ||
root: true | ||
env: | ||
es6: true | ||
jest: true | ||
node: true | ||
extends: | ||
- 'eslint:all' | ||
- 'plugin:@typescript-eslint/recommended' | ||
- 'plugin:import/typescript' | ||
- prettier | ||
parser: '@typescript-eslint/parser' | ||
parserOptions: | ||
ecmaVersion: 2021 | ||
sourceType: module | ||
createDefaultProgram: true | ||
project: tsconfig.server.json | ||
plugins: | ||
- eslint-plugin-unicorn | ||
- eslint-plugin-import | ||
- simple-import-sort | ||
- '@typescript-eslint' | ||
- typescript-sort-keys | ||
rules: | ||
unicorn/prefer-type-error: 'off' | ||
typescript-sort-keys/interface: warn | ||
typescript-sort-keys/string-enum: warn | ||
'@typescript-eslint/no-floating-promises': | ||
- warn | ||
- | ||
ignoreIIFE: true | ||
max-statements: | ||
- error | ||
- 30 | ||
max-params: | ||
- warn | ||
- 6 | ||
new-cap: 0 | ||
no-console: warn | ||
no-undefined: 'off' | ||
no-warning-comments: 'off' | ||
simple-import-sort/exports: | ||
- error | ||
simple-import-sort/imports: | ||
- error | ||
- groups: | ||
- | ||
- "^@?\\w" | ||
- | ||
- "^(src|lib|test|\\.)" | ||
max-classes-per-file: 'off' | ||
no-underscore-dangle: | ||
- error | ||
- | ||
allow: | ||
- _id | ||
- __v | ||
|
||
import/no-unassigned-import: warn | ||
import/order: 'off' | ||
sort-imports: 'off' | ||
sort-keys: | ||
- error | ||
- asc | ||
- natural: true | ||
minKeys: 5 | ||
no-useless-constructor: 'off' | ||
no-shadow: off | ||
'@typescript-eslint/no-shadow': warn | ||
'@typescript-eslint/prefer-nullish-coalescing': error | ||
'@typescript-eslint/no-explicit-any': error | ||
'@typescript-eslint/no-useless-constructor': 'off' | ||
no-magic-numbers: 'off' | ||
no-ternary: 'off' | ||
one-var: 'off' | ||
capitalized-comments: 'off' | ||
unicorn/filename-case: | ||
- error | ||
- | ||
case: kebabCase | ||
no-duplicate-imports: warn | ||
unicorn/no-abusive-eslint-disable: warn | ||
'@typescript-eslint/no-unnecessary-type-constraint': warn | ||
overrides: | ||
- | ||
files: | ||
- '*.{e2e-spec,int-spec,test,spec}.{js,jsx,ts,tsx}' | ||
rules: | ||
max-lines: 'off' | ||
init-declarations: 'off' | ||
unicorn/consistent-function-scoping: 'off' | ||
'@typescript-eslint/no-explicit-any': 'off' | ||
max-lines-per-function: 'off' | ||
- | ||
files: | ||
- '*.{jsx,tsx}' | ||
extends: | ||
- 'plugin:prettier/recommended' | ||
plugins: | ||
- '@typescript-eslint' | ||
- simple-import-sort | ||
- typescript-sort-keys | ||
env: | ||
jest: true | ||
node: true | ||
rules: | ||
id-length: | ||
- error | ||
- | ||
min: 1 | ||
typescript-sort-keys/interface: warn | ||
typescript-sort-keys/string-enum: warn | ||
'@typescript-eslint/no-unused-vars': error | ||
prettier/prettier: | ||
- error | ||
- | ||
singleQuote: true | ||
tabWidth: 4 | ||
printWidth: 120 | ||
trailingComma: "all" | ||
arrowParens: "avoid" | ||
endOfLine: auto |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
name: test | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
on: | ||
push: | ||
branches: | ||
- main | ||
- to-swift | ||
|
||
jobs: | ||
test: | ||
name: Test | ||
runs-on: ubuntu-latest | ||
container: swift:5.10 | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
- name: Run tests | ||
run: swift test --parallel | ||
# run: swift test |
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
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
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,69 @@ | ||
{ | ||
"fileScopedDeclarationPrivacy" : { | ||
"accessLevel" : "private" | ||
}, | ||
"indentation" : { | ||
"tabs" : 1 | ||
}, | ||
"indentConditionalCompilationBlocks" : true, | ||
"indentSwitchCaseLabels" : false, | ||
"lineBreakAroundMultilineExpressionChainComponents" : false, | ||
"lineBreakBeforeControlFlowKeywords" : false, | ||
"lineBreakBeforeEachArgument" : false, | ||
"lineBreakBeforeEachGenericRequirement" : false, | ||
"lineLength" : 100, | ||
"maximumBlankLines" : 1, | ||
"multiElementCollectionTrailingCommas" : true, | ||
"noAssignmentInExpressions" : { | ||
"allowedFunctions" : [ | ||
"XCTAssertNoThrow" | ||
] | ||
}, | ||
"prioritizeKeepingFunctionOutputTogether" : false, | ||
"respectsExistingLineBreaks" : true, | ||
"rules" : { | ||
"AllPublicDeclarationsHaveDocumentation" : false, | ||
"AlwaysUseLiteralForEmptyCollectionInit" : 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, | ||
"NoAssignmentInExpressions" : true, | ||
"NoBlockComments" : true, | ||
"NoCasesWithOnlyFallthrough" : true, | ||
"NoEmptyTrailingClosureParentheses" : true, | ||
"NoLabelsInCasePatterns" : true, | ||
"NoLeadingUnderscores" : false, | ||
"NoParensAroundConditions" : true, | ||
"NoPlaygroundLiterals" : true, | ||
"NoVoidReturnOnFunctionSignature" : true, | ||
"OmitExplicitReturns" : false, | ||
"OneCasePerLine" : true, | ||
"OneVariableDeclarationPerLine" : true, | ||
"OnlyOneTrailingClosureArgument" : true, | ||
"OrderedImports" : true, | ||
"ReplaceForEachWithForLoop" : true, | ||
"ReturnVoidInsteadOfEmptyTuple" : true, | ||
"TypeNamesShouldBeCapitalized" : true, | ||
"UseEarlyExits" : false, | ||
"UseLetInEveryBoundCaseVariable" : true, | ||
"UseShorthandTypeNames" : true, | ||
"UseSingleLinePropertyGetter" : true, | ||
"UseSynthesizedInitializer" : true, | ||
"UseTripleSlashForDocumentationComments" : true, | ||
"UseWhereClausesInForLoops" : false, | ||
"ValidateDocumentationComments" : false | ||
}, | ||
"spacesAroundRangeFormationOperators" : false, | ||
"tabWidth" : 8, | ||
"version" : 1 | ||
} |
Oops, something went wrong.