Skip to content

Commit

Permalink
fix: Allow YAML file names (#77)
Browse files Browse the repository at this point in the history
  • Loading branch information
massongit authored Jun 27, 2024
1 parent 07b9a3c commit 51aa451
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion terms.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@
"SSH",
["wi[- ]?fi", "Wi-Fi"],
"XML",
"YAML",
["(?<![\\.-])yaml\\b", "YAML"],
"ZIP",

// Names
Expand Down
13 changes: 13 additions & 0 deletions test.js
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,9 @@ tester.run('textlint-rule-terminology', rule, {
// Should ignore `http` in the middle of a word
text: 'We should all use XMLHttpRequest everywhere',
},
{
text: 'foo.yaml',
},
],
invalid: [
{
Expand Down Expand Up @@ -378,6 +381,16 @@ tester.run('textlint-rule-terminology', rule, {
},
],
},
{
// yaml -> YAML
text: 'yaml files',
output: 'YAML files',
errors: [
{
message: 'Incorrect usage of the term: “yaml”, use “YAML” instead',
},
],
},
],
});

Expand Down

0 comments on commit 51aa451

Please sign in to comment.