Skip to content

Commit 310ecf1

Browse files
Merge pull request #2 from dylan-k/master
Transfer from Styles Repo
2 parents 978b00c + 9cbaf99 commit 310ecf1

12 files changed

+221
-0
lines changed

18F/Abbreviations.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
extends: substitution
3+
message: Use '%s' instead of '%s'
4+
ignorecase: false
5+
level: error
6+
nonword: true
7+
swap:
8+
'\beg\b': e.g.,
9+
'\bie\b': i.e.,
10+
'e\.g\.(?:[^,]|$)': e.g.,
11+
'i\.e\.(?:[^,]|$)': i.e.,
12+
'(?i)\d{1,2} ?[ap]m': a.m. or p.m.
13+
'D\.C\.': DC
14+
'\bUSA?\b': U.S.

18F/Ages.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
extends: existence
3+
message: 'Avoid hyphens in ages unless it clarifies the text.'
4+
level: warning
5+
tokens:
6+
- '\d{1,3}-year-old'

18F/Brands.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
extends: substitution
3+
message: Use '%s' instead of '%s.'
4+
description: "Avoid using a trademark unless you’re referring to a specific product."
5+
level: warning
6+
ignorecase: true
7+
swap:
8+
Band-Aid: bandage
9+
Bubble Wrap: packaging bubbles
10+
Chapstick: lip balm
11+
Crayola: crayons
12+
Dumpster: waste container, trash container
13+
Hi-Liter: highlighting marker
14+
iPod: MP3 player
15+
Kleenex: tissue
16+
Plexiglas: plastic glass
17+
Post-it note: adhesive note
18+
Q-Tips: cotton swabs
19+
Scotch tape: transparent tape
20+
Styrofoam: plastic foam
21+
Taser: stun gun
22+
Xerox: photocopy

18F/Clarity.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
---
2+
extends: substitution
3+
message: '%s'
4+
level: warning
5+
ignorecase: true
6+
swap:
7+
(?:commit|pledge): "Be more specific — we’re either doing something or we’re not."
8+
advancing: "Avoid using 'advancing.'"
9+
agenda: "Avoid using 'agenda' (unless you’re talking about a meeting)."
10+
deploy: "Avoid using 'deploy' (unless you’re talking about the military or software)."
11+
disincentivize: "Avoid using 'disincentivize.'"
12+
empower: "Avoid using 'empower.'"
13+
focusing: "Avoid using 'focusing.'"
14+
foster: "Avoid using 'foster' (unless it’s children)."
15+
impact(?:ful)?: "Avoid using impact or impactful."
16+
incentivize: "Avoid using 'incentivize.'"
17+
innovative: "Use words that describe the positive outcome of the innovation."
18+
key: "Avoid using 'key' (unless it unlocks something)."
19+
leverage: "Avoid using 'leverage' (unless you're using it in the financial sense)."
20+
progress: "What are you actually doing?"
21+
promote: "Avoid using 'promote' (unless you’re talking about an ad campaign)."
22+
streamline: "Avoid using 'streamline.'"
23+
strengthening: "Avoid using 'strengthening' (unless you’re referring to bridges or other structures)."
24+
tackling: "Avoid using 'tackling' (unless you’re referring to football or another contact sport)."
25+
touchpoint: "Mention specific system components."
26+
transforming: "What are you actually doing to change it?"

18F/Contractions.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
---
2+
extends: substitution
3+
message: Use '%s' instead of '%s.'
4+
level: error
5+
ignorecase: true
6+
swap:
7+
it is: it's
8+
it will: it'll
9+
we are: we're
10+
we will: we'll
11+
we have: we've
12+
they are: they're
13+
they will: they'll
14+
that is: that's
15+
that will: that'll
16+
who is: who's
17+
who will: who'll
18+
what is: what's
19+
what will: what'll
20+
where is: where's
21+
where will: where'll
22+
when is: when's
23+
when will: when'll
24+
why is: why's
25+
why will: why'll
26+
how is: how's
27+
how will: how'll
28+
is not: isn't
29+
are not: aren't
30+
was not: wasn't
31+
were not: weren't
32+
have not: haven't
33+
has not: hasn't
34+
will not: won't
35+
do not: don't
36+
does not: doesn't
37+
did not: didn't
38+
cannot: can't
39+
could not: couldn't
40+
should not: shouldn't

