Skip to content

Commit

Permalink
chore(tslint): Add object-curly-spacing rule (#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
JoseLion authored Nov 12, 2022
1 parent 5537520 commit 98ce269
Show file tree
Hide file tree
Showing 4 changed files with 138 additions and 67 deletions.
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,13 @@
"axios": "^1.1.3",
"form-data": "^4.0.0",
"mocha": "^10.1.0",
"msw": "^0.47.4",
"msw": "^0.48.1",
"rxjs": "^7.5.7",
"semantic-release": "^19.0.5",
"sinon": "^14.0.1",
"sinon": "^14.0.2",
"ts-node": "^10.9.1",
"tslint": "^6.1.3",
"tslint-eslint-rules": "^5.4.0",
"typescript": "^4.8.4"
},
"peerDependencies": {
Expand Down
22 changes: 11 additions & 11 deletions src/lib/RxjsAxios.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ export class RxjsAxios {
const { controller, signal } = this.makeCancellable();

return observify(
() => this.axios.request<T, R, D>({ ...config, signal}),
() => this.axios.request<T, R, D>({ ...config, signal }),
controller,
);
}
Expand All @@ -88,7 +88,7 @@ export class RxjsAxios {
const { controller, signal } = this.makeCancellable();

return observify(
() => this.axios.get<T, R, D>(url, { ...config, signal}),
() => this.axios.get<T, R, D>(url, { ...config, signal }),
controller,
);
}
Expand All @@ -100,7 +100,7 @@ export class RxjsAxios {
const { controller, signal } = this.makeCancellable();

return observify(
() => this.axios.delete<T, R, D>(url, { ...config, signal}),
() => this.axios.delete<T, R, D>(url, { ...config, signal }),
controller,
);
}
Expand All @@ -112,7 +112,7 @@ export class RxjsAxios {
const { controller, signal } = this.makeCancellable();

return observify(
() => this.axios.head<T, R, D>(url, { ...config, signal}),
() => this.axios.head<T, R, D>(url, { ...config, signal }),
controller,
);
}
Expand All @@ -124,7 +124,7 @@ export class RxjsAxios {
const { controller, signal } = this.makeCancellable();

return observify(
() => this.axios.options<T, R, D>(url, { ...config, signal}),
() => this.axios.options<T, R, D>(url, { ...config, signal }),
controller,
);
}
Expand All @@ -137,7 +137,7 @@ export class RxjsAxios {
const { controller, signal } = this.makeCancellable();

return observify(
() => this.axios.post<T, R, D>(url, data, { ...config, signal}),
() => this.axios.post<T, R, D>(url, data, { ...config, signal }),
controller,
);
}
Expand All @@ -150,7 +150,7 @@ export class RxjsAxios {
const { controller, signal } = this.makeCancellable();

return observify(
() => this.axios.put<T, R, D>(url, data, { ...config, signal}),
() => this.axios.put<T, R, D>(url, data, { ...config, signal }),
controller,
);
}
Expand All @@ -163,7 +163,7 @@ export class RxjsAxios {
const { controller, signal } = this.makeCancellable();

return observify(
() => this.axios.patch<T, R, D>(url, data, { ...config, signal}),
() => this.axios.patch<T, R, D>(url, data, { ...config, signal }),
controller,
);
}
Expand All @@ -176,7 +176,7 @@ export class RxjsAxios {
const { controller, signal } = this.makeCancellable();

return observify(
() => this.axios.postForm<T, R, D>(url, data, { ...config, signal}),
() => this.axios.postForm<T, R, D>(url, data, { ...config, signal }),
controller,
);
}
Expand All @@ -189,7 +189,7 @@ export class RxjsAxios {
const { controller, signal } = this.makeCancellable();

return observify(
() => this.axios.putForm<T, R, D>(url, data, { ...config, signal}),
() => this.axios.putForm<T, R, D>(url, data, { ...config, signal }),
controller,
);
}
Expand All @@ -202,7 +202,7 @@ export class RxjsAxios {
const { controller, signal } = this.makeCancellable();

return observify(
() => this.axios.patchForm<T, R, D>(url, data, { ...config, signal}),
() => this.axios.patchForm<T, R, D>(url, data, { ...config, signal }),
controller,
);
}
Expand Down
46 changes: 24 additions & 22 deletions tslint.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,17 @@
{
"defaultSeverity": "error",
"extends": [
"tslint:recommended"
"tslint:recommended",
"tslint-eslint-rules"
],
"linterOptions": {
"exclude": [
".yarn/**/*",
"build/**/*",
"dist/**/*",
"node_modules/**/*"
]
},
"rules": {
"align": [true, "statements"],
"array-type": false,
Expand All @@ -21,26 +30,14 @@
"no-unbound-method": false,
"no-unused-expression": false,
"only-arrow-functions": false,
"object-curly-spacing": [true, "always"],
"object-literal-sort-keys": true,
"ordered-imports": [
true,
{ "grouped-imports": true }
],
"quotemark": [true, "double", "avoid-escape", "avoid-template"],
"semicolon": true,
"whitespace": [
true,
"check-branch",
"check-decl",
"check-operator",
"check-module",
"check-separator",
"check-rest-spread",
"check-type",
"check-typecast",
"check-type-operator",
"check-preblock"
],
"trailing-comma": [true, {
"singleline": "never",
"multiline": {
Expand All @@ -53,14 +50,19 @@
},
"esSpecCompliant": true
}],
"variable-name": [true, "allow-pascal-case", "allow-leading-underscore"]
},
"linterOptions": {
"exclude": [
".yarn/**/*",
"build/**/*",
"dist/**/*",
"node_modules/**/*"
"variable-name": [true, "allow-pascal-case", "allow-leading-underscore"],
"whitespace": [
true,
"check-branch",
"check-decl",
"check-operator",
"check-module",
"check-separator",
"check-rest-spread",
"check-type",
"check-typecast",
"check-type-operator",
"check-preblock"
]
}
}
Loading

0 comments on commit 98ce269

Please sign in to comment.