Skip to content

Commit d1287d6

Browse files
committed
feat(rule): relax contraction rule
1 parent 9f54359 commit d1287d6

File tree

3 files changed

+49
-96
lines changed

3 files changed

+49
-96
lines changed

Prim/Contractions.yml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,31 +12,25 @@ swap:
1212
authZ: authorization
1313
g11n: globalization
1414
"he'd": he had|he would
15-
"he's": he is|he has
1615
"he'll": he will|he shall
1716
"here'd": here had|here would
18-
"here's": here is|here has
1917
"how'd": how did|how would
2018
"I'd": I had|I would
2119
i18n: internationalization
2220
"it'd": it had|it would
23-
"it's": it is|it has
2421
"it'll": it will|it shall
2522
k8s: Kubernetes
2623
l10n: localization
2724
p13n: personalization
2825
regex: regular expression
2926
"she'd": she had|she would
30-
"she's": she is|she has
3127
"she'll": she will|she shall
3228
"somebody'd": somebody had|somebody would
3329
"someone'd": someone had|someone would
3430
"that'd": that had|that would
35-
"that's": that is|that has
3631
"they'd": they had|they would
3732
"they'll": they will|they shall
3833
"there'd": there would|there had
39-
"there's": there is|there has
4034
"we'd": we would|we had
4135
"what'd": what did
4236
"what'll": what will
@@ -48,7 +42,6 @@ swap:
4842
"where'll": where will
4943
"which'd": which would|which had
5044
"who'd": who had|who would
51-
"who's": who is|who has
5245
"why'd": why did|why would
5346
"why's": why is|why has
5447
'w/(?!o)\s': with

test/fixtures/Contractions/test.md

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -23,20 +23,13 @@ Effective g11n strategies can help companies expand their global reach.
2323
He'd already finished his homework before dinner.
2424
He'd like to go to the movies tonight.
2525

26-
<!-- he's -->
27-
He's going to the store to buy some groceries.
28-
He's always been a reliable friend who can be counted on.
29-
3026
<!-- he'll -->
3127
He'll be here soon, so please wait for him patiently.
3228

3329
<!-- here'd -->
3430
Here'd been where we parked the car.
3531
Here'd we go again with another delay.
3632

37-
<!-- here's -->
38-
Here's your coat; you left it in the car.
39-
4033
<!-- how'd -->
4134
How'd you get here so fast?
4235
How'd you feel about going on a trip?
@@ -51,10 +44,6 @@ The i18n framework we use simplifies the process of translating our website.
5144
It'd been a while since I visited the school.
5245
It'd be great if you could help me with this project.
5346

54-
<!-- it's -->
55-
It's been a long time since we last saw each other.
56-
It's great to see you again!
57-
5847
<!-- it'll -->
5948
It'll take about an hour to drive to the airport.
6049

@@ -74,10 +63,6 @@ I applied a regex to parse and extract data from a large log file.
7463
She'd already left by the time I arrived.
7564
She'd love to join us for dinner tonight.
7665

77-
<!-- she's -->
78-
She's coming over for dinner tonight.
79-
She's been working at the company for ten years.
80-
8166
<!-- she'll -->
8267
She'll probably choose the red dress for the party.
8368

@@ -93,18 +78,10 @@ Someone'd been looking for you.
9378
I remember that'd been a difficult decision for him.
9479
That'd have been a disastrous mistake.
9580

96-
<!-- that's -->
97-
That's been a long day.
98-
I think that's the best option.
99-
10081
<!-- there'd -->
10182
There'd always been a strong sense of community in that neighborhood.
10283
There'd be no problem if you arrive a bit earlier.
10384

104-
<!-- there's -->
105-
There's a problem with the printer.
106-
There's been a conflict in this region for ages.
107-
10885
<!-- they'd -->
10986
I heard they'd finished the project ahead of schedule.
11087
They'd love to join us for dinner tonight.
@@ -148,10 +125,6 @@ Which'd you rather have, coffee or tea?
148125
<!-- who'd -->
149126
Who'd you think will win the election?
150127

151-
<!-- who's -->
152-
Who's been using my computer without permission?
153-
Who's in charge of organizing the event?
154-
155128
<!-- why'd -->
156129
Why'd he say that to you?
157130

test/snapshots/Contractions.log