18F/OxfordComma.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
extends: existence
3+
message: 'Use the Oxford comma in a list of three or more items.'
4+
link: 'https://contribute.jquery.org/style-guide/prose/#grammar'
5+
scope: sentence
6+
level: warning
7+
tokens:
8+
- '(?:[^,]+,){1,}\s\w+\sand'

18F/Quotes.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
extends: existence
3+
message: 'Punctuation should be inside the quotes.'
4+
level: error
5+
nonword: true
6+
tokens:
7+
- '"[^"]+"[.,?]'

18F/Spacing.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
extends: existence
3+
message: "'%s' should have one space."
4+
level: error
5+
tokens:
6+
- '[.?!] {2,}[A-Z]'

18F/Terms.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
extends: substitution
3+
message: Prefer %s over '%s.'
4+
level: warning
5+
ignorecase: true
6+
swap:
7+
user testing: "'usability testing'"
8+
back-end: "'back end'"
9+
open-source: "'open source'"
10+
dropdown: "'drop-down' or 'drop down'"
11+
citizen: "'people' or 'The public'"
12+
combating: "'working against' or 'fighting'"
13+
dialogue: "'speaking(ing)'"
14+
execute: "'run' or 'do'"
15+
(?:illegals|illegal aliens): "'undocumented immigrants'"
16+
countering: "'answering' or 'responding'"
17+
simple: "'straightforward', 'uncomplicated', or 'clear'"

18F/Titles.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
extends: capitalization
3+
message: "'%s' should be in sentence case"
4+
level: warning
5+
scope: heading
6+
match: $sentence

18F/UnexpandedAcronyms.yml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
---
2+
extends: conditional
3+
message: "'%s' has no definition"
4+
level: warning
5+
first: \b([A-Z]{3,5})\b
6+
second: (?:\b[A-Z][a-z]+[']? )+\(([A-Z]{3,5})\)
7+
exceptions:
8+
- ABC
9+
- ADD
10+
- ADHD
11+
- AIDS
12+
- APA
13+
- API
14+
- CBS
15+
- CIA
16+
- CSI
17+
- CSS
18+
- CST
19+
- ESPN
20+
- EST
21+
- FAQ
22+
- FBI
23+
- FIXME
24+
- GOV
25+
- GNU
26+
- HIV
27+
- HR
28+
- HTML
29+
- HTTP
30+
- HTTPS
31+
- JSON
32+
- LAN
33+
- MIT
34+
- MLA
35+
- MLB
36+
- MTV
37+
- NAACP
38+
- NASA
39+
- NATO
40+
- NBA
41+
- NBC
42+
- NCAA
43+
- NCAAB
44+
- NCAAF
45+
- NFL
46+
- NHL
47+
- NOTE
48+
- PDF
49+
- PGA
50+
- PPV
51+
- PST
52+
- SGML
53+
- SSN
54+
- TNT
55+
- TODO
56+
- URL
57+
- USA
58+
- USSR
59+
- XML
60+
- XXX

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,11 @@
11
# 18F
22
A Vale linter style that replicates the 18F style guide
3+
4+
Based on [18F](https://pages.18f.gov/content-guide/).
5+
6+
> This project is in the worldwide [public domain](LICENSE.md).
7+
8+
> As a work of the United States government, this project is in the public domain within the United States.
9+
10+
> Additionally, we waive copyright and related rights in the work worldwide through the CC0 1.0 Universal public domain dedication.
11+

0 commit comments

Comments
 (0)