Skip to content

Commit a2b62c9

Browse files
louis-preseambot
andauthored
feat: Add database typegen (#2)
* chore: Apply prettier to eslintrc.json * chore: Apply Seam naming convention * ci: Format code * feat: Add database typegen * ci: Format code * chore: Linter stuff * ci: Format code * chore: Remove examples * chore: Lint rules * ci: Format code * test: Add default test --------- Co-authored-by: Seam Bot <[email protected]>
1 parent 7b74148 commit a2b62c9

File tree

22 files changed

+1190
-77
lines changed

22 files changed

+1190
-77
lines changed

.eslintrc.json

Lines changed: 49 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,12 @@
1919
}
2020
],
2121
"import/extensions": ["error", "ignorePackages"],
22-
"import/no-duplicates": ["error", { "prefer-inline": true }],
22+
"import/no-duplicates": [
23+
"error",
24+
{
25+
"prefer-inline": true
26+
}
27+
],
2328
"import/no-relative-parent-imports": "error",
2429
"simple-import-sort/imports": [
2530
"error",
@@ -56,7 +61,49 @@
5661
"fixStyle": "inline-type-imports"
5762
}
5863
],
59-
"@typescript-eslint/no-unused-vars": "off"
64+
"@typescript-eslint/no-unused-vars": "off",
65+
"@typescript-eslint/explicit-function-return-type": "off",
66+
"@typescript-eslint/naming-convention": [
67+
"error",
68+
{
69+
"selector": ["interface", "typeAlias"],
70+
"format": ["PascalCase"],
71+
"leadingUnderscore": "forbid",
72+
"trailingUnderscore": "forbid"
73+
},
74+
{
75+
"selector": [
76+
"classProperty",
77+
"typeProperty",
78+
"parameterProperty",
79+
"variable",
80+
"parameter"
81+
],
82+
"types": ["function"],
83+
"format": ["camelCase"]
84+
},
85+
{
86+
"selector": ["objectLiteralProperty"],
87+
"format": null
88+
},
89+
{
90+
"selector": ["parameterProperty", "variable", "parameter"],
91+
"types": ["boolean", "string", "number", "array"],
92+
"format": ["snake_case", "UPPER_CASE"],
93+
"leadingUnderscore": "allow",
94+
"trailingUnderscore": "allow"
95+
},
96+
{
97+
"selector": ["function"],
98+
"format": ["camelCase"]
99+
},
100+
{
101+
"selector": "default",
102+
"format": ["camelCase", "snake_case", "UPPER_CASE", "PascalCase"],
103+
"leadingUnderscore": "allow",
104+
"trailingUnderscore": "forbid"
105+
}
106+
]
60107
}
61108
}
62109
]

examples/index.ts

Lines changed: 0 additions & 9 deletions
This file was deleted.

examples/todo.ts

Lines changed: 0 additions & 23 deletions
This file was deleted.

package-lock.json

Lines changed: 50 additions & 26 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,10 @@
6767
"node": ">=18.12.0",
6868
"npm": ">= 9.0.0"
6969
},
70+
"dependencies": {
71+
"prettier": "^3.5.3",
72+
"ts-morph": "^25.0.1"
73+
},
7074
"devDependencies": {
7175
"@types/node": "^20.8.10",
7276
"ava": "^6.0.1",
@@ -79,7 +83,6 @@
7983
"eslint-plugin-simple-import-sort": "^12.0.0",
8084
"eslint-plugin-unused-imports": "^3.0.0",
8185
"landlubber": "^2.0.0",
82-
"prettier": "^3.0.0",
8386
"tsc-alias": "^1.8.2",
8487
"tsup": "^8.0.1",
8588
"tsx": "^4.6.2",

0 commit comments

Comments
 (0)