Skip to content

Commit a9f3444

Browse files
committed
Disable @typescript-eslint/no-empty-object-type
1 parent a9d2d23 commit a9f3444

File tree

3 files changed

+1
-11
lines changed

3 files changed

+1
-11
lines changed

crates/bindings-typescript/src/server/schema.ts

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,6 @@ class Schema<S extends UntypedSchemaDef> {
182182
params: Params,
183183
fn: Reducer<S, Params>
184184
): Reducer<S, Params>;
185-
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
186185
reducer(name: string, fn: Reducer<S, {}>): Reducer<S, {}>;
187186
reducer<Params extends ParamsObj | RowObj>(
188187
name: string,
@@ -221,11 +220,8 @@ class Schema<S extends UntypedSchemaDef> {
221220
* });
222221
* ```
223222
*/
224-
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
225223
init(fn: Reducer<S, {}>): void;
226-
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
227224
init(name: string, fn: Reducer<S, {}>): void;
228-
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
229225
init(nameOrFn: any, maybeFn?: Reducer<S, {}>): void {
230226
const [name, fn] =
231227
typeof nameOrFn === 'string' ? [nameOrFn, maybeFn] : ['init', nameOrFn];
@@ -248,11 +244,8 @@ class Schema<S extends UntypedSchemaDef> {
248244
* }
249245
* );
250246
*/
251-
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
252247
clientConnected(fn: Reducer<S, {}>): void;
253-
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
254248
clientConnected(name: string, fn: Reducer<S, {}>): void;
255-
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
256249
clientConnected(nameOrFn: any, maybeFn?: Reducer<S, {}>): void {
257250
const [name, fn] =
258251
typeof nameOrFn === 'string'
@@ -278,11 +271,8 @@ class Schema<S extends UntypedSchemaDef> {
278271
* );
279272
* ```
280273
*/
281-
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
282274
clientDisconnected(fn: Reducer<S, {}>): void;
283-
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
284275
clientDisconnected(name: string, fn: Reducer<S, {}>): void;
285-
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
286276
clientDisconnected(nameOrFn: any, maybeFn?: Reducer<S, {}>): void {
287277
const [name, fn] =
288278
typeof nameOrFn === 'string'

crates/bindings-typescript/src/server/type_builders.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,6 @@ type ObjectType<Elements extends ElementsObj> = {
109109
};
110110

111111
type VariantsObj = Record<string, TypeBuilder<any, any>>;
112-
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
113112
type UnitBuilder = ProductBuilder<{}>;
114113
type SimpleVariantsObj = Record<string, UnitBuilder>;
115114

eslint.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ export default tseslint.config(
7676
...reactHooks.configs.recommended.rules,
7777
'react-refresh/only-export-components': ['warn', { allowConstantExport: true }],
7878
"eslint-comments/no-unused-disable": "off",
79+
"@typescript-eslint/no-empty-object-type": ['error', { allowObjectTypes: 'always' }],
7980
},
8081
}
8182
);

0 commit comments

Comments
 (0)