Skip to content

Offline, privacy-first grammar checker. Fast, open-source, Rust-powered

feat: legit → legitimate (#4271)

Andrew Dunbarafe92f7358ac
diff --git a/harper-core/default_config.json b/harper-core/default_config.json
index 63059efe5..12f06afd2 100644
--- a/harper-core/default_config.json
+++ b/harper-core/default_config.json
@@ -3011,6 +3011,13 @@
"label": "Expand Forward"
}
},
+ {
+ "Bool": {
+ "name": "ExpandLegitimate",
+ "state": true,
+ "label": "Expand Legitimate"
+ }
+ },
{
"Bool": {
"name": "ExpandMinimum",
diff --git a/harper-core/src/linting/weir_rules/ExpandLegitimate.weir b/harper-core/src/linting/weir_rules/ExpandLegitimate.weir
new file mode 100644
index 000000000..dbfa27e0a
--- /dev/null
+++ b/harper-core/src/linting/weir_rules/ExpandLegitimate.weir
@@ -0,0 +1,9 @@
+expr main (legit)
+
+let message "Use `legitimate` instead of `legit`"
+let description "Expands the abbreviation `legit` to the full word `legitimate` for clarity."
+let kind "Style"
+let becomes "legitimate"
+
+test "A library for generating safe, legit and random URL-compat IDs." "A library for generating safe, legitimate and random URL-compat IDs."
+test "Yes it is legit. We use it to protect stackoverflow.com user cookies from third parties." "Yes it is legitimate. We use it to protect stackoverflow.com user cookies from third parties."