Skip to content

Commit 8a96d5b

Browse files
committed
Prettier no-semi
1 parent 3e243ed commit 8a96d5b

28 files changed

+381
-389
lines changed

.eslintrc.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,4 +58,4 @@ module.exports = {
5858
},
5959
},
6060
},
61-
};
61+
}

.huskyrc.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ module.exports = {
22
hooks: {
33
'pre-commit': 'lint-staged',
44
},
5-
};
5+
}

.prettierrc.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@ module.exports = {
22
printWidth: 90,
33
trailingComma: 'all',
44
arrowParens: 'avoid',
5-
};
5+
semi: false,
6+
}

babel.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ module.exports = {
33
['@babel/preset-env', { targets: { node: 'current' } }],
44
'@babel/preset-typescript',
55
],
6-
};
6+
}

docs/rules/interface.md

Lines changed: 96 additions & 96 deletions
Original file line numberDiff line numberDiff line change
@@ -12,41 +12,41 @@ Examples of **incorrect** code for this rule:
1212
/* eslint typescript-sort-keys/interface: "error" */
1313

1414
interface U {
15-
a: T;
16-
c: T;
17-
b: T;
15+
a: T
16+
c: T
17+
b: T
1818
}
1919
interface U {
20-
a: T;
21-
c: T;
22-
b: T;
20+
a: T
21+
c: T
22+
b: T
2323
}
2424

2525
// Case-sensitive by default.
2626
interface U {
27-
a: T;
28-
b: T;
29-
C: T;
27+
a: T
28+
b: T
29+
C: T
3030
}
3131

3232
// Non-natural order by default.
3333
interface U {
34-
1: T;
35-
2: T;
36-
10: T;
34+
1: T
35+
2: T
36+
10: T
3737
}
3838

3939
// Non-required first order by default.
4040
interface U {
41-
b?: T;
42-
a: T;
43-
c: T;
41+
b?: T
42+
a: T
43+
c: T
4444
}
4545

4646
interface U {
47-
a: T;
48-
['c']: T;
49-
b: T;
47+
a: T
48+
['c']: T
49+
b: T
5050
}
5151
```
5252

@@ -56,42 +56,42 @@ Examples of **correct** code for this rule:
5656
/* eslint typescript-sort-keys/interface: "error" */
5757

5858
interface U {
59-
a: T;
60-
b: T;
61-
c: T;
59+
a: T
60+
b: T
61+
c: T
6262
}
6363
interface U {
64-
a: T;
65-
b: T;
66-
c: T;
64+
a: T
65+
b: T
66+
c: T
6767
}
6868

6969
// Case-sensitive by default.
7070
interface U {
71-
C: T;
72-
a: T;
73-
b: T;
71+
C: T
72+
a: T
73+
b: T
7474
}
7575

7676
// Non-natural order by default.
7777
interface U {
78-
1: T;
79-
10: T;
80-
2: T;
78+
1: T
79+
10: T
80+
2: T
8181
}
8282

8383
// Non-required first order by default.
8484
interface U {
85-
a: T;
86-
b?: T;
87-
c: T;
85+
a: T
86+
b?: T
87+
c: T
8888
}
8989

9090
// This rule checks computed properties which have a simple name as well.
9191
interface U {
92-
a: T;
93-
['b']: T;
94-
c: T;
92+
a: T
93+
['b']: T
94+
c: T
9595
}
9696
```
9797

@@ -142,35 +142,35 @@ Examples of **incorrect** code for the `"desc"` option:
142142
/* eslint typescript-sort-keys/interface: ["error", "desc"] */
143143

144144
interface U {
145-
b: T;
146-
c: T;
147-
a: T;
145+
b: T
146+
c: T
147+
a: T
148148
}
149149
interface U {
150-
b: T;
151-
c: T;
152-
a: T;
150+
b: T
151+
c: T
152+
a: T
153153
}
154154

155155
// Case-sensitive by default.
156156
interface U {
157-
C: T;
158-
b: T;
159-
a: T;
157+
C: T
158+
b: T
159+
a: T
160160
}
161161

162162
// Non-required first order by default.
163163
interface U {
164-
a: T;
165-
b?: T;
166-
c: T;
164+
a: T
165+
b?: T
166+
c: T
167167
}
168168

