Skip to content

Commit 9adfa76

Browse files
authored
Add spell-checking for GitLab (#175)
1 parent d0c2858 commit 9adfa76

File tree

5 files changed

+33
-0
lines changed

5 files changed

+33
-0
lines changed

lib/spell-check-rules.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,9 @@ module.exports = [
2424
{
2525
test: /\bgit\s?hub\b/gi,
2626
value: 'GitHub'
27+
},
28+
{
29+
test: /\bgit\s?lab\b/gi,
30+
value: 'GitLab'
2731
}
2832
];

test/fixtures/spell-check/error0.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,3 +45,8 @@ Test spell-check on basic text nodes.
4545
- Git Hub is cool but GitHub is cooler
4646
- github is cool but GitHub is cooler
4747
- git hub is cool but GitHub is cooler
48+
49+
- Gitlab is cool but GitLab is cooler
50+
- Git Lab is cool but GitLab is cooler
51+
- gitlab is cool but GitLab is cooler
52+
- git lab is cool but GitLab is cooler

test/fixtures/spell-check/success0.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ This file should not generate any spell-check errors.
2424

2525
[GitHub](https://foo.com) - GitHub
2626

27+
## GitLab
28+
29+
[GitLab](https://foo.com) - GitLab
30+
2731
These are special-cases which should not cause errors.
2832

2933
- [awesome-cross-platform-nodejs](https://github.com/bcoe/awesome-cross-platform-nodejs)

test/rules/snapshots/spell-check.js.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,4 +164,24 @@ Generated by [AVA](https://ava.li).
164164
message: 'Text "git hub" should be written as "GitHub"',
165165
ruleId: 'awesome-spell-check',
166166
},
167+
{
168+
line: 49,
169+
message: 'Text "Gitlab" should be written as "GitLab"',
170+
ruleId: 'awesome-spell-check',
171+
},
172+
{
173+
line: 50,
174+
message: 'Text "Git Lab" should be written as "GitLab"',
175+
ruleId: 'awesome-spell-check',
176+
},
177+
{
178+
line: 51,
179+
message: 'Text "gitlab" should be written as "GitLab"',
180+
ruleId: 'awesome-spell-check',
181+
},
182+
{
183+
line: 52,
184+
message: 'Text "git lab" should be written as "GitLab"',
185+
ruleId: 'awesome-spell-check',
186+
},
167187
]
107 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)