Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v0.0.7 #6

Merged
merged 6 commits into from
Mar 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Prim/PreferredAlternatives.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,7 @@ swap:
anti-malware: antimalware
anti-spyware: antispyware
anti-virus: antivirus
chat ?bot?: chatbot
open-source: open source
(?:cell ?phone|smart ?phone): phone|mobile phone
World Wide Web: web
6 changes: 6 additions & 0 deletions Prim/Quotes.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
extends: existence
message: "Commas and periods go inside quotation marks."
level: error
nonword: true
tokens:
- '"[^"]+"[.,?]'
1 change: 1 addition & 0 deletions Prim/RequiredAlternatives.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ swap:
check marks?: checkmark|checkmarks
down time: downtime
(?:dualboot|dual boot): dual-boot
e-mail: email
hard copy: hardcopy
hardcoded: hard-coded
HTTPs: HTTPS
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "prim",
"version": "0.0.6",
"version": "0.0.7",
"description": "A Vale-compatible prose style for non-native English speaker",
"scripts": {
"snapshot:update": "vitest rules --update",
Expand Down
10 changes: 10 additions & 0 deletions test/fixtures/PreferredAlternatives/test.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,15 @@ The company requires the use of an anti-spyware on all employee devices.
<!-- anti-virus -->
Make sure your anti-virus is up to date.

<!-- chat bot -->
She used a chat bot to proofread her paper.

<!-- open-source -->
I contributed a new feature to an open-source project.

<!-- phone -->
Have you seen my cell phone?
My smartphone is running low on battery.

<!-- World Wide Web -->
I'd better search the World Wide Web for a new recipe.
6 changes: 6 additions & 0 deletions test/fixtures/Quotes/.vale.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
StylesPath = ../../../

MinAlertLevel = suggestion

[*.md]
Prim.Quotes = YES
4 changes: 4 additions & 0 deletions test/fixtures/Quotes/test.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Quotes

See the section titled "Care and feeding of the emu".
"Look", she exclaimed. "The birds are circling around the reflection of sun."
4 changes: 4 additions & 0 deletions test/fixtures/RequiredAlternatives/test.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ His down time hobby was woodworking.
My laptop has a dualboot setup for Windows and Linux.
He configured his computer for a dual boot system with macOS and Windows.

<!-- e-mail -->
I shot you an e-mail earlier.
E-mail me the meeting agenda when you have a chance.

<!-- hard copy -->
Please provide a hard copy of the report.

Expand Down
6 changes: 5 additions & 1 deletion test/snapshots/PreferredAlternatives.log
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,8 @@ test.md:14:15:Prim.PreferredAlternatives:Prefer using 'antialiasing' over 'anti-
test.md:17:12:Prim.PreferredAlternatives:Prefer using 'antimalware' over 'anti-malware'.
test.md:20:36:Prim.PreferredAlternatives:Prefer using 'antispyware' over 'anti-spyware'.
test.md:23:16:Prim.PreferredAlternatives:Prefer using 'antivirus' over 'anti-virus'.
test.md:26:35:Prim.PreferredAlternatives:Prefer using 'open source' over 'open-source'.
test.md:26:12:Prim.PreferredAlternatives:Prefer using 'chatbot' over 'chat bot'.
test.md:29:35:Prim.PreferredAlternatives:Prefer using 'open source' over 'open-source'.
test.md:32:18:Prim.PreferredAlternatives:Prefer using 'phone' or 'mobile phone' over 'cell phone'.
test.md:33:4:Prim.PreferredAlternatives:Prefer using 'phone' or 'mobile phone' over 'smartphone'.
test.md:36:23:Prim.PreferredAlternatives:Prefer using 'Web' over 'World Wide Web'.
2 changes: 2 additions & 0 deletions test/snapshots/Quotes.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
test.md:3:24:Prim.Quotes:Commas and periods go inside quotation marks.
test.md:4:1:Prim.Quotes:Commas and periods go inside quotation marks.
40 changes: 21 additions & 19 deletions test/snapshots/RequiredAlternatives.log
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,24 @@ test.md:28:12:Prim.RequiredAlternatives:Use 'checkmark' or 'checkmarks' instead
test.md:31:5:Prim.RequiredAlternatives:Use 'downtime' instead of 'down time'.
test.md:34:17:Prim.RequiredAlternatives:Use 'dual-boot' instead of 'dualboot'.
test.md:35:34:Prim.RequiredAlternatives:Use 'dual-boot' instead of 'dual boot'.
test.md:38:18:Prim.RequiredAlternatives:Use 'hardcopy' instead of 'hard copy'.
test.md:41:14:Prim.RequiredAlternatives:Use 'hard-coded' instead of 'hardcoded'.
test.md:44:12:Prim.RequiredAlternatives:Use 'HTTPS' instead of 'HTTPs'.
test.md:47:25:Prim.RequiredAlternatives:Use 'in-depth' instead of 'in depth'.
test.md:50:26:Prim.RequiredAlternatives:Use 'on-demand' instead of 'on demand'.
test.md:53:11:Prim.RequiredAlternatives:Use 'path' or 'paths' instead of 'file path'.
test.md:54:25:Prim.RequiredAlternatives:Use 'path' or 'paths' instead of 'path names'.
test.md:57:9:Prim.RequiredAlternatives:Use 'scrollbar' or 'scrollbars' instead of 'scroll bar'.
test.md:58:24:Prim.RequiredAlternatives:Use 'scrollbar' or 'scrollbars' instead of 'scroll-bars'.
test.md:61:19:Prim.RequiredAlternatives:Use 'sync' instead of 'synch'.
test.md:64:5:Prim.RequiredAlternatives:Use 'test case' or 'test cases' instead of 'testcase'.
test.md:65:76:Prim.RequiredAlternatives:Use 'test case' or 'test cases' instead of 'testcases'.
test.md:68:17:Prim.RequiredAlternatives:Use 'URL' instead of 'url'.
test.md:69:5:Prim.RequiredAlternatives:Use 'URL of' instead of 'URL for'.
test.md:70:10:Prim.RequiredAlternatives:Use 'a URL' instead of 'an URL'.
test.md:73:28:Prim.RequiredAlternatives:Use 'use case' or 'use cases' instead of 'usecase'.
test.md:74:17:Prim.RequiredAlternatives:Use 'use case' or 'use cases' instead of 'usecases'.
test.md:77:22:Prim.RequiredAlternatives:Use 'Wi-Fi' instead of 'wifi'.
test.md:78:32:Prim.RequiredAlternatives:Use 'Wi-Fi' instead of 'WiFi'.
test.md:38:15:Prim.RequiredAlternatives:Use 'email' instead of 'e-mail'.
test.md:39:1:Prim.RequiredAlternatives:Use 'Email' instead of 'E-mail'.
test.md:42:18:Prim.RequiredAlternatives:Use 'hardcopy' instead of 'hard copy'.
test.md:45:14:Prim.RequiredAlternatives:Use 'hard-coded' instead of 'hardcoded'.
test.md:48:12:Prim.RequiredAlternatives:Use 'HTTPS' instead of 'HTTPs'.
test.md:51:25:Prim.RequiredAlternatives:Use 'in-depth' instead of 'in depth'.
test.md:54:26:Prim.RequiredAlternatives:Use 'on-demand' instead of 'on demand'.
test.md:57:11:Prim.RequiredAlternatives:Use 'path' or 'paths' instead of 'file path'.
test.md:58:25:Prim.RequiredAlternatives:Use 'path' or 'paths' instead of 'path names'.
test.md:61:9:Prim.RequiredAlternatives:Use 'scrollbar' or 'scrollbars' instead of 'scroll bar'.
test.md:62:24:Prim.RequiredAlternatives:Use 'scrollbar' or 'scrollbars' instead of 'scroll-bars'.
test.md:65:19:Prim.RequiredAlternatives:Use 'sync' instead of 'synch'.
test.md:68:5:Prim.RequiredAlternatives:Use 'test case' or 'test cases' instead of 'testcase'.
test.md:69:76:Prim.RequiredAlternatives:Use 'test case' or 'test cases' instead of 'testcases'.
test.md:72:17:Prim.RequiredAlternatives:Use 'URL' instead of 'url'.
test.md:73:5:Prim.RequiredAlternatives:Use 'URL of' instead of 'URL for'.
test.md:74:10:Prim.RequiredAlternatives:Use 'a URL' instead of 'an URL'.
test.md:77:28:Prim.RequiredAlternatives:Use 'use case' or 'use cases' instead of 'usecase'.
test.md:78:17:Prim.RequiredAlternatives:Use 'use case' or 'use cases' instead of 'usecases'.
test.md:81:22:Prim.RequiredAlternatives:Use 'Wi-Fi' instead of 'wifi'.
test.md:82:32:Prim.RequiredAlternatives:Use 'Wi-Fi' instead of 'WiFi'.
Loading