169169
// Non-natural order by default.
170170
interface U {
171-
10: T;
172-
2: T;
173-
1: T;
171+
10: T
172+
2: T
173+
1: T
174174
}
175175
```
176176

@@ -180,35 +180,35 @@ Examples of **correct** code for the `"desc"` option:
180180
/* eslint typescript-sort-keys/interface: ["error", "desc"] */
181181

182182
interface U {
183-
c: T;
184-
b: T;
185-
a: T;
183+
c: T
184+
b: T
185+
a: T
186186
}
187187
interface U {
188-
c: T;
189-
b: T;
190-
a: T;
188+
c: T
189+
b: T
190+
a: T
191191
}
192192

193193
// Case-sensitive by default.
194194
interface U {
195-
b: T;
196-
a: T;
197-
C: T;
195+
b: T
196+
a: T
197+
C: T
198198
}
199199

200200
// Non-required first order by default.
201201
interface U {
202-
c: T;
203-
b?: T;
204-
a: T;
202+
c: T
203+
b?: T
204+
a: T
205205
}
206206

207207
// Non-natural order by default.
208208
interface U {
209-
2: T;
210-
10: T;
211-
1: T;
209+
2: T
210+
10: T
211+
1: T
212212
}
213213
```
214214

@@ -220,16 +220,16 @@ Examples of **incorrect** code for the `{ caseSensitive: false }` option:
220220
/* eslint typescript-sort-keys/interface: ["error", "asc", { caseSensitive: false }] */
221221

222222
interface U {
223-
a: T;
224-
c: T;
225-
C: T;
226-
b: T;
223+
a: T
224+
c: T
225+
C: T
226+
b: T
227227
}
228228
interface U {
229-
a: T;
230-
C: T;
231-
c: T;
232-
b: T;
229+
a: T
230+
C: T
231+
c: T
232+
b: T
233233
}
234234
```
235235

@@ -239,16 +239,16 @@ Examples of **correct** code for the `{ caseSensitive: false }` option:
239239
/* eslint typescript-sort-keys/interface: ["error", "asc", { caseSensitive: false }] */
240240

241241
interface U {
242-
a: T;
243-
b: T;
244-
c: T;
245-
C: T;
242+
a: T
243+
b: T
244+
c: T
245+
C: T
246246
}
247247
interface U {
248-
a: T;
249-
b: T;
250-
C: T;
251-
c: T;
248+
a: T
249+
b: T
250+
C: T
251+
c: T
252252
}
253253
```
254254

@@ -260,9 +260,9 @@ Examples of **incorrect** code for the `{natural: true}` option:
260260
/* eslint typescript-sort-keys/interface: ["error", "asc", { natural: true }] */
261261

262262
interface U {
263-
1: T;
264-
10: T;
265-
2: T;
263+
1: T
264+
10: T
265+
2: T
266266
}
267267
```
268268

@@ -272,9 +272,9 @@ Examples of **correct** code for the `{natural: true}` option:
272272
/* eslint typescript-sort-keys/interface: ["error", "asc", { natural: true }] */
273273

274274
interface U {
275-
1: T;
276-
2: T;
277-
10: T;
275+
1: T
276+
2: T
277+
10: T
278278
}
279279
```
280280

@@ -286,10 +286,10 @@ Examples of **incorrect** code for the `{ requiredFirst: true }` option:
286286
/* eslint typescript-sort-keys/interface: ["error", "asc", { requiredFirst: true }] */
287287

288288
interface U {
289-
d: T;
290-
c?: T;
291-
b?: T;
292-
a: T;
289+
d: T
290+
c?: T
291+
b?: T
292+
a: T
293293
}
294294
```
295295

@@ -299,10 +299,10 @@ Examples of **correct** code for the `{ requiredFirst: true }` option:
299299
/* eslint typescript-sort-keys/interface: ["error", "asc", { requiredFirst: true }] */
300300

301301
interface U {
302-
a: T;
303-
d: T;
304-
b?: T;
305-
c?: T;
302+
a: T
303+
d: T
304+
b?: T
305+
c?: T
306306
}
307307
```
308308

docs/rules/string-enum.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -71,11 +71,7 @@ enum U {
7171

7272
```json
7373
{
74-
"typescript-sort-keys/string-enum": [
75-
"error",
76-
"asc",
77-
{ "caseSensitive": true }
78-
]
74+
"typescript-sort-keys/string-enum": ["error", "asc", { "caseSensitive": true }]
7975
}
8076
```
8177

jest.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
module.exports = {
22
testRegex: 'tests/.*\\.spec\\.(js|ts)$',
33
moduleDirectories: ['node_modules', 'src'],
4-
};
4+
}

lint-staged.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
module.exports = {
22
'*.{js,ts}': ['eslint --fix --ext js,jsx,tsx,ts --max-warnings 0 --no-ignore'],
33
'*.{md,yml,json}': ['prettier --write'],
4-
};
4+
}

0 commit comments

Comments
 (0)