Lines changed: 49 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -7,65 +7,52 @@ test.md:17:12:Prim.Contractions:Avoid contractions. Use 'authorization' instead
77
test.md:20:11:Prim.Contractions:Avoid contractions. Use 'globalization' instead of 'g11n'.
88
test.md:23:1:Prim.Contractions:Avoid contractions. Use 'he had' or 'he would' instead of 'He'd'.
99
test.md:24:1:Prim.Contractions:Avoid contractions. Use 'he had' or 'he would' instead of 'He'd'.
10-
test.md:27:1:Prim.Contractions:Avoid contractions. Use 'he is' or 'he has' instead of 'He's'.
11-
test.md:28:1:Prim.Contractions:Avoid contractions. Use 'he is' or 'he has' instead of 'He's'.
12-
test.md:31:1:Prim.Contractions:Avoid contractions. Use 'he will' or 'he shall' instead of 'He'll'.
13-
test.md:34:1:Prim.Contractions:Avoid contractions. Use 'here had' or 'here would' instead of 'Here'd'.
14-
test.md:35:1:Prim.Contractions:Avoid contractions. Use 'here had' or 'here would' instead of 'Here'd'.
15-
test.md:38:1:Prim.Contractions:Avoid contractions. Use 'here is' or 'here has' instead of 'Here's'.
16-
test.md:41:1:Prim.Contractions:Avoid contractions. Use 'how did' or 'how would' instead of 'How'd'.
17-
test.md:42:1:Prim.Contractions:Avoid contractions. Use 'how did' or 'how would' instead of 'How'd'.
18-
test.md:45:1:Prim.Contractions:Avoid contractions. Use 'I had' or 'I would' instead of 'I'd'.
19-
test.md:45:36:Prim.Contractions:Avoid contractions. Use 'I had' or 'I would' instead of 'I'd'.
20-
test.md:48:5:Prim.Contractions:Avoid contractions. Use 'internationalization' instead of 'i18n'.
21-
test.md:51:1:Prim.Contractions:Avoid contractions. Use 'it had' or 'it would' instead of 'It'd'.
22-
test.md:52:1:Prim.Contractions:Avoid contractions. Use 'it had' or 'it would' instead of 'It'd'.
23-
test.md:55:1:Prim.Contractions:Avoid contractions. Use 'it is' or 'it has' instead of 'It's'.
24-
test.md:56:1:Prim.Contractions:Avoid contractions. Use 'it is' or 'it has' instead of 'It's'.
25-
test.md:59:1:Prim.Contractions:Avoid contractions. Use 'it will' or 'it shall' instead of 'It'll'.
26-
test.md:62:8:Prim.Contractions:Avoid contractions. Use 'Kubernetes' instead of 'k8s'.
27-
test.md:65:5:Prim.Contractions:Avoid contractions. Use 'localization' instead of 'l10n'.
28-
test.md:68:19:Prim.Contractions:Avoid contractions. Use 'personalization' instead of 'p13n'.
29-
test.md:71:13:Prim.Contractions:Avoid contractions. Use 'regular expression' instead of 'regex'.
30-
test.md:74:1:Prim.Contractions:Avoid contractions. Use 'she had' or 'she would' instead of 'She'd'.
31-
test.md:75:1:Prim.Contractions:Avoid contractions. Use 'she had' or 'she would' instead of 'She'd'.
32-
test.md:78:1:Prim.Contractions:Avoid contractions. Use 'she is' or 'she has' instead of 'She's'.
33-
test.md:79:1:Prim.Contractions:Avoid contractions. Use 'she is' or 'she has' instead of 'She's'.
34-
test.md:82:1:Prim.Contractions:Avoid contractions. Use 'she will' or 'she shall' instead of 'She'll'.
35-
test.md:85:1:Prim.Contractions:Avoid contractions. Use 'somebody had' or 'somebody would' instead of 'Somebody'd'.
36-
test.md:86:1:Prim.Contractions:Avoid contractions. Use 'somebody had' or 'somebody would' instead of 'Somebody'd'.
37-
test.md:89:1:Prim.Contractions:Avoid contractions. Use 'someone had' or 'someone would' instead of 'Someone'd'.
38-
test.md:90:1:Prim.Contractions:Avoid contractions. Use 'someone had' or 'someone would' instead of 'Someone'd'.
39-
test.md:93:12:Prim.Contractions:Avoid contractions. Use 'that had' or 'that would' instead of 'that'd'.
40-
test.md:94:1:Prim.Contractions:Avoid contractions. Use 'that had' or 'that would' instead of 'That'd'.
41-
test.md:97:1:Prim.Contractions:Avoid contractions. Use 'that is' or 'that has' instead of 'That's'.
42-
test.md:98:9:Prim.Contractions:Avoid contractions. Use 'that is' or 'that has' instead of 'that's'.
43-
test.md:101:1:Prim.Contractions:Avoid contractions. Use 'there would' or 'there had' instead of 'There'd'.
44-
test.md:102:1:Prim.Contractions:Avoid contractions. Use 'there would' or 'there had' instead of 'There'd'.
45-
test.md:105:1:Prim.Contractions:Avoid contractions. Use 'there is' or 'there has' instead of 'There's'.
46-
test.md:106:1:Prim.Contractions:Avoid contractions. Use 'there is' or 'there has' instead of 'There's'.
47-
test.md:109:9:Prim.Contractions:Avoid contractions. Use 'they had' or 'they would' instead of 'they'd'.
48-
test.md:110:1:Prim.Contractions:Avoid contractions. Use 'they had' or 'they would' instead of 'They'd'.
49-
test.md:113:34:Prim.Contractions:Avoid contractions. Use 'they will' or 'they shall' instead of 'they'll'.
50-
test.md:116:1:Prim.Contractions:Avoid contractions. Use 'we would' or 'we had' instead of 'We'd'.
51-
test.md:117:1:Prim.Contractions:Avoid contractions. Use 'we would' or 'we had' instead of 'We'd'.
52-
test.md:120:1:Prim.Contractions:Avoid contractions. Use 'what did' instead of 'What'd'.
53-
test.md:123:1:Prim.Contractions:Avoid contractions. Use 'what will' instead of 'What'll'.
54-
test.md:126:1:Prim.Contractions:Avoid contractions. Use 'when did' instead of 'When'd'.
55-
test.md:129:1:Prim.Contractions:Avoid contractions. Use 'when is' or 'when has' instead of 'When's'.
56-
test.md:130:1:Prim.Contractions:Avoid contractions. Use 'when is' or 'when has' instead of 'When's'.
57-
test.md:133:1:Prim.Contractions:Avoid contractions. Use 'when will' instead of 'When'll'.
58-
test.md:136:1:Prim.Contractions:Avoid contractions. Use 'where did' instead of 'Where'd'.
59-
test.md:139:1:Prim.Contractions:Avoid contractions. Use 'where is' or 'where has' instead of 'Where's'.
60-
test.md:140:1:Prim.Contractions:Avoid contractions. Use 'where is' or 'where has' instead of 'Where's'.
61-
test.md:143:1:Prim.Contractions:Avoid contractions. Use 'where will' instead of 'Where'll'.
62-
test.md:146:1:Prim.Contractions:Avoid contractions. Use 'which would' or 'which had' instead of 'Which'd'.
63-
test.md:149:1:Prim.Contractions:Avoid contractions. Use 'who had' or 'who would' instead of 'Who'd'.
64-
test.md:152:1:Prim.Contractions:Avoid contractions. Use 'who is' or 'who has' instead of 'Who's'.
65-
test.md:153:1:Prim.Contractions:Avoid contractions. Use 'who is' or 'who has' instead of 'Who's'.
66-
test.md:156:1:Prim.Contractions:Avoid contractions. Use 'why did' or 'why would' instead of 'Why'd'.
67-
test.md:159:1:Prim.Contractions:Avoid contractions. Use 'why is' or 'why has' instead of 'Why's'.
68-
test.md:162:12:Prim.Contractions:Avoid contractions. Use 'with' instead of 'w/ '.
69-
test.md:165:26:Prim.Contractions:Avoid contractions. Use 'without' instead of 'w/o'.
70-
test.md:168:1:Prim.Contractions:Avoid contractions. Use 'you had' or 'you would' instead of 'You'd'.
71-
test.md:169:4:Prim.Contractions:Avoid contractions. Use 'you had' or 'you would' instead of 'you'd'.
10+
test.md:27:1:Prim.Contractions:Avoid contractions. Use 'he will' or 'he shall' instead of 'He'll'.
11+
test.md:30:1:Prim.Contractions:Avoid contractions. Use 'here had' or 'here would' instead of 'Here'd'.
12+
test.md:31:1:Prim.Contractions:Avoid contractions. Use 'here had' or 'here would' instead of 'Here'd'.
13+
test.md:34:1:Prim.Contractions:Avoid contractions. Use 'how did' or 'how would' instead of 'How'd'.
14+
test.md:35:1:Prim.Contractions:Avoid contractions. Use 'how did' or 'how would' instead of 'How'd'.
15+
test.md:38:1:Prim.Contractions:Avoid contractions. Use 'I had' or 'I would' instead of 'I'd'.
16+
test.md:38:36:Prim.Contractions:Avoid contractions. Use 'I had' or 'I would' instead of 'I'd'.
17+
test.md:41:5:Prim.Contractions:Avoid contractions. Use 'internationalization' instead of 'i18n'.
18+
test.md:44:1:Prim.Contractions:Avoid contractions. Use 'it had' or 'it would' instead of 'It'd'.
19+
test.md:45:1:Prim.Contractions:Avoid contractions. Use 'it had' or 'it would' instead of 'It'd'.
20+
test.md:48:1:Prim.Contractions:Avoid contractions. Use 'it will' or 'it shall' instead of 'It'll'.
21+
test.md:51:8:Prim.Contractions:Avoid contractions. Use 'Kubernetes' instead of 'k8s'.
22+
test.md:54:5:Prim.Contractions:Avoid contractions. Use 'localization' instead of 'l10n'.
23+
test.md:57:19:Prim.Contractions:Avoid contractions. Use 'personalization' instead of 'p13n'.
24+
test.md:60:13:Prim.Contractions:Avoid contractions. Use 'regular expression' instead of 'regex'.
25+
test.md:63:1:Prim.Contractions:Avoid contractions. Use 'she had' or 'she would' instead of 'She'd'.
26+
test.md:64:1:Prim.Contractions:Avoid contractions. Use 'she had' or 'she would' instead of 'She'd'.
27+
test.md:67:1:Prim.Contractions:Avoid contractions. Use 'she will' or 'she shall' instead of 'She'll'.
28+
test.md:70:1:Prim.Contractions:Avoid contractions. Use 'somebody had' or 'somebody would' instead of 'Somebody'd'.
29+
test.md:71:1:Prim.Contractions:Avoid contractions. Use 'somebody had' or 'somebody would' instead of 'Somebody'd'.
30+
test.md:74:1:Prim.Contractions:Avoid contractions. Use 'someone had' or 'someone would' instead of 'Someone'd'.
31+
test.md:75:1:Prim.Contractions:Avoid contractions. Use 'someone had' or 'someone would' instead of 'Someone'd'.
32+
test.md:78:12:Prim.Contractions:Avoid contractions. Use 'that had' or 'that would' instead of 'that'd'.
33+
test.md:79:1:Prim.Contractions:Avoid contractions. Use 'that had' or 'that would' instead of 'That'd'.
34+
test.md:82:1:Prim.Contractions:Avoid contractions. Use 'there would' or 'there had' instead of 'There'd'.
35+
test.md:83:1:Prim.Contractions:Avoid contractions. Use 'there would' or 'there had' instead of 'There'd'.
36+
test.md:86:9:Prim.Contractions:Avoid contractions. Use 'they had' or 'they would' instead of 'they'd'.
37+
test.md:87:1:Prim.Contractions:Avoid contractions. Use 'they had' or 'they would' instead of 'They'd'.
38+
test.md:90:34:Prim.Contractions:Avoid contractions. Use 'they will' or 'they shall' instead of 'they'll'.
39+
test.md:93:1:Prim.Contractions:Avoid contractions. Use 'we would' or 'we had' instead of 'We'd'.
40+
test.md:94:1:Prim.Contractions:Avoid contractions. Use 'we would' or 'we had' instead of 'We'd'.
41+
test.md:97:1:Prim.Contractions:Avoid contractions. Use 'what did' instead of 'What'd'.
42+
test.md:100:1:Prim.Contractions:Avoid contractions. Use 'what will' instead of 'What'll'.
43+
test.md:103:1:Prim.Contractions:Avoid contractions. Use 'when did' instead of 'When'd'.
44+
test.md:106:1:Prim.Contractions:Avoid contractions. Use 'when is' or 'when has' instead of 'When's'.
45+
test.md:107:1:Prim.Contractions:Avoid contractions. Use 'when is' or 'when has' instead of 'When's'.
46+
test.md:110:1:Prim.Contractions:Avoid contractions. Use 'when will' instead of 'When'll'.
47+
test.md:113:1:Prim.Contractions:Avoid contractions. Use 'where did' instead of 'Where'd'.
48+
test.md:116:1:Prim.Contractions:Avoid contractions. Use 'where is' or 'where has' instead of 'Where's'.
49+
test.md:117:1:Prim.Contractions:Avoid contractions. Use 'where is' or 'where has' instead of 'Where's'.
50+
test.md:120:1:Prim.Contractions:Avoid contractions. Use 'where will' instead of 'Where'll'.
51+
test.md:123:1:Prim.Contractions:Avoid contractions. Use 'which would' or 'which had' instead of 'Which'd'.
52+
test.md:126:1:Prim.Contractions:Avoid contractions. Use 'who had' or 'who would' instead of 'Who'd'.
53+
test.md:129:1:Prim.Contractions:Avoid contractions. Use 'why did' or 'why would' instead of 'Why'd'.
54+
test.md:132:1:Prim.Contractions:Avoid contractions. Use 'why is' or 'why has' instead of 'Why's'.
55+
test.md:135:12:Prim.Contractions:Avoid contractions. Use 'with' instead of 'w/ '.
56+
test.md:138:26:Prim.Contractions:Avoid contractions. Use 'without' instead of 'w/o'.
57+
test.md:141:1:Prim.Contractions:Avoid contractions. Use 'you had' or 'you would' instead of 'You'd'.
58+
test.md:142:4:Prim.Contractions:Avoid contractions. Use 'you had' or 'you would' instead of 'you'd'.

0 commit comments

Comments
 (0)