@tailor-platform/create-sdk 1.2.0 → 1.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/package.json +5 -3
  3. package/templates/hello-world/.oxfmtrc.json +3 -0
  4. package/templates/hello-world/.oxlintrc.json +197 -0
  5. package/templates/hello-world/eslint.config.js +2 -0
  6. package/templates/hello-world/package.json +9 -6
  7. package/templates/inventory-management/.oxfmtrc.json +3 -0
  8. package/templates/inventory-management/.oxlintrc.json +203 -0
  9. package/templates/inventory-management/eslint.config.js +2 -0
  10. package/templates/inventory-management/package.json +9 -6
  11. package/templates/inventory-management/src/db/category.ts +1 -3
  12. package/templates/inventory-management/src/db/common/permission.ts +1 -5
  13. package/templates/inventory-management/src/db/contact.ts +2 -6
  14. package/templates/inventory-management/src/db/order.ts +1 -3
  15. package/templates/inventory-management/src/db/orderItem.ts +1 -3
  16. package/templates/inventory-management/src/db/product.ts +1 -3
  17. package/templates/inventory-management/src/executor/checkInventory.ts +1 -2
  18. package/templates/inventory-management/src/resolver/registerOrder.ts +2 -8
  19. package/templates/inventory-management/tailor.config.ts +1 -5
  20. package/templates/multi-application/.oxfmtrc.json +3 -0
  21. package/templates/multi-application/.oxlintrc.json +197 -0
  22. package/templates/multi-application/eslint.config.js +2 -0
  23. package/templates/multi-application/package.json +9 -6
  24. package/templates/testing/.oxfmtrc.json +3 -0
  25. package/templates/testing/.oxlintrc.json +197 -0
  26. package/templates/testing/e2e/workflow.test.ts +32 -40
  27. package/templates/testing/eslint.config.js +2 -0
  28. package/templates/testing/package.json +9 -6
  29. package/templates/testing/src/resolver/mockTailordb.test.ts +1 -9
  30. package/templates/testing/src/resolver/wrapTailordb.test.ts +5 -15
  31. package/templates/testing/src/resolver/wrapTailordb.ts +3 -11
  32. package/templates/testing/src/workflow/wrapTailordb.test.ts +6 -13
  33. package/templates/testing/src/workflow/wrapTailordb.ts +2 -9
  34. package/templates/testing/tailor.config.ts +1 -5
  35. package/templates/hello-world/.prettierignore +0 -1
  36. package/templates/inventory-management/.prettierignore +0 -2
  37. package/templates/multi-application/.prettierignore +0 -1
  38. package/templates/testing/.prettierignore +0 -2
package/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # @tailor-platform/create-sdk
2
2
 
