Skip to content

Commit 98ce269

Browse files
authored
chore(tslint): Add object-curly-spacing rule (#16)
1 parent 5537520 commit 98ce269

File tree

4 files changed

+138
-67
lines changed

4 files changed

+138
-67
lines changed

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,13 @@
4141
"axios": "^1.1.3",
4242
"form-data": "^4.0.0",
4343
"mocha": "^10.1.0",
44-
"msw": "^0.47.4",
44+
"msw": "^0.48.1",
4545
"rxjs": "^7.5.7",
4646
"semantic-release": "^19.0.5",
47-
"sinon": "^14.0.1",
47+
"sinon": "^14.0.2",
4848
"ts-node": "^10.9.1",
4949
"tslint": "^6.1.3",
50+
"tslint-eslint-rules": "^5.4.0",
5051
"typescript": "^4.8.4"
5152
},
5253
"peerDependencies": {

src/lib/RxjsAxios.ts

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ export class RxjsAxios {
7676
const { controller, signal } = this.makeCancellable();
7777

7878
return observify(
79-
() => this.axios.request<T, R, D>({ ...config, signal}),
79+
() => this.axios.request<T, R, D>({ ...config, signal }),
8080
controller,
8181
);
8282
}
@@ -88,7 +88,7 @@ export class RxjsAxios {
8888
const { controller, signal } = this.makeCancellable();
8989

9090
return observify(
91-
() => this.axios.get<T, R, D>(url, { ...config, signal}),
91+
() => this.axios.get<T, R, D>(url, { ...config, signal }),
9292
controller,
9393
);
9494
}
@@ -100,7 +100,7 @@ export class RxjsAxios {
100100
const { controller, signal } = this.makeCancellable();
101101

102102
return observify(
103-
() => this.axios.delete<T, R, D>(url, { ...config, signal}),
103+
() => this.axios.delete<T, R, D>(url, { ...config, signal }),
104104
controller,
105105
);
106106
}
@@ -112,7 +112,7 @@ export class RxjsAxios {
112112
const { controller, signal } = this.makeCancellable();
113113

114114
return observify(
115-
() => this.axios.head<T, R, D>(url, { ...config, signal}),
115+
() => this.axios.head<T, R, D>(url, { ...config, signal }),
116116
controller,
117117
);
118118
}
@@ -124,7 +124,7 @@ export class RxjsAxios {
124124
const { controller, signal } = this.makeCancellable();
125125

126126
return observify(
127-
() => this.axios.options<T, R, D>(url, { ...config, signal}),
127+
() => this.axios.options<T, R, D>(url, { ...config, signal }),
128128
controller,
129129
);
130130
}
@@ -137,7 +137,7 @@ export class RxjsAxios {
137137
const { controller, signal } = this.makeCancellable();
138138

139139
return observify(
140-
() => this.axios.post<T, R, D>(url, data, { ...config, signal}),
140+
() => this.axios.post<T, R, D>(url, data, { ...config, signal }),
141141
controller,
142142
);
143143
}
@@ -150,7 +150,7 @@ export class RxjsAxios {
150150
const { controller, signal } = this.makeCancellable();
151151

152152
return observify(
153-
() => this.axios.put<T, R, D>(url, data, { ...config, signal}),
153+
() => this.axios.put<T, R, D>(url, data, { ...config, signal }),
154154
controller,
155155
);
156156
}
@@ -163,7 +163,7 @@ export class RxjsAxios {
163163
const { controller, signal } = this.makeCancellable();
164164

165165
return observify(
166-
() => this.axios.patch<T, R, D>(url, data, { ...config, signal}),
166+
() => this.axios.patch<T, R, D>(url, data, { ...config, signal }),
167167
controller,
168168
);
169169
}
@@ -176,7 +176,7 @@ export class RxjsAxios {
176176
const { controller, signal } = this.makeCancellable();
177177

178178
return observify(
179-
() => this.axios.postForm<T, R, D>(url, data, { ...config, signal}),
179+
() => this.axios.postForm<T, R, D>(url, data, { ...config, signal }),
180180
controller,
181181
);
182182
}
@@ -189,7 +189,7 @@ export class RxjsAxios {
189189
const { controller, signal } = this.makeCancellable();
190190

191191
return observify(
192-
() => this.axios.putForm<T, R, D>(url, data, { ...config, signal}),
192+
() => this.axios.putForm<T, R, D>(url, data, { ...config, signal }),
193193
controller,
194194
);
195195
}
@@ -202,7 +202,7 @@ export class RxjsAxios {
202202
const { controller, signal } = this.makeCancellable();
203203

204204
return observify(
205-
() => this.axios.patchForm<T, R, D>(url, data, { ...config, signal}),
205+
() => this.axios.patchForm<T, R, D>(url, data, { ...config, signal }),
206206
controller,
207207
);
208208
}

tslint.json

Lines changed: 24 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,17 @@
11
{
22
"defaultSeverity": "error",
33
"extends": [
4-
"tslint:recommended"
4+
"tslint:recommended",
5+
"tslint-eslint-rules"
56
],
7+
"linterOptions": {
8+
"exclude": [
9+
".yarn/**/*",
10+
"build/**/*",
11+
"dist/**/*",
12+
"node_modules/**/*"
13+
]
14+
},
615
"rules": {
716
"align": [true, "statements"],
817
"array-type": false,
@@ -21,26 +30,14 @@
2130
"no-unbound-method": false,
2231
"no-unused-expression": false,
2332
"only-arrow-functions": false,
33+
"object-curly-spacing": [true, "always"],
2434
"object-literal-sort-keys": true,
2535
"ordered-imports": [
2636
true,
2737
{ "grouped-imports": true }
2838
],
2939
"quotemark": [true, "double", "avoid-escape", "avoid-template"],
3040
"semicolon": true,
31-
"whitespace": [
32-
true,
33-
"check-branch",
34-
"check-decl",
35-
"check-operator",
36-
"check-module",
37-
"check-separator",
38-
"check-rest-spread",
39-
"check-type",
40-
"check-typecast",
41-
"check-type-operator",
42-
"check-preblock"
43-
],
4441
"trailing-comma": [true, {
4542
"singleline": "never",
4643
"multiline": {
@@ -53,14 +50,19 @@
5350
},
5451
"esSpecCompliant": true
5552
}],
56-
"variable-name": [true, "allow-pascal-case", "allow-leading-underscore"]
57-
},
58-
"linterOptions": {
59-
"exclude": [
60-
".yarn/**/*",
61-
"build/**/*",
62-
"dist/**/*",
63-
"node_modules/**/*"
53+
"variable-name": [true, "allow-pascal-case", "allow-leading-underscore"],
54+
"whitespace": [
55+
true,
56+
"check-branch",
57+
"check-decl",
58+
"check-operator",
59+
"check-module",
60+
"check-separator",
61+
"check-rest-spread",
62+
"check-type",
63+
"check-typecast",
64+
"check-type-operator",
65+
"check-preblock"
6466
]
6567
}
6668
}

0 commit comments

Comments
 (0)