3
+ ## 1.2.2
4
+
5
+ ## 1.2.1
6
+
7
+ ### Patch Changes
8
+
9
+ - [#353](https://github.com/tailor-platform/sdk/pull/353) [`2f5e2bf`](https://github.com/tailor-platform/sdk/commit/2f5e2bf80174e48c6e7ffd4e057d740a88b178e7) Thanks [@riku99](https://github.com/riku99)! - Use oxlint and oxfmt in example and create-sdk/templates
10
+
3
11
  ## 1.2.0
4
12
 
5
13
  ## 1.1.3
@@ -183,6 +191,7 @@
183
191
  - [#691](https://github.com/tailor-platform/sdk/pull/691) [`4e949b6`](https://github.com/tailor-platform/sdk/commit/4e949b67291ce8775c189a793a99f768ab8904db) Thanks [@toiroakr](https://github.com/toiroakr)! - feat: add seed generator
184
192
 
185
193
  Added `@tailor-platform/seed` generator that automatically generates seed data files from TailorDB type definitions. This generator creates:
194
+
186
195
  - GraphQL Ingest mapping files (`mappings/*.json`) and GraphQL files for bulk data loading via [gql-ingest](https://github.com/jackchuka/gql-ingest)
187
196
  - lines-db schema files (`data/*.schema.ts`) for validation via [lines-db](https://github.com/toiroakr/lines-db)
188
197
  - Configuration file (`config.yaml`) defining entity dependencies
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tailor-platform/create-sdk",
3
- "version": "1.2.0",
3
+ "version": "1.2.2",
4
4
  "description": "A CLI tool to quickly create a new Tailor Platform SDK project",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -28,14 +28,16 @@
28
28
  "@eslint/js": "9.39.2",
29
29
  "@types/node": "24.10.4",
30
30
  "eslint": "9.39.2",
31
+ "eslint-plugin-oxlint": "1.36.0",
32
+ "oxlint": "1.36.0",
31
33
  "tsdown": "0.18.4",
32
34
  "typescript": "5.9.3",
33
35
  "typescript-eslint": "8.51.0"
34
36
  },
35
37
  "scripts": {
36
38
  "build": "tsdown",
37
- "lint": "eslint --cache .",
38
- "lint:fix": "eslint --cache --fix .",
39
+ "lint": "oxlint . && eslint --cache .",
40
+ "lint:fix": "oxlint --fix . && eslint --cache --fix .",
39
41
  "typecheck": "tsc --noEmit",
40
42
  "prepublish": "node scripts/prepare-templates.js && pnpm run build"
41
43
  }
@@ -0,0 +1,3 @@
1
+ {
2
+ "ignorePatterns": ["pnpm-lock.yaml"]
3
+ }
@@ -0,0 +1,197 @@
1
+ {
2
+ "$schema": "./node_modules/oxlint/configuration_schema.json",
3
+ "plugins": ["typescript"],
4
+ "categories": {
5
+ "correctness": "off"
6
+ },
7
+ "env": {
8
+ "builtin": true
9
+ },
10
+ "ignorePatterns": [".tailor-sdk/"],
11
+ "rules": {
12
+ "constructor-super": "error",
13
+ "for-direction": "error",
14
+ "no-async-promise-executor": "error",
15
+ "no-case-declarations": "error",
16
+ "no-class-assign": "error",
17
+ "no-compare-neg-zero": "error",
18
+ "no-cond-assign": "error",
19
+ "no-const-assign": "error",
20
+ "no-constant-binary-expression": "error",
21
+ "no-constant-condition": "error",
22
+ "no-control-regex": "error",
23
+ "no-debugger": "error",
24
+ "no-delete-var": "error",
25
+ "no-dupe-class-members": "error",
26
+ "no-dupe-else-if": "error",
27
+ "no-dupe-keys": "error",
28
+ "no-duplicate-case": "error",
29
+ "no-empty": "error",
30
+ "no-empty-character-class": "error",
31
+ "no-empty-pattern": "error",
32
+ "no-empty-static-block": "error",
33
+ "no-ex-assign": "error",
34
+ "no-extra-boolean-cast": "error",
35
+ "no-fallthrough": "error",
36
+ "no-func-assign": "error",
37
+ "no-global-assign": "error",
38
+ "no-import-assign": "error",
39
+ "no-invalid-regexp": "error",
40
+ "no-irregular-whitespace": "error",
41
+ "no-loss-of-precision": "error",
42
+ "no-new-native-nonconstructor": "error",
43
+ "no-nonoctal-decimal-escape": "error",
44
+ "no-obj-calls": "error",
45
+ "no-prototype-builtins": "error",
46
+ "no-redeclare": "error",
47
+ "no-regex-spaces": "error",
48
+ "no-self-assign": "error",
49
+ "no-setter-return": "error",
50
+ "no-shadow-restricted-names": "error",
51
+ "no-sparse-arrays": "error",
52
+ "no-this-before-super": "error",
53
+ "no-unexpected-multiline": "error",
54
+ "no-unsafe-finally": "error",
55
+ "no-unsafe-negation": "error",
56
+ "no-unsafe-optional-chaining": "error",
57
+ "no-unused-labels": "error",
58
+ "no-unused-private-class-members": "error",
59
+ "no-unused-vars": "error",
60
+ "no-useless-backreference": "error",
61
+ "no-useless-catch": "error",
62
+ "no-useless-escape": "error",
63
+ "no-with": "error",
64
+ "require-yield": "error",
65
+ "use-isnan": "error",
66
+ "valid-typeof": "error",
67
+ "@typescript-eslint/await-thenable": "error",
68
+ "@typescript-eslint/ban-ts-comment": "error",
69
+ "no-array-constructor": "error",
70
+ "@typescript-eslint/no-array-delete": "error",
71
+ "@typescript-eslint/no-base-to-string": "error",
72
+ "@typescript-eslint/no-duplicate-enum-values": "error",
73
+ "@typescript-eslint/no-duplicate-type-constituents": "error",
74
+ "@typescript-eslint/no-empty-object-type": "error",
75
+ "@typescript-eslint/no-explicit-any": "error",
76
+ "@typescript-eslint/no-extra-non-null-assertion": "error",
77
+ "@typescript-eslint/no-floating-promises": "error",
78
+ "@typescript-eslint/no-for-in-array": "error",
79
+ "@typescript-eslint/no-implied-eval": "error",
80
+ "@typescript-eslint/no-misused-new": "error",
81
+ "@typescript-eslint/no-misused-promises": "error",
82
+ "@typescript-eslint/no-namespace": "error",
83
+ "@typescript-eslint/no-non-null-asserted-optional-chain": "error",
84
+ "@typescript-eslint/no-redundant-type-constituents": "error",
85
+ "@typescript-eslint/no-require-imports": "error",
86
+ "@typescript-eslint/no-this-alias": "error",
87
+ "@typescript-eslint/no-unnecessary-type-assertion": "error",
88
+ "@typescript-eslint/no-unnecessary-type-constraint": "error",
89
+ "@typescript-eslint/no-unsafe-argument": "error",
90
+ "@typescript-eslint/no-unsafe-assignment": "error",
91
+ "@typescript-eslint/no-unsafe-call": "error",
92
+ "@typescript-eslint/no-unsafe-declaration-merging": "error",
93
+ "@typescript-eslint/no-unsafe-enum-comparison": "error",
94
+ "@typescript-eslint/no-unsafe-function-type": "error",
95
+ "@typescript-eslint/no-unsafe-member-access": "error",
96
+ "@typescript-eslint/no-unsafe-return": "error",
97
+ "@typescript-eslint/no-unsafe-unary-minus": "error",
98
+ "no-unused-expressions": "error",
99
+ "@typescript-eslint/no-wrapper-object-types": "error",
100
+ "@typescript-eslint/only-throw-error": "error",
101
+ "@typescript-eslint/prefer-as-const": "error",
102
+ "@typescript-eslint/prefer-namespace-keyword": "error",
103
+ "@typescript-eslint/prefer-promise-reject-errors": "error",
104
+ "@typescript-eslint/require-await": "error",
105
+ "@typescript-eslint/restrict-plus-operands": "error",
106
+ "@typescript-eslint/restrict-template-expressions": "error",
107
+ "@typescript-eslint/triple-slash-reference": "error",
108
+ "@typescript-eslint/unbound-method": "error",
109
+ "@typescript-eslint/adjacent-overload-signatures": "error",
110
+ "@typescript-eslint/array-type": "error",
111
+ "@typescript-eslint/ban-tslint-comment": "error",
112
+ "@typescript-eslint/consistent-generic-constructors": "error",
113
+ "@typescript-eslint/consistent-indexed-object-style": "error",
114
+ "@typescript-eslint/consistent-type-definitions": "error",
115
+ "@typescript-eslint/no-confusing-non-null-assertion": "error",
116
+ "no-empty-function": "error",
117
+ "@typescript-eslint/no-inferrable-types": "error",
118
+ "@typescript-eslint/non-nullable-type-assertion-style": "error",
119
+ "@typescript-eslint/prefer-for-of": "error",
120
+ "@typescript-eslint/prefer-function-type": "error",
121
+ "@typescript-eslint/prefer-includes": "error",
122
+ "@typescript-eslint/prefer-nullish-coalescing": "error"
123
+ },
124
+ "overrides": [
125
+ {
126
+ "files": ["**/*.ts", "**/*.tsx", "**/*.mts", "**/*.cts"],
127
+ "rules": {
128
+ "constructor-super": "off",
129
+ "no-class-assign": "off",
130
+ "no-const-assign": "off",
131
+ "no-dupe-class-members": "off",
132
+ "no-dupe-keys": "off",
133
+ "no-func-assign": "off",
134
+ "no-import-assign": "off",
135
+ "no-new-native-nonconstructor": "off",
136
+ "no-obj-calls": "off",
137
+ "no-redeclare": "off",
138
+ "no-setter-return": "off",
139
+ "no-this-before-super": "off",
140
+ "no-unsafe-negation": "off",
141
+ "no-var": "error",
142
+ "no-with": "off",
143
+ "prefer-rest-params": "error",
144
+ "prefer-spread": "error"
145
+ }
146
+ },
147
+ {
148
+ "files": ["eslint.config.js"],
149
+ "rules": {
150
+ "@typescript-eslint/await-thenable": "off",
151
+ "@typescript-eslint/no-array-delete": "off",
152
+ "@typescript-eslint/no-base-to-string": "off",
153
+ "@typescript-eslint/no-confusing-void-expression": "off",
154
+ "@typescript-eslint/no-deprecated": "off",
155
+ "@typescript-eslint/no-duplicate-type-constituents": "off",
156
+ "@typescript-eslint/no-floating-promises": "off",
157
+ "@typescript-eslint/no-for-in-array": "off",
158
+ "@typescript-eslint/no-implied-eval": "off",
159
+ "@typescript-eslint/no-meaningless-void-operator": "off",
160
+ "@typescript-eslint/no-misused-promises": "off",
161
+ "@typescript-eslint/no-misused-spread": "off",
162
+ "@typescript-eslint/no-mixed-enums": "off",
163
+ "@typescript-eslint/no-redundant-type-constituents": "off",
164
+ "@typescript-eslint/no-unnecessary-boolean-literal-compare": "off",
165
+ "@typescript-eslint/no-unnecessary-template-expression": "off",
166
+ "@typescript-eslint/no-unnecessary-type-arguments": "off",
167
+ "@typescript-eslint/no-unnecessary-type-assertion": "off",
168
+ "@typescript-eslint/no-unsafe-argument": "off",
169
+ "@typescript-eslint/no-unsafe-assignment": "off",
170
+ "@typescript-eslint/no-unsafe-call": "off",
171
+ "@typescript-eslint/no-unsafe-enum-comparison": "off",
172
+ "@typescript-eslint/no-unsafe-member-access": "off",
173
+ "@typescript-eslint/no-unsafe-return": "off",
174
+ "@typescript-eslint/no-unsafe-type-assertion": "off",
175
+ "@typescript-eslint/no-unsafe-unary-minus": "off",
176
+ "@typescript-eslint/non-nullable-type-assertion-style": "off",
177
+ "@typescript-eslint/only-throw-error": "off",
178
+ "@typescript-eslint/prefer-includes": "off",
179
+ "@typescript-eslint/prefer-nullish-coalescing": "off",
180
+ "@typescript-eslint/prefer-promise-reject-errors": "off",
181
+ "@typescript-eslint/prefer-reduce-type-parameter": "off",
182
+ "@typescript-eslint/prefer-return-this-type": "off",
183
+ "@typescript-eslint/promise-function-async": "off",
184
+ "@typescript-eslint/related-getter-setter-pairs": "off",
185
+ "@typescript-eslint/require-array-sort-compare": "off",
186
+ "@typescript-eslint/require-await": "off",
187
+ "@typescript-eslint/restrict-plus-operands": "off",
188
+ "@typescript-eslint/restrict-template-expressions": "off",
189
+ "@typescript-eslint/return-await": "off",
190
+ "@typescript-eslint/strict-boolean-expressions": "off",
191
+ "@typescript-eslint/switch-exhaustiveness-check": "off",
192
+ "@typescript-eslint/unbound-method": "off",
193
+ "@typescript-eslint/use-unknown-in-catch-callback-variable": "off"
194
+ }
195
+ }
196
+ ]
197
+ }
@@ -1,6 +1,7 @@
1
1
  import eslint from "@eslint/js";
2
2
  import tseslint from "typescript-eslint";
3
3
  import { defineConfig, globalIgnores } from "eslint/config";
4
+ import oxlint from "eslint-plugin-oxlint";
4
5
 
5
6
  export default defineConfig([
6
7
  // Ignore sdk's output directory.
@@ -24,4 +25,5 @@ export default defineConfig([
24
25
  files: ["eslint.config.js"],
25
26
  extends: [tseslint.configs.disableTypeChecked],
26
27
  },
28
+ ...oxlint.buildFromOxlintConfigFile("./.oxlintrc.json"),
27
29
  ]);
@@ -4,18 +4,21 @@
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "deploy": "tailor-sdk apply",
7
- "format": "prettier --write .",
8
- "format:check": "prettier --check .",
9
- "lint": "eslint --cache .",
10
- "lint:fix": "eslint --cache --fix .",
7
+ "format": "oxfmt --write .",
8
+ "format:check": "oxfmt --check .",
9
+ "lint": "oxlint --type-aware . && eslint --cache .",
10
+ "lint:fix": "oxlint --type-aware --fix . && eslint --cache --fix .",
11
11
  "typecheck": "tsc --noEmit"
12
12
  },
13
13
  "devDependencies": {
14
14
  "@eslint/js": "9.39.2",
15
- "@tailor-platform/sdk": "1.2.0",
15
+ "@tailor-platform/sdk": "1.2.2",
16
16
  "@types/node": "24.10.4",
17
17
  "eslint": "9.39.2",
18
- "prettier": "3.7.4",
18
+ "eslint-plugin-oxlint": "1.36.0",
19
+ "oxfmt": "0.21.0",
20
+ "oxlint": "1.36.0",
21
+ "oxlint-tsgolint": "0.10.1",
19
22
  "typescript": "5.9.3",
20
23
  "typescript-eslint": "8.51.0"
21
24
  }
@@ -0,0 +1,3 @@
1
+ {
2
+ "ignorePatterns": ["src/generated/", "pnpm-lock.yaml"]
3
+ }
@@ -0,0 +1,203 @@
1
+ {
2
+ "$schema": "./node_modules/oxlint/configuration_schema.json",
3
+ "plugins": ["typescript"],
4
+ "categories": {
5
+ "correctness": "off"
6
+ },
7
+ "env": {
8
+ "builtin": true
9
+ },
10
+ "ignorePatterns": [".tailor-sdk/", "src/generated/"],
11
+ "rules": {
12
+ "constructor-super": "error",
13
+ "for-direction": "error",
14
+ "no-async-promise-executor": "error",
15
+ "no-case-declarations": "error",
16
+ "no-class-assign": "error",
17
+ "no-compare-neg-zero": "error",
18
+ "no-cond-assign": "error",
19
+ "no-const-assign": "error",
20
+ "no-constant-binary-expression": "error",
21
+ "no-constant-condition": "error",
22
+ "no-control-regex": "error",
23
+ "no-debugger": "error",
24
+ "no-delete-var": "error",
25
+ "no-dupe-class-members": "error",
26
+ "no-dupe-else-if": "error",
27
+ "no-dupe-keys": "error",
28
+ "no-duplicate-case": "error",
29
+ "no-empty": "error",
30
+ "no-empty-character-class": "error",
31
+ "no-empty-pattern": "error",
32
+ "no-empty-static-block": "error",
33
+ "no-ex-assign": "error",
34
+ "no-extra-boolean-cast": "error",
35
+ "no-fallthrough": "error",
36
+ "no-func-assign": "error",
37
+ "no-global-assign": "error",
38
+ "no-import-assign": "error",
39
+ "no-invalid-regexp": "error",
40
+ "no-irregular-whitespace": "error",
41
+ "no-loss-of-precision": "error",
42
+ "no-new-native-nonconstructor": "error",
43
+ "no-nonoctal-decimal-escape": "error",
44
+ "no-obj-calls": "error",
45
+ "no-prototype-builtins": "error",
46
+ "no-redeclare": "error",
47
+ "no-regex-spaces": "error",
48
+ "no-self-assign": "error",
49
+ "no-setter-return": "error",
50
+ "no-shadow-restricted-names": "error",
51
+ "no-sparse-arrays": "error",
52
+ "no-this-before-super": "error",
53
+ "no-unexpected-multiline": "error",
54
+ "no-unsafe-finally": "error",
55
+ "no-unsafe-negation": "error",
56
+ "no-unsafe-optional-chaining": "error",
57
+ "no-unused-labels": "error",
58
+ "no-unused-private-class-members": "error",
59
+ "no-unused-vars": [
60
+ "error",
61
+ {
62
+ "argsIgnorePattern": "^_",
63
+ "varsIgnorePattern": "^_"
64
+ }
65
+ ],
66
+ "no-useless-backreference": "error",
67
+ "no-useless-catch": "error",
68
+ "no-useless-escape": "error",
69
+ "no-with": "error",
70
+ "require-yield": "error",
71
+ "use-isnan": "error",
72
+ "valid-typeof": "error",
73
+ "@typescript-eslint/await-thenable": "error",
74
+ "@typescript-eslint/ban-ts-comment": "error",
75
+ "no-array-constructor": "error",
76
+ "@typescript-eslint/no-array-delete": "error",
77
+ "@typescript-eslint/no-base-to-string": "error",
78
+ "@typescript-eslint/no-duplicate-enum-values": "error",
79
+ "@typescript-eslint/no-duplicate-type-constituents": "error",
80
+ "@typescript-eslint/no-empty-object-type": "error",
81
+ "@typescript-eslint/no-explicit-any": "error",
82
+ "@typescript-eslint/no-extra-non-null-assertion": "error",
83
+ "@typescript-eslint/no-floating-promises": "error",
84
+ "@typescript-eslint/no-for-in-array": "error",
85
+ "@typescript-eslint/no-implied-eval": "error",
86
+ "@typescript-eslint/no-misused-new": "error",
87
+ "@typescript-eslint/no-misused-promises": "error",
88
+ "@typescript-eslint/no-namespace": "error",
89
+ "@typescript-eslint/no-non-null-asserted-optional-chain": "error",
90
+ "@typescript-eslint/no-redundant-type-constituents": "error",
91
+ "@typescript-eslint/no-require-imports": "error",
92
+ "@typescript-eslint/no-this-alias": "error",
93
+ "@typescript-eslint/no-unnecessary-type-assertion": "error",
94
+ "@typescript-eslint/no-unnecessary-type-constraint": "error",
95
+ "@typescript-eslint/no-unsafe-argument": "error",
96
+ "@typescript-eslint/no-unsafe-assignment": "error",
97
+ "@typescript-eslint/no-unsafe-call": "error",
98
+ "@typescript-eslint/no-unsafe-declaration-merging": "error",
99
+ "@typescript-eslint/no-unsafe-enum-comparison": "error",
100
+ "@typescript-eslint/no-unsafe-function-type": "error",
101
+ "@typescript-eslint/no-unsafe-member-access": "error",
102
+ "@typescript-eslint/no-unsafe-return": "error",
103
+ "@typescript-eslint/no-unsafe-unary-minus": "error",
104
+ "no-unused-expressions": "error",
105
+ "@typescript-eslint/no-wrapper-object-types": "error",
106
+ "@typescript-eslint/only-throw-error": "error",
107
+ "@typescript-eslint/prefer-as-const": "error",
108
+ "@typescript-eslint/prefer-namespace-keyword": "error",
109
+ "@typescript-eslint/prefer-promise-reject-errors": "error",
110
+ "@typescript-eslint/require-await": "error",
111
+ "@typescript-eslint/restrict-plus-operands": "error",
112
+ "@typescript-eslint/restrict-template-expressions": "error",
113
+ "@typescript-eslint/triple-slash-reference": "error",
114
+ "@typescript-eslint/unbound-method": "error",
115
+ "@typescript-eslint/adjacent-overload-signatures": "error",
116
+ "@typescript-eslint/array-type": "error",
117
+ "@typescript-eslint/ban-tslint-comment": "error",
118
+ "@typescript-eslint/consistent-generic-constructors": "error",
119
+ "@typescript-eslint/consistent-indexed-object-style": "error",
120
+ "@typescript-eslint/consistent-type-definitions": "error",
121
+ "@typescript-eslint/no-confusing-non-null-assertion": "error",
122
+ "no-empty-function": "error",
123
+ "@typescript-eslint/no-inferrable-types": "error",
124
+ "@typescript-eslint/non-nullable-type-assertion-style": "error",
125
+ "@typescript-eslint/prefer-for-of": "error",
126
+ "@typescript-eslint/prefer-function-type": "error",
127
+ "@typescript-eslint/prefer-includes": "error",
128
+ "@typescript-eslint/prefer-nullish-coalescing": "error"
129
+ },
130
+ "overrides": [
131
+ {
132
+ "files": ["**/*.ts", "**/*.tsx", "**/*.mts", "**/*.cts"],
133
+ "rules": {
134
+ "constructor-super": "off",
135
+ "no-class-assign": "off",
136
+ "no-const-assign": "off",
137
+ "no-dupe-class-members": "off",
138
+ "no-dupe-keys": "off",
139
+ "no-func-assign": "off",
140
+ "no-import-assign": "off",
141
+ "no-new-native-nonconstructor": "off",
142
+ "no-obj-calls": "off",
143
+ "no-redeclare": "off",
144
+ "no-setter-return": "off",
145
+ "no-this-before-super": "off",
146
+ "no-unsafe-negation": "off",
147
+ "no-var": "error",
148
+ "no-with": "off",
149
+ "prefer-rest-params": "error",
150
+ "prefer-spread": "error"
151
+ }
152
+ },
153
+ {
154
+ "files": ["eslint.config.js"],
155
+ "rules": {
156
+ "@typescript-eslint/await-thenable": "off",
157
+ "@typescript-eslint/no-array-delete": "off",
158
+ "@typescript-eslint/no-base-to-string": "off",
159
+ "@typescript-eslint/no-confusing-void-expression": "off",
160
+ "@typescript-eslint/no-deprecated": "off",
161
+ "@typescript-eslint/no-duplicate-type-constituents": "off",
162
+ "@typescript-eslint/no-floating-promises": "off",
163
+ "@typescript-eslint/no-for-in-array": "off",
164
+ "@typescript-eslint/no-implied-eval": "off",
165
+ "@typescript-eslint/no-meaningless-void-operator": "off",
166
+ "@typescript-eslint/no-misused-promises": "off",
167
+ "@typescript-eslint/no-misused-spread": "off",
168
+ "@typescript-eslint/no-mixed-enums": "off",
169
+ "@typescript-eslint/no-redundant-type-constituents": "off",
170
+ "@typescript-eslint/no-unnecessary-boolean-literal-compare": "off",
171
+ "@typescript-eslint/no-unnecessary-template-expression": "off",
172
+ "@typescript-eslint/no-unnecessary-type-arguments": "off",
173
+ "@typescript-eslint/no-unnecessary-type-assertion": "off",
174
+ "@typescript-eslint/no-unsafe-argument": "off",
175
+ "@typescript-eslint/no-unsafe-assignment": "off",
176
+ "@typescript-eslint/no-unsafe-call": "off",
177
+ "@typescript-eslint/no-unsafe-enum-comparison": "off",
178
+ "@typescript-eslint/no-unsafe-member-access": "off",
179
+ "@typescript-eslint/no-unsafe-return": "off",
180
+ "@typescript-eslint/no-unsafe-type-assertion": "off",
181
+ "@typescript-eslint/no-unsafe-unary-minus": "off",
182
+ "@typescript-eslint/non-nullable-type-assertion-style": "off",
183
+ "@typescript-eslint/only-throw-error": "off",
184
+ "@typescript-eslint/prefer-includes": "off",
185
+ "@typescript-eslint/prefer-nullish-coalescing": "off",
186
+ "@typescript-eslint/prefer-promise-reject-errors": "off",
187
+ "@typescript-eslint/prefer-reduce-type-parameter": "off",
188
+ "@typescript-eslint/prefer-return-this-type": "off",
189
+ "@typescript-eslint/promise-function-async": "off",
190
+ "@typescript-eslint/related-getter-setter-pairs": "off",
191
+ "@typescript-eslint/require-array-sort-compare": "off",
192
+ "@typescript-eslint/require-await": "off",
193
+ "@typescript-eslint/restrict-plus-operands": "off",
194
+ "@typescript-eslint/restrict-template-expressions": "off",
195
+ "@typescript-eslint/return-await": "off",
196
+ "@typescript-eslint/strict-boolean-expressions": "off",
197
+ "@typescript-eslint/switch-exhaustiveness-check": "off",
198
+ "@typescript-eslint/unbound-method": "off",
199
+ "@typescript-eslint/use-unknown-in-catch-callback-variable": "off"
200
+ }
201
+ }
202
+ ]
203
+ }
@@ -1,6 +1,7 @@
1
1
  import eslint from "@eslint/js";
2
2
  import tseslint from "typescript-eslint";
3
3
  import { defineConfig, globalIgnores } from "eslint/config";
4
+ import oxlint from "eslint-plugin-oxlint";
4
5
 
5
6
  export default defineConfig([
6
7
  // Ignore sdk's output directory.
@@ -30,4 +31,5 @@ export default defineConfig([
30
31
  files: ["eslint.config.js"],
31
32
  extends: [tseslint.configs.disableTypeChecked],
32
33
  },
34
+ ...oxlint.buildFromOxlintConfigFile("./.oxlintrc.json"),
33
35
  ]);
@@ -5,10 +5,10 @@
5
5
  "scripts": {
6
6
  "deploy": "tailor-sdk apply",
7
7
  "generate": "tailor-sdk generate",
8
- "format": "prettier --write .",
9
- "format:check": "prettier --check .",
10
- "lint": "eslint --cache .",
11
- "lint:fix": "eslint --cache --fix .",
8
+ "format": "oxfmt --write .",
9
+ "format:check": "oxfmt --check .",
10
+ "lint": "oxlint --type-aware . && eslint --cache .",
11
+ "lint:fix": "oxlint --type-aware --fix . && eslint --cache --fix .",
12
12
  "typecheck": "tsc --noEmit"
13
13
  },
14
14
  "dependencies": {
@@ -18,10 +18,13 @@
18
18
  "devDependencies": {
19
19
  "@eslint/js": "9.39.2",
20
20
  "@tailor-platform/function-types": "0.8.0",
21
- "@tailor-platform/sdk": "1.2.0",
21
+ "@tailor-platform/sdk": "1.2.2",
22
22
  "@types/node": "24.10.4",
23
23
  "eslint": "9.39.2",
24
- "prettier": "3.7.4",
24
+ "eslint-plugin-oxlint": "1.36.0",
25
+ "oxfmt": "0.21.0",
26
+ "oxlint": "1.36.0",
27
+ "oxlint-tsgolint": "0.10.1",
25
28
  "typescript": "5.9.3",
26
29
  "typescript-eslint": "8.51.0"
27
30
  }
@@ -4,9 +4,7 @@ import { gqlPermissionManager, permissionManager } from "./common/permission";
4
4
  export const category = db
5
5
  .type("Category", {
6
6
  name: db.string().description("Name of the category").unique(),
7
- description: db
8
- .string({ optional: true })
9
- .description("Description of the category"),
7
+ description: db.string({ optional: true }).description("Description of the category"),
10
8
  ...db.fields.timestamps(),
11
9
  })
12
10
  .permission(permissionManager)
@@ -13,11 +13,7 @@ export const managerRole = [
13
13
  "=",
14
14
  "MANAGER",
15
15
  ] as const satisfies PermissionCondition;
16
- export const loggedIn = [
17
- { user: "_loggedIn" },
18
- "=",
19
- true,
20
- ] as const satisfies PermissionCondition;
16
+ export const loggedIn = [{ user: "_loggedIn" }, "=", true] as const satisfies PermissionCondition;
21
17
 
22
18
  // Manager can do anything, Staff can only read.
23
19
  export const permissionManager = {
@@ -5,12 +5,8 @@ export const contact = db
5
5
  .type("Contact", {
6
6
  name: db.string().description("Name of the contact"),
7
7
  email: db.string().unique().description("Email address of the contact"),
8
- phone: db
9
- .string({ optional: true })
10
- .description("Phone number of the contact"),
11
- address: db
12
- .string({ optional: true })
13
- .description("Address of the contact"),
8
+ phone: db.string({ optional: true }).description("Phone number of the contact"),
9
+ address: db.string({ optional: true }).description("Address of the contact"),
14
10
  ...db.fields.timestamps(),
15
11
  })
16
12
  .permission(permissionManager)
@@ -5,9 +5,7 @@ import { gqlPermissionLoggedIn, permissionLoggedIn } from "./common/permission";
5
5
  export const order = db
6
6
  .type("Order", {
7
7
  name: db.string().description("Name of the order"),
8
- description: db
9
- .string({ optional: true })
10
- .description("Description of the order"),
8
+ description: db.string({ optional: true }).description("Description of the order"),
11
9
  orderDate: db.datetime().description("Date of the order"),
12
10
  orderType: db.enum(["PURCHASE", "SALES"]).description("Type of the order"),
13
11
  contactId: db
@@ -21,9 +21,7 @@ export const orderItem = db
21
21
  .float()
22
22
  .description("Unit price of the product")
23
23
  .validate(({ value }) => value >= 0),
24
- totalPrice: db
25
- .float({ optional: true })
26
- .description("Total price of the order item"),
24
+ totalPrice: db.float({ optional: true }).description("Total price of the order item"),
27
25
  ...db.fields.timestamps(),
28
26
  })
29
27
  .hooks({
@@ -5,9 +5,7 @@ import { gqlPermissionManager, permissionManager } from "./common/permission";
5
5
  export const product = db
6
6
  .type("Product", {
7
7
  name: db.string().description("Name of the product"),
8
- description: db
9
- .string({ optional: true })
10
- .description("Description of the product"),
8
+ description: db.string({ optional: true }).description("Description of the product"),
11
9
  categoryId: db
12
10
  .uuid()
13
11
  .description("ID of the category the product belongs to")
@@ -8,8 +8,7 @@ export default createExecutor({
8
8
  description: "Notify when inventory drops below threshold",
9
9
  trigger: recordUpdatedTrigger({
10
10
  type: inventory,
11
- condition: ({ oldRecord, newRecord }) =>
12
- oldRecord.quantity >= 10 && newRecord.quantity < 10,
11
+ condition: ({ oldRecord, newRecord }) => oldRecord.quantity >= 10 && newRecord.quantity < 10,
13
12
  }),
14
13
  operation: {
15
14
  kind: "function",