Skip to content

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

fix: merge fallout

Elijah Potter089a794af8fb
diff --git a/biome.json b/biome.json
index 7841ce880..1b4043096 100644
--- a/biome.json
+++ b/biome.json
@@ -38,8 +38,8 @@
"rules": {
"recommended": true,
"suspicious": {
- "noExplicitAny": "warn",
- "noArrayIndexKey": "warn",
+ "noExplicitAny": "off",
+ "noArrayIndexKey": "off",
"noLabelVar": "warn"
},
"a11y": {
@@ -47,10 +47,10 @@
"useGenericFontNames": "warn"
},
"correctness": {
- "useExhaustiveDependencies": "warn"
+ "useExhaustiveDependencies": "off"
},
"style": {
- "noParameterAssign": "warn",
+ "noParameterAssign": "off",
"noArguments": "off",
"noNonNullAssertion": "off",
"noUselessElse": "off",
diff --git a/harper-core/affixes.json b/harper-core/affixes.json
index 39009acca..5ef61d7d6 100644
--- a/harper-core/affixes.json
+++ b/harper-core/affixes.json
@@ -1,788 +1,788 @@
{
- "affixes": {
- "K": {
- "#": "'pro-' prefix",
- "suffix": false,
- "cross_product": true,
- "replacements": [
- {
- "remove": "",
- "add": "pro",
- "condition": "."
- }
- ],
- "adds_metadata": {},
- "gifts_metadata": {}
- },
- "L": {
- "#": "'-ment' suffix",
- "suffix": true,
- "cross_product": true,
- "replacements": [
- {
- "remove": "",
- "add": "ment",
- "condition": "."
- }
- ],
- "adds_metadata": {},
- "gifts_metadata": {}
- },
- "E": {
- "#": "'dis-' prefix",
- "suffix": false,
- "cross_product": true,
- "replacements": [
- {
- "remove": "",
- "add": "dis",
- "condition": "."
- }
- ],
- "adds_metadata": {},
- "gifts_metadata": {}
- },
- "Y": {
- "#": "'-ly' suffix",
- "suffix": true,
- "cross_product": true,
- "replacements": [
- {
- "remove": "",
- "add": "ly",
- "condition": "."
- }
- ],
- "adds_metadata": {},
- "gifts_metadata": {}
- },
- "U": {
- "#": "'un-' prefix",
- "suffix": false,
- "cross_product": true,
- "replacements": [
- {
- "remove": "",
- "add": "un",
- "condition": "."
- }
- ],
- "adds_metadata": {},
- "gifts_metadata": {}
- },
- "H": {
- "#": "'-ieth' suffix",
- "suffix": true,
- "cross_product": false,
- "replacements": [
- {
- "remove": "y",
- "add": "ieth",
- "condition": "y"
- },
- {
- "remove": "",
- "add": "th",
- "condition": "[^y]"
- }
- ],
- "adds_metadata": {},
- "gifts_metadata": {}
- },
- "T": {
- "#": "'-(i)est' suffix",
- "suffix": true,
- "cross_product": false,
- "replacements": [
- {
- "remove": "",
- "add": "st",
- "condition": "e"
- },
- {
- "remove": "y",
- "add": "iest",
- "condition": "[^aeiou]y"
- },
- {
- "remove": "",
- "add": "est",
- "condition": "[aeiou]y"
- },
- {
- "remove": "",
- "add": "est",
- "condition": "[^ey]"
- }
- ],
- "adds_metadata": {},
- "gifts_metadata": {}
- },
- "R": {
- "#": "'-(i)er' suffix",
- "suffix": true,
- "cross_product": true,
- "replacements": [
- {
- "remove": "",
- "add": "r",
- "condition": "e"
- },
- {
- "remove": "y",
- "add": "ier",
- "condition": "[^aeiou]y"
- },
- {
- "remove": "",
- "add": "er",
- "condition": "[aeiou]y"
- },
- {
- "remove": "",
- "add": "er",
- "condition": "[^ey]"
- }
- ],
- "adds_metadata": {
- "adjective": {}
- },
- "gifts_metadata": {}
- },
- "C": {
- "#": "'de-' prefix",
- "suffix": false,
- "cross_product": true,
- "replacements": [
- {
- "remove": "",
- "add": "de",
- "condition": "."
- }
- ],
- "adds_metadata": {},
- "gifts_metadata": {}
- },
- "V": {
- "#": "'-ive' suffix",
- "suffix": true,
- "cross_product": false,
- "replacements": [
- {
- "remove": "e",
- "add": "ive",
- "condition": "e"
- },
- {
- "remove": "",
- "add": "ive",
- "condition": "[^e]"
- }
- ],
- "adds_metadata": {},
- "gifts_metadata": {}
- },
- "N": {
- "#": "nominalization suffixes: -ion, -ication, -en",
- "suffix": true,
- "cross_product": true,
- "replacements": [
- {
- "remove": "e",
- "add": "ion",
- "condition": "e"
- },
- {
- "remove": "y",
- "add": "ication",
- "condition": "y"
- },
- {
- "remove": "",
- "add": "en",
- "condition": "[^ey]"
- }
- ],
- "adds_metadata": {},
- "gifts_metadata": {}
- },
- "A": {
- "#": "'re-' prefix",
- "suffix": false,
- "cross_product": true,
- "replacements": [
- {
- "remove": "",
- "add": "re",
- "condition": "."
- }
- ],
- "adds_metadata": {},
- "gifts_metadata": {}
- },
- "Z": {
- "#": "'-(i)(e)rs' suffix",
- "suffix": true,
- "cross_product": true,
- "replacements": [
- {
- "remove": "",
- "add": "rs",
- "condition": "e"
- },
- {
- "remove": "y",
- "add": "iers",
- "condition": "[^aeiou]y"
- },
- {
- "remove": "",
- "add": "ers",
- "condition": "[aeiou]y"
- },
- {
- "remove": "",
- "add": "ers",
- "condition": "[^ey]"
- }
- ],
- "adds_metadata": {},
- "gifts_metadata": {}
- },
- "P": {
- "#": "'-(i)ness' suffix",
- "suffix": true,
- "cross_product": true,
- "replacements": [
- {
- "remove": "y",
- "add": "iness",
- "condition": "[^aeiou]y"
- },
- {
- "remove": "",
- "add": "ness",
- "condition": "[aeiou]y"
- },
- {
- "remove": "",
- "add": "ness",
- "condition": "[^y]"
- }
- ],
- "adds_metadata": {},
- "gifts_metadata": {}
- },
- "M": {
- "#": "-'s possessive suffix; contraction of 'has' and 'is",
- "suffix": true,
- "cross_product": true,
- "replacements": [
- {
- "remove": "",
- "add": "'s",
- "condition": "."
- }
- ],
- "adds_metadata": {
- "noun": {
- "is_possessive": true
- }
- },
- "gifts_metadata": {
- "noun": {}
- }
- },
- "F": {
- "#": "'con-' prefix",
- "suffix": false,
- "cross_product": true,
- "replacements": [
- {
- "remove": "",
- "add": "con",
- "condition": "."
- }
- ],
- "adds_metadata": {},
- "gifts_metadata": {}
- },
- "B": {
- "#": "'-able' suffix",
- "suffix": true,
- "cross_product": true,
- "replacements": [
- {
- "remove": "",
- "add": "able",
- "condition": "[^aeiou]"
- },
- {
- "remove": "",
- "add": "able",
- "condition": "ee"
- },
- {
- "remove": "e",
- "add": "able",
- "condition": "[^aeiou]e"
- }
- ],
- "adds_metadata": {},
- "gifts_metadata": {}
- },
- "S": {
- "#": "'-(i)(e)s' plural suffix",
- "suffix": true,
- "cross_product": true,
- "replacements": [
- {
- "remove": "y",
- "add": "ies",
- "condition": "[^aeiou]y"
- },
- {
- "remove": "",
- "add": "s",
- "condition": "[aeiou]y"
- },
- {
- "remove": "",
- "add": "es",
- "condition": "[sxzh]"
- },
- {
- "remove": "",
- "add": "s",
- "condition": "[^sxzhy]"
- }
- ],
- "adds_metadata": {
- "noun": {
- "is_plural": true
- }
- },
- "gifts_metadata": {}
- },
- "D": {
- "#": "'-(e)d' suffix",
- "suffix": true,
- "cross_product": true,
- "replacements": [
- {
- "remove": "",
- "add": "d",
- "condition": "e"
- },
- {
- "remove": "y",
- "add": "ied",
- "condition": "[^aeiou]y"
- },
- {
- "remove": "",
- "add": "ed",
- "condition": "[^ey]"
- },
- {
- "remove": "",
- "add": "ed",
- "condition": "[aeiou]y"
- }
- ],
- "adds_metadata": {
- "kind": {
- "kind": "Adjective"
- }
- },
- "gifts_metadata": {}
- },
- "G": {
- "#": "'-ing' suffix",
- "suffix": true,
- "cross_product": true,
- "replacements": [
- {
- "remove": "e",
- "add": "ing",
- "condition": "e"
- },
- {
- "remove": "",
- "add": "ing",
- "condition": "[^e]"
- }
- ],
- "adds_metadata": {
- "verb": {},
- "noun": null,
- "adjective": null
- },
- "gifts_metadata": {}
- },
- "Q": {
- "#": "'-ally' suffix",
- "suffix": true,
- "cross_product": true,
- "replacements": [
- {
- "remove": "",
- "add": "ally",
- "condition": "."
- }
- ],
- "adds_metadata": {},
- "gifts_metadata": {}
- },
- "O": {
- "#": "'-ful' suffix",
- "suffix": true,
- "cross_product": true,
- "replacements": [
- {
- "remove": "",
- "add": "ful",
- "condition": "."
- }
- ],
- "adds_metadata": {},
- "gifts_metadata": {}
- },
- "I": {
- "#": "'in-' prefix",
- "suffix": false,
- "cross_product": true,
- "replacements": [
- {
- "remove": "",
- "add": "in",
- "condition": "."
- }
- ],
- "adds_metadata": {},
- "gifts_metadata": {}
- },
- "X": {
- "#": "'-ions', '-ications', '-ens' suffixes",
- "suffix": true,
- "cross_product": true,
- "replacements": [
- {
- "remove": "e",
- "add": "ions",
- "condition": "e"
- },
- {
- "remove": "y",
- "add": "ications",
- "condition": "y"
- },
- {
- "remove": "",
- "add": "ens",
- "condition": "[^ey]"
- }
- ],
- "adds_metadata": {},
- "gifts_metadata": {}
- },
- "J": {
- "#": "'-ings' suffix",
- "suffix": true,
- "cross_product": true,
- "replacements": [
- {
- "remove": "e",
- "add": "ings",
- "condition": "e"
- },
- {
- "remove": "",
- "add": "ings",
- "condition": "[^e]"
- }
- ],
- "adds_metadata": {},
- "gifts_metadata": {}
- },
- "1": {
- "#": "singular noun property",
- "suffix": true,
- "cross_product": true,
- "replacements": [],
- "adds_metadata": {},
- "gifts_metadata": {
- "noun": {
- "is_plural": false
- }
- }
- },
- "2": {
- "#": "proper noun property",
- "suffix": true,
- "cross_product": true,
- "replacements": [],
- "adds_metadata": {},
- "gifts_metadata": {
- "noun": {
- "is_proper": true
- }
- }
- },
- "3": {
- "#": "linking verb property",
- "suffix": true,
- "cross_product": true,
- "replacements": [],
- "adds_metadata": {},
- "gifts_metadata": {
- "verb": {
- "is_linking": true
- }
- }
- },
- "4": {
- "#": "verb property",
- "suffix": true,
- "cross_product": true,
- "replacements": [],
- "adds_metadata": {},
- "gifts_metadata": {
- "verb": {}
- }
- },
- "5": {
- "#": "adjective property",
- "suffix": true,
- "cross_product": true,
- "replacements": [],
- "adds_metadata": {},
- "gifts_metadata": {
- "adjective": {}
- }
- },
- "6": {
- "#": "swear word property",
- "suffix": true,
- "cross_product": true,
- "replacements": [],
- "adds_metadata": {
- "swear": true
- },
- "gifts_metadata": {
- "swear": true
- }
- },
- "7": {
- "#": "conjunction property",
- "suffix": true,
- "cross_product": true,
- "replacements": [],
- "adds_metadata": {},
- "gifts_metadata": {
- "conjunction": {}
- }
- },
- "8": {
- "#": "pronoun property",
- "suffix": true,
- "cross_product": true,
- "replacements": [],
- "adds_metadata": {},
- "gifts_metadata": {
- "pronoun": {}
- }
- },
- "9": {
- "#": "plural noun property",
- "suffix": true,
- "cross_product": true,
- "replacements": [],
- "adds_metadata": {},
- "gifts_metadata": {
- "noun": {
- "is_plural": true
- }
- }
- },
- "~": {
- "#": "common word property",
- "suffix": true,
- "cross_product": true,
- "replacements": [],
- "adds_metadata": {},
- "gifts_metadata": {
- "common": true
- }
- },
- "+": {
- "#": "preposition property",
- "suffix": true,
- "cross_product": true,
- "replacements": [],
- "adds_metadata": {},
- "gifts_metadata": {
- "preposition": true
- }
- },
- "-": {
- "#": "determiner property",
- "suffix": true,
- "cross_product": true,
- "replacements": [],
- "adds_metadata": {},
- "gifts_metadata": {
- "determiner": true
- }
- },
- "j": {
- "#": "adverb property",
- "suffix": true,
- "cross_product": true,
- "replacements": [],
- "adds_metadata": {},
- "gifts_metadata": {
- "adverb": {}
- }
- },
- "s": {
- "#": "subject case property",
- "suffix": true,
- "cross_product": true,
- "replacements": [],
- "adds_metadata": {},
- "gifts_metadata": {
- "pronoun": {}
- }
- },
- "o": {
- "#": "object case property",
- "suffix": true,
- "cross_product": true,
- "replacements": [],
- "adds_metadata": {},
- "gifts_metadata": {
- "pronoun": {}
- }
- },
- "f": {
- "#": "first-person property",
- "suffix": true,
- "cross_product": true,
- "replacements": [],
- "adds_metadata": {},
- "gifts_metadata": {
- "pronoun": {
- "is_plural": false
- }
- }
- },
- "n": {
- "#": "second-person property",
- "suffix": true,
- "cross_product": true,
- "replacements": [],
- "adds_metadata": {},
- "gifts_metadata": {
- "pronoun": {}
- }
- },
- "t": {
- "#": "third-person property",
- "suffix": true,
- "cross_product": true,
- "replacements": [],
- "adds_metadata": {},
- "gifts_metadata": {
- "pronoun": {}
- }
- },
- "c": {
- "#": "comparative property",
- "suffix": true,
- "cross_product": true,
- "replacements": [],
- "adds_metadata": {},
- "gifts_metadata": {
- "adjective": {}
- }
- },
- "u": {
- "#": "superlative property",
- "suffix": true,
- "cross_product": true,
- "replacements": [],
- "adds_metadata": {},
- "gifts_metadata": {
- "adjective": {}
- }
- },
- "*": {
- "#": "singular third-person pronoun property",
- "suffix": true,
- "cross_product": true,
- "replacements": [],
- "adds_metadata": {},
- "gifts_metadata": {
- "pronoun": {
- "is_plural": false,
- "person": "Third"
- }
- }
- },
- ":": {
- "#": "plural pronoun property",
- "suffix": true,
- "cross_product": true,
- "replacements": [],
- "adds_metadata": {},
- "gifts_metadata": {
- "pronoun": {
- "is_plural": true
- }
- }
- },
- "m": {
- "#": "auxiliary verb property",
- "suffix": true,
- "cross_product": true,
- "replacements": [],
- "adds_metadata": {},
- "gifts_metadata": {
- "verb": {
- "is_auxiliary": true
- }
- }
- },
- "<": {
- "#": "American property",
- "suffix": true,
- "cross_product": true,
- "replacements": [],
- "adds_metadata": {},
- "gifts_metadata": {
- "dialect": "American"
- }
- },
- "!": {
- "#": "GB property",
- "suffix": true,
- "cross_product": true,
- "replacements": [],
- "adds_metadata": {},
- "gifts_metadata": {
- "dialect": "British"
- }
- },
- "@": {
- "#": "CA property",
- "suffix": true,
- "cross_product": true,
- "replacements": [],
- "adds_metadata": {},
- "gifts_metadata": {
- "dialect": "Canadian"
- }
- }
- }
+ "affixes": {
+ "K": {
+ "#": "'pro-' prefix",
+ "suffix": false,
+ "cross_product": true,
+ "replacements": [
+ {
+ "remove": "",
+ "add": "pro",
+ "condition": "."
+ }
+ ],
+ "adds_metadata": {},
+ "gifts_metadata": {}
+ },
+ "L": {
+ "#": "'-ment' suffix",
+ "suffix": true,
+ "cross_product": true,
+ "replacements": [
+ {
+ "remove": "",
+ "add": "ment",
+ "condition": "."
+ }
+ ],
+ "adds_metadata": {},
+ "gifts_metadata": {}
+ },
+ "E": {
+ "#": "'dis-' prefix",
+ "suffix": false,
+ "cross_product": true,
+ "replacements": [
+ {
+ "remove": "",
+ "add": "dis",
+ "condition": "."
+ }
+ ],
+ "adds_metadata": {},
+ "gifts_metadata": {}
+ },
+ "Y": {
+ "#": "'-ly' suffix",
+ "suffix": true,
+ "cross_product": true,
+ "replacements": [
+ {
+ "remove": "",
+ "add": "ly",
+ "condition": "."
+ }
+ ],
+ "adds_metadata": {},
+ "gifts_metadata": {}
+ },
+ "U": {
+ "#": "'un-' prefix",
+ "suffix": false,
+ "cross_product": true,
+ "replacements": [
+ {
+ "remove": "",
+ "add": "un",
+ "condition": "."
+ }
+ ],
+ "adds_metadata": {},
+ "gifts_metadata": {}
+ },
+ "H": {
+ "#": "'-ieth' suffix",
+ "suffix": true,
+ "cross_product": false,
+ "replacements": [
+ {
+ "remove": "y",
+ "add": "ieth",
+ "condition": "y"
+ },
+ {
+ "remove": "",
+ "add": "th",
+ "condition": "[^y]"
+ }
+ ],
+ "adds_metadata": {},
+ "gifts_metadata": {}
+ },
+ "T": {
+ "#": "'-(i)est' suffix",
+ "suffix": true,
+ "cross_product": false,
+ "replacements": [
+ {
+ "remove": "",
+ "add": "st",
+ "condition": "e"
+ },
+ {
+ "remove": "y",
+ "add": "iest",
+ "condition": "[^aeiou]y"
+ },
+ {
+ "remove": "",
+ "add": "est",
+ "condition": "[aeiou]y"
+ },
+ {
+ "remove": "",
+ "add": "est",
+ "condition": "[^ey]"
+ }
+ ],
+ "adds_metadata": {},
+ "gifts_metadata": {}
+ },
+ "R": {
+ "#": "'-(i)er' suffix",
+ "suffix": true,
+ "cross_product": true,
+ "replacements": [
+ {
+ "remove": "",
+ "add": "r",
+ "condition": "e"
+ },
+ {
+ "remove": "y",
+ "add": "ier",
+ "condition": "[^aeiou]y"
+ },
+ {
+ "remove": "",
+ "add": "er",
+ "condition": "[aeiou]y"
+ },
+ {
+ "remove": "",
+ "add": "er",
+ "condition": "[^ey]"
+ }
+ ],
+ "adds_metadata": {
+ "adjective": {}
+ },
+ "gifts_metadata": {}
+ },
+ "C": {
+ "#": "'de-' prefix",
+ "suffix": false,
+ "cross_product": true,
+ "replacements": [
+ {
+ "remove": "",
+ "add": "de",
+ "condition": "."
+ }
+ ],
+ "adds_metadata": {},
+ "gifts_metadata": {}
+ },
+ "V": {
+ "#": "'-ive' suffix",
+ "suffix": true,
+ "cross_product": false,
+ "replacements": [
+ {
+ "remove": "e",
+ "add": "ive",
+ "condition": "e"
+ },
+ {
+ "remove": "",
+ "add": "ive",
+ "condition": "[^e]"
+ }
+ ],
+ "adds_metadata": {},
+ "gifts_metadata": {}
+ },
+ "N": {
+ "#": "nominalization suffixes: -ion, -ication, -en",
+ "suffix": true,
+ "cross_product": true,
+ "replacements": [
+ {
+ "remove": "e",
+ "add": "ion",
+ "condition": "e"
+ },
+ {
+ "remove": "y",
+ "add": "ication",
+ "condition": "y"
+ },
+ {
+ "remove": "",
+ "add": "en",
+ "condition": "[^ey]"
+ }
+ ],
+ "adds_metadata": {},
+ "gifts_metadata": {}
+ },
+ "A": {
+ "#": "'re-' prefix",
+ "suffix": false,
+ "cross_product": true,
+ "replacements": [
+ {
+ "remove": "",
+ "add": "re",
+ "condition": "."
+ }
+ ],
+ "adds_metadata": {},
+ "gifts_metadata": {}
+ },
+ "Z": {
+ "#": "'-(i)(e)rs' suffix",
+ "suffix": true,
+ "cross_product": true,
+ "replacements": [
+ {
+ "remove": "",
+ "add": "rs",
+ "condition": "e"
+ },
+ {
+ "remove": "y",
+ "add": "iers",
+ "condition": "[^aeiou]y"
+ },
+ {
+ "remove": "",
+ "add": "ers",
+ "condition": "[aeiou]y"
+ },
+ {
+ "remove": "",
+ "add": "ers",
+ "condition": "[^ey]"
+ }
+ ],
+ "adds_metadata": {},
+ "gifts_metadata": {}
+ },
+ "P": {
+ "#": "'-(i)ness' suffix",
+ "suffix": true,
+ "cross_product": true,
+ "replacements": [
+ {
+ "remove": "y",
+ "add": "iness",
+ "condition": "[^aeiou]y"
+ },
+ {
+ "remove": "",
+ "add": "ness",
+ "condition": "[aeiou]y"
+ },
+ {
+ "remove": "",
+ "add": "ness",
+ "condition": "[^y]"
+ }
+ ],
+ "adds_metadata": {},
+ "gifts_metadata": {}
+ },
+ "M": {
+ "#": "-'s possessive suffix; contraction of 'has' and 'is",
+ "suffix": true,
+ "cross_product": true,
+ "replacements": [
+ {
+ "remove": "",
+ "add": "'s",
+ "condition": "."
+ }
+ ],
+ "adds_metadata": {
+ "noun": {
+ "is_possessive": true
+ }
+ },
+ "gifts_metadata": {
+ "noun": {}
+ }
+ },
+ "F": {
+ "#": "'con-' prefix",
+ "suffix": false,
+ "cross_product": true,
+ "replacements": [
+ {
+ "remove": "",
+ "add": "con",
+ "condition": "."
+ }
+ ],
+ "adds_metadata": {},
+ "gifts_metadata": {}
+ },
+ "B": {
+ "#": "'-able' suffix",
+ "suffix": true,
+ "cross_product": true,
+ "replacements": [
+ {
+ "remove": "",
+ "add": "able",
+ "condition": "[^aeiou]"
+ },
+ {
+ "remove": "",
+ "add": "able",
+ "condition": "ee"
+ },
+ {
+ "remove": "e",
+ "add": "able",
+ "condition": "[^aeiou]e"
+ }
+ ],
+ "adds_metadata": {},
+ "gifts_metadata": {}
+ },
+ "S": {
+ "#": "'-(i)(e)s' plural suffix",
+ "suffix": true,
+ "cross_product": true,
+ "replacements": [
+ {
+ "remove": "y",
+ "add": "ies",
+ "condition": "[^aeiou]y"
+ },
+ {
+ "remove": "",
+ "add": "s",
+ "condition": "[aeiou]y"
+ },
+ {
+ "remove": "",
+ "add": "es",
+ "condition": "[sxzh]"
+ },
+ {
+ "remove": "",
+ "add": "s",
+ "condition": "[^sxzhy]"
+ }
+ ],
+ "adds_metadata": {
+ "noun": {
+ "is_plural": true
+ }
+ },
+ "gifts_metadata": {}
+ },
+ "D": {
+ "#": "'-(e)d' suffix",
+ "suffix": true,
+ "cross_product": true,
+ "replacements": [
+ {
+ "remove": "",
+ "add": "d",
+ "condition": "e"
+ },
+ {
+ "remove": "y",
+ "add": "ied",
+ "condition": "[^aeiou]y"
+ },
+ {
+ "remove": "",
+ "add": "ed",
+ "condition": "[^ey]"
+ },
+ {
+ "remove": "",
+ "add": "ed",
+ "condition": "[aeiou]y"
+ }
+ ],
+ "adds_metadata": {
+ "kind": {
+ "kind": "Adjective"
+ }
+ },
+ "gifts_metadata": {}
+ },
+ "G": {
+ "#": "'-ing' suffix",
+ "suffix": true,
+ "cross_product": true,
+ "replacements": [
+ {
+ "remove": "e",
+ "add": "ing",
+ "condition": "e"
+ },
+ {
+ "remove": "",
+ "add": "ing",
+ "condition": "[^e]"
+ }
+ ],
+ "adds_metadata": {
+ "verb": {},
+ "noun": null,
+ "adjective": null
+ },
+ "gifts_metadata": {}
+ },
+ "Q": {
+ "#": "'-ally' suffix",
+ "suffix": true,
+ "cross_product": true,
+ "replacements": [
+ {
+ "remove": "",
+ "add": "ally",
+ "condition": "."
+ }
+ ],
+ "adds_metadata": {},
+ "gifts_metadata": {}
+ },
+ "O": {
+ "#": "'-ful' suffix",
+ "suffix": true,
+ "cross_product": true,
+ "replacements": [
+ {
+ "remove": "",
+ "add": "ful",
+ "condition": "."
+ }
+ ],
+ "adds_metadata": {},
+ "gifts_metadata": {}
+ },
+ "I": {
+ "#": "'in-' prefix",
+ "suffix": false,
+ "cross_product": true,
+ "replacements": [
+ {
+ "remove": "",
+ "add": "in",
+ "condition": "."
+ }
+ ],
+ "adds_metadata": {},
+ "gifts_metadata": {}
+ },
+ "X": {
+ "#": "'-ions', '-ications', '-ens' suffixes",
+ "suffix": true,
+ "cross_product": true,
+ "replacements": [
+ {
+ "remove": "e",
+ "add": "ions",
+ "condition": "e"
+ },
+ {
+ "remove": "y",
+ "add": "ications",
+ "condition": "y"
+ },
+ {
+ "remove": "",
+ "add": "ens",
+ "condition": "[^ey]"
+ }
+ ],
+ "adds_metadata": {},
+ "gifts_metadata": {}
+ },
+ "J": {
+ "#": "'-ings' suffix",
+ "suffix": true,
+ "cross_product": true,
+ "replacements": [
+ {
+ "remove": "e",
+ "add": "ings",
+ "condition": "e"
+ },
+ {
+ "remove": "",
+ "add": "ings",
+ "condition": "[^e]"
+ }
+ ],
+ "adds_metadata": {},
+ "gifts_metadata": {}
+ },
+ "1": {
+ "#": "singular noun property",
+ "suffix": true,
+ "cross_product": true,
+ "replacements": [],
+ "adds_metadata": {},
+ "gifts_metadata": {
+ "noun": {
+ "is_plural": false
+ }
+ }
+ },
+ "2": {
+ "#": "proper noun property",
+ "suffix": true,
+ "cross_product": true,
+ "replacements": [],
+ "adds_metadata": {},
+ "gifts_metadata": {
+ "noun": {
+ "is_proper": true
+ }
+ }
+ },
+ "3": {
+ "#": "linking verb property",
+ "suffix": true,
+ "cross_product": true,
+ "replacements": [],
+ "adds_metadata": {},
+ "gifts_metadata": {
+ "verb": {
+ "is_linking": true
+ }
+ }
+ },
+ "4": {
+ "#": "verb property",
+ "suffix": true,
+ "cross_product": true,
+ "replacements": [],
+ "adds_metadata": {},
+ "gifts_metadata": {
+ "verb": {}
+ }
+ },
+ "5": {
+ "#": "adjective property",
+ "suffix": true,
+ "cross_product": true,
+ "replacements": [],
+ "adds_metadata": {},
+ "gifts_metadata": {
+ "adjective": {}
+ }
+ },
+ "6": {
+ "#": "swear word property",
+ "suffix": true,
+ "cross_product": true,
+ "replacements": [],
+ "adds_metadata": {
+ "swear": true
+ },
+ "gifts_metadata": {
+ "swear": true
+ }
+ },
+ "7": {
+ "#": "conjunction property",
+ "suffix": true,
+ "cross_product": true,
+ "replacements": [],
+ "adds_metadata": {},
+ "gifts_metadata": {
+ "conjunction": {}
+ }
+ },
+ "8": {
+ "#": "pronoun property",
+ "suffix": true,
+ "cross_product": true,
+ "replacements": [],
+ "adds_metadata": {},
+ "gifts_metadata": {
+ "pronoun": {}
+ }
+ },
+ "9": {
+ "#": "plural noun property",
+ "suffix": true,
+ "cross_product": true,
+ "replacements": [],
+ "adds_metadata": {},
+ "gifts_metadata": {
+ "noun": {
+ "is_plural": true
+ }
+ }
+ },
+ "~": {
+ "#": "common word property",
+ "suffix": true,
+ "cross_product": true,
+ "replacements": [],
+ "adds_metadata": {},
+ "gifts_metadata": {
+ "common": true
+ }
+ },
+ "+": {
+ "#": "preposition property",
+ "suffix": true,
+ "cross_product": true,
+ "replacements": [],
+ "adds_metadata": {},
+ "gifts_metadata": {
+ "preposition": true
+ }
+ },
+ "-": {
+ "#": "determiner property",
+ "suffix": true,
+ "cross_product": true,
+ "replacements": [],
+ "adds_metadata": {},
+ "gifts_metadata": {
+ "determiner": true
+ }
+ },
+ "j": {
+ "#": "adverb property",
+ "suffix": true,
+ "cross_product": true,
+ "replacements": [],
+ "adds_metadata": {},
+ "gifts_metadata": {
+ "adverb": {}
+ }
+ },
+ "s": {
+ "#": "subject case property",
+ "suffix": true,
+ "cross_product": true,
+ "replacements": [],
+ "adds_metadata": {},
+ "gifts_metadata": {
+ "pronoun": {}
+ }
+ },
+ "o": {
+ "#": "object case property",
+ "suffix": true,
+ "cross_product": true,
+ "replacements": [],
+ "adds_metadata": {},
+ "gifts_metadata": {
+ "pronoun": {}
+ }
+ },
+ "f": {
+ "#": "first-person property",
+ "suffix": true,
+ "cross_product": true,
+ "replacements": [],
+ "adds_metadata": {},
+ "gifts_metadata": {
+ "pronoun": {
+ "is_plural": false
+ }
+ }
+ },
+ "n": {
+ "#": "second-person property",
+ "suffix": true,
+ "cross_product": true,
+ "replacements": [],
+ "adds_metadata": {},
+ "gifts_metadata": {
+ "pronoun": {}
+ }
+ },
+ "t": {
+ "#": "third-person property",
+ "suffix": true,
+ "cross_product": true,
+ "replacements": [],
+ "adds_metadata": {},
+ "gifts_metadata": {
+ "pronoun": {}
+ }
+ },
+ "c": {
+ "#": "comparative property",
+ "suffix": true,
+ "cross_product": true,
+ "replacements": [],
+ "adds_metadata": {},
+ "gifts_metadata": {
+ "adjective": {}
+ }
+ },
+ "u": {
+ "#": "superlative property",
+ "suffix": true,
+ "cross_product": true,
+ "replacements": [],
+ "adds_metadata": {},
+ "gifts_metadata": {
+ "adjective": {}
+ }
+ },
+ "*": {
+ "#": "singular third-person pronoun property",
+ "suffix": true,
+ "cross_product": true,
+ "replacements": [],
+ "adds_metadata": {},
+ "gifts_metadata": {
+ "pronoun": {
+ "is_plural": false,
+ "person": "Third"
+ }
+ }
+ },
+ ":": {
+ "#": "plural pronoun property",
+ "suffix": true,
+ "cross_product": true,
+ "replacements": [],
+ "adds_metadata": {},
+ "gifts_metadata": {
+ "pronoun": {
+ "is_plural": true
+ }
+ }
+ },
+ "m": {
+ "#": "auxiliary verb property",
+ "suffix": true,
+ "cross_product": true,
+ "replacements": [],
+ "adds_metadata": {},
+ "gifts_metadata": {
+ "verb": {
+ "is_auxiliary": true
+ }
+ }
+ },
+ "<": {
+ "#": "American property",
+ "suffix": true,
+ "cross_product": true,
+ "replacements": [],
+ "adds_metadata": {},
+ "gifts_metadata": {
+ "dialect": "American"
+ }
+ },
+ "!": {
+ "#": "GB property",
+ "suffix": true,
+ "cross_product": true,
+ "replacements": [],
+ "adds_metadata": {},
+ "gifts_metadata": {
+ "dialect": "British"
+ }
+ },
+ "@": {
+ "#": "CA property",
+ "suffix": true,
+ "cross_product": true,
+ "replacements": [],
+ "adds_metadata": {},
+ "gifts_metadata": {
+ "dialect": "Canadian"
+ }
+ }
+ }
}
diff --git a/justfile b/justfile
index 59bb38a6e..e4e0f0264 100644
--- a/justfile
+++ b/justfile
@@ -1,7 +1,7 @@
# Format entire project
format:
cargo fmt
- pnpm check
+ pnpm format
# Build the WebAssembly for a specific target (usually either `web` or `bundler`)
build-wasm:
@@ -188,12 +188,11 @@ check: check-rust build-web
#! /bin/bash
set -eo pipefail
- cd "{{justfile_directory()}}/packages"
pnpm install
pnpm check
# Needed because Svelte has special linters
- cd web
+ cd "{{justfile_directory()}}/packages/web"
pnpm check
# Populate build caches and install necessary local tooling (tools callable via `pnpm run <tool>`).
diff --git a/packages/harper.js/examples/commonjs-simple/index.js b/packages/harper.js/examples/commonjs-simple/index.js
index 089be0fc0..a613b31ec 100644
--- a/packages/harper.js/examples/commonjs-simple/index.js
+++ b/packages/harper.js/examples/commonjs-simple/index.js
@@ -4,7 +4,7 @@ async function main() {
// This constructs the linter to consume American English.
const linter = new harper.LocalLinter({
binary: harper.binary,
- dialect: harper.Dialect.American
+ dialect: harper.Dialect.American,
});
const lints = await linter.lint('This is a example of how to use `harper.js`.');
diff --git a/packages/harper.js/src/Linter.ts b/packages/harper.js/src/Linter.ts
index 215d863c6..af9756c6a 100644
--- a/packages/harper.js/src/Linter.ts
+++ b/packages/harper.js/src/Linter.ts
@@ -1,4 +1,4 @@
-import type { Lint, Span, Suggestion, Dialect } from 'harper-wasm';
+import type { Dialect, Lint, Span, Suggestion } from 'harper-wasm';
import type { BinaryModule } from './binary';
import type { LintConfig, LintOptions } from './main';
diff --git a/packages/harper.js/src/LocalLinter.ts b/packages/harper.js/src/LocalLinter.ts
index d7bbbc1be..d925eda62 100644
--- a/packages/harper.js/src/LocalLinter.ts
+++ b/packages/harper.js/src/LocalLinter.ts
@@ -135,7 +135,7 @@ export default class LocalLinter implements Linter {
async setDialect(dialect: Dialect): Promise<void> {
const inner = await this.inner;
- if (inner.get_dialect() != dialect) {
+ if (inner.get_dialect() !== dialect) {
this.inner = this.createInner(dialect);
}
diff --git a/packages/harper.js/src/WorkerLinter/index.ts b/packages/harper.js/src/WorkerLinter/index.ts
index 0a8984d3f..ae6f52bd8 100644
--- a/packages/harper.js/src/WorkerLinter/index.ts
+++ b/packages/harper.js/src/WorkerLinter/index.ts
@@ -1,4 +1,4 @@
-import type { Lint, Span, Suggestion, Dialect } from 'harper-wasm';
+import type { Dialect, Lint, Span, Suggestion } from 'harper-wasm';
import type Linter from '../Linter';
import type { LinterInit } from '../Linter';
import type { BinaryModule, DeserializedRequest } from '../binary';
@@ -150,7 +150,7 @@ export default class WorkerLinter implements Linter {
}
/** Run a procedure on the remote worker. */
- private async rpc(procName: string, args: any[]): Promise<any> {
+ private async rpc(procName: string, args: unknown[]): Promise<any> {
const promise = new Promise((resolve, reject) => {
this.requestQueue.push({
resolve,
diff --git a/packages/harper.js/src/binary.ts b/packages/harper.js/src/binary.ts
index f65e7b073..fec8853ab 100644
--- a/packages/harper.js/src/binary.ts
+++ b/packages/harper.js/src/binary.ts
@@ -1,4 +1,10 @@
-import type { InitInput, Span, Suggestion, Linter as WasmLinter, Dialect} from 'harper-wasm';
+import {
+ Dialect,
+ type InitInput,
+ type Span,
+ type Suggestion,
+ type Linter as WasmLinter,
+} from 'harper-wasm';
import { default as binaryInlinedUrl } from 'harper-wasm/harper_wasm_bg.wasm?inline';
import { default as binaryUrl } from 'harper-wasm/harper_wasm_bg.wasm?no-inline';
import LazyPromise from 'p-lazy';
diff --git a/packages/obsidian-plugin/src/HarperSettingTab.ts b/packages/obsidian-plugin/src/HarperSettingTab.ts
index 0f93276e6..98341bd48 100644
--- a/packages/obsidian-plugin/src/HarperSettingTab.ts
+++ b/packages/obsidian-plugin/src/HarperSettingTab.ts
@@ -1,9 +1,9 @@
import './index.js';
+import { Dialect } from 'harper.js';
import { startCase } from 'lodash-es';
-import { type App, BaseComponent, PluginSettingTab, SearchComponent, Setting } from 'obsidian';
+import { type App, PluginSettingTab, Setting } from 'obsidian';
import type HarperPlugin from './index.js';
import type { Settings } from './index.js';
-import { Dialect, LintConfig } from 'harper.js';
export class HarperSettingTab extends PluginSettingTab {
private plugin: HarperPlugin;
@@ -49,7 +49,7 @@ export class HarperSettingTab extends PluginSettingTab {
.addOption(Dialect.Australian.toString(), 'Australian')
.setValue((this.settings.dialect ?? Dialect.American).toString())
.onChange(async (value) => {
- this.settings.dialect = parseInt(value);
+ this.settings.dialect = Number.parseInt(value);
await this.plugin.initializeFromSettings(this.settings);
});
});
@@ -93,7 +93,7 @@ export class HarperSettingTab extends PluginSettingTab {
const description = this.descriptions[setting];
if (
- searchQuery != '' &&
+ searchQuery !== '' &&
!(description.contains(searchQuery) || setting.contains(searchQuery))
) {
continue;
@@ -130,7 +130,7 @@ function valueToString(value: boolean | undefined): string {
throw 'Fell through case';
}
-function stringToValue(str): boolean | undefined {
+function stringToValue(str: string): boolean | undefined {
switch (str) {
case 'enable':
return true;
diff --git a/packages/obsidian-plugin/src/index.ts b/packages/obsidian-plugin/src/index.ts
index a1ec7db6c..b1305b854 100644
--- a/packages/obsidian-plugin/src/index.ts
+++ b/packages/obsidian-plugin/src/index.ts
@@ -1,6 +1,6 @@
import type { Extension } from '@codemirror/state';
import type { LintConfig, Linter, Suggestion } from 'harper.js';
-import { Dialect, LocalLinter, SuggestionKind, WorkerLinter, binary } from 'harper.js';
+import { type Dialect, LocalLinter, SuggestionKind, WorkerLinter, binary } from 'harper.js';
import { toArray } from 'lodash-es';
import { type App, Menu, Notice, Plugin, type PluginManifest } from 'obsidian';
import logoSvg from '../logo.svg';
@@ -43,8 +43,8 @@ export default class HarperPlugin extends Plugin {
const oldSettings = await this.getSettings();
if (
- settings.useWebWorker != oldSettings.useWebWorker ||
- settings.dialect != oldSettings.dialect
+ settings.useWebWorker !== oldSettings.useWebWorker ||
+ settings.dialect !== oldSettings.dialect
) {
if (settings.useWebWorker) {
this.harper = new WorkerLinter({ binary: binaryInlined, dialect: settings.dialect });
@@ -88,7 +88,7 @@ export default class HarperPlugin extends Plugin {
useWebWorker: usingWebWorker,
lintSettings: await this.harper.getLintConfig(),
userDictionary: await this.harper.exportWords(),
- dialect: await this.harper.getDialect()
+ dialect: await this.harper.getDialect(),
};
}
diff --git a/packages/obsidian-plugin/src/lint.ts b/packages/obsidian-plugin/src/lint.ts
index 6981a746e..62f1bbd36 100644
--- a/packages/obsidian-plugin/src/lint.ts
+++ b/packages/obsidian-plugin/src/lint.ts
@@ -166,7 +166,7 @@ function maybeEnableLint(state: EditorState, effects: readonly StateEffect<unkno
}
/// Returns a transaction spec which updates the current set of
-/// diagnostics, and enables the lint extension if if wasn't already
+/// diagnostics, and enables the lint extension if wasn't already
/// active.
export function setDiagnostics(
state: EditorState,
@@ -188,6 +188,8 @@ const lintState = StateField.define<LintState>({
return new LintState(Decoration.none, null);
},
update(value, tr) {
+ let newState: LintState;
+
if (tr.docChanged && value.diagnostics.size) {
const mapped = value.diagnostics.map(tr.changes);
let selected: SelectedDiagnostic | null = null;
@@ -197,14 +199,14 @@ const lintState = StateField.define<LintState>({
findDiagnostic(mapped, value.selected.diagnostic, selPos) ||
findDiagnostic(mapped, null, selPos);
}
- value = new LintState(mapped, selected);
+ newState = new LintState(mapped, selected);
}
for (const effect of tr.effects) {
if (effect.is(setDiagnosticsEffect)) {
- value = LintState.init(effect.value, tr.state);
+ newState = LintState.init(effect.value, tr.state);
} else if (effect.is(movePanelSelection)) {
- value = new LintState(value.diagnostics, effect.value);
+ newState = new LintState(value.diagnostics, effect.value);
}
}
@@ -368,12 +370,12 @@ export function forceLinting(view: EditorView) {
function assignKeys(actions: readonly Action[] | undefined) {
const assigned: string[] = [];
if (actions)
- actions: for (const { name } of actions) {
+ outer: for (const { name } of actions) {
for (let i = 0; i < name.length; i++) {
const ch = name[i];
if (/[a-zA-Z]/.test(ch) && !assigned.some((c) => c.toLowerCase() === ch.toLowerCase())) {
assigned.push(ch);
- continue actions;
+ continue outer;
}
}
assigned.push('');
diff --git a/packages/vscode-plugin/package.json b/packages/vscode-plugin/package.json
index 8d3f312db..6c84ced8a 100644
--- a/packages/vscode-plugin/package.json
+++ b/packages/vscode-plugin/package.json
@@ -80,12 +80,7 @@
"harper.dialect": {
"scope": "resource",
"type": "string",
- "enum": [
- "British",
- "American",
- "Canadian",
- "Australian"
- ],
+ "enum": ["British", "American", "Canadian", "Australian"],
"default": "American",
"description": "Set which dialect of English Harper should expect."
},
diff --git a/packages/vscode-plugin/src/extension.ts b/packages/vscode-plugin/src/extension.ts
index c9f92e7a2..e57150fe8 100644
--- a/packages/vscode-plugin/src/extension.ts
+++ b/packages/vscode-plugin/src/extension.ts
@@ -35,7 +35,7 @@ export async function activate(context: ExtensionContext): Promise<void> {
const language = e.split(':')[1];
return [
{ language, scheme: 'file' },
- { language, scheme: 'untitled' }
+ { language, scheme: 'untitled' },
];
});
diff --git a/packages/vscode-plugin/src/tests/suite/helper.ts b/packages/vscode-plugin/src/tests/suite/helper.ts
index 9905895b4..85a24ce88 100644
--- a/packages/vscode-plugin/src/tests/suite/helper.ts
+++ b/packages/vscode-plugin/src/tests/suite/helper.ts
@@ -1,4 +1,3 @@
-import exp from 'node:constants';
import type { Diagnostic, Extension } from 'vscode';
import {
@@ -49,7 +48,7 @@ export function compareActualVsExpectedDiagnostics(
actual: Diagnostic[],
expected: Diagnostic[],
): void {
- if (actual.length != expected.length) {
+ if (actual.length !== expected.length) {
throw new Error(`Expected ${expected.length} diagnostics, got ${actual.length}.`);
}
diff --git a/packages/vscode-plugin/src/tests/suite/integration.test.ts b/packages/vscode-plugin/src/tests/suite/integration.test.ts
index 861cb7bf2..0b10648dc 100644
--- a/packages/vscode-plugin/src/tests/suite/integration.test.ts
+++ b/packages/vscode-plugin/src/tests/suite/integration.test.ts
@@ -9,8 +9,8 @@ import {
createRange,
getActualDiagnostics,
openFile,
- sleep,
openUntitled,
+ sleep,
} from './helper';
describe('Integration >', () => {
@@ -55,8 +55,8 @@ describe('Integration >', () => {
getActualDiagnostics(untitledUri),
createExpectedDiagnostics({
message: 'Did you mean to spell “Errorz” this way?',
- range: createRange(0, 0, 0, 6)
- })
+ range: createRange(0, 0, 0, 6),
+ }),
);
});
diff --git a/packages/vscode-plugin/src/tests/suite/integrationBritish.test.ts b/packages/vscode-plugin/src/tests/suite/integrationBritish.test.ts
index a30d58912..a523d2f68 100644
--- a/packages/vscode-plugin/src/tests/suite/integrationBritish.test.ts
+++ b/packages/vscode-plugin/src/tests/suite/integrationBritish.test.ts
@@ -1,6 +1,6 @@
import type { Extension } from 'vscode';
-import { commands, ConfigurationTarget, Uri, workspace } from 'vscode';
+import { ConfigurationTarget, type Uri, commands, workspace } from 'vscode';
import {
activateHarper,
@@ -9,7 +9,7 @@ import {
createRange,
getActualDiagnostics,
openFile,
- sleep
+ sleep,
} from './helper';
describe('IntegrationDialect >', () => {
@@ -31,7 +31,7 @@ describe('IntegrationDialect >', () => {
it('gives correct diagnostics for default config', () => {
compareActualVsExpectedDiagnostics(
getActualDiagnostics(markdownUri),
- createExpectedDiagnostics()
+ createExpectedDiagnostics(),
);
});
@@ -45,8 +45,8 @@ describe('IntegrationDialect >', () => {
getActualDiagnostics(markdownUri),
createExpectedDiagnostics({
message: 'Did you mean to spell “color” this way?',
- range: createRange(0, 41, 0, 46)
- })
+ range: createRange(0, 41, 0, 46),
+ }),
);
// Set config back to default value
diff --git a/packages/web/src/app.css b/packages/web/src/app.css
index c7f84571f..e8fe90946 100644
--- a/packages/web/src/app.css
+++ b/packages/web/src/app.css
@@ -45,16 +45,16 @@
}
* {
- font-family: Atkinson Hyperlegible;
+ font-family: Atkinson Hyperlegible, sans-serif;
}
code {
- font-family: "JetBrains Mono" !important;
+ font-family: "JetBrains Mono", monospace !important;
word-break: keep-all;
}
code * {
- font-family: "JetBrains Mono" !important;
+ font-family: "JetBrains Mono", monospace !important;
}
.underlinespecial {
diff --git a/packages/web/src/lib/Underlines.svelte b/packages/web/src/lib/Underlines.svelte
index 03fe26f4c..0b791d9df 100644
--- a/packages/web/src/lib/Underlines.svelte
+++ b/packages/web/src/lib/Underlines.svelte
@@ -14,7 +14,7 @@ import { quintOut } from 'svelte/easing';
let loadTime = Date.now();
-function slideUnderline(node: any) {
+function slideUnderline(_node: HTMLElement) {
return {
duration: 300,
css: (t: number) => {
diff --git a/packages/wordpress-plugin/src/harper/DialectSelectRow.tsx b/packages/wordpress-plugin/src/harper/DialectSelectRow.tsx
index 2dd3c160c..fc802eca3 100644
--- a/packages/wordpress-plugin/src/harper/DialectSelectRow.tsx
+++ b/packages/wordpress-plugin/src/harper/DialectSelectRow.tsx
@@ -1,7 +1,7 @@
-import useDialect from './useDialect';
import { SelectControl } from '@wordpress/components';
import { Dialect } from 'harper.js';
import React from 'react';
+import useDialect from './useDialect';
export default function DialectSelectRow() {
const [dialect, setDialect] = useDialect();
@@ -16,23 +16,23 @@ export default function DialectSelectRow() {
options={[
{
label: 'American',
- value: Dialect.American.toString()
+ value: Dialect.American.toString(),
},
{
label: 'Canadian',
- value: Dialect.Canadian.toString()
+ value: Dialect.Canadian.toString(),
},
{
label: 'Australian',
- value: Dialect.Australian.toString()
+ value: Dialect.Australian.toString(),
},
{
label: 'British',
- value: Dialect.British.toString()
- }
+ value: Dialect.British.toString(),
+ },
]}
- onChange={(value) => setDialect(parseInt(value))}
- ></SelectControl>
+ onChange={(value) => setDialect(Number.parseInt(value))}
+ />
</div>
);
}
diff --git a/packages/wordpress-plugin/src/harper/SidebarTabContainer.tsx b/packages/wordpress-plugin/src/harper/SidebarTabContainer.tsx
index 2580ddbdf..a18f7574e 100644
--- a/packages/wordpress-plugin/src/harper/SidebarTabContainer.tsx
+++ b/packages/wordpress-plugin/src/harper/SidebarTabContainer.tsx
@@ -1,9 +1,9 @@
+import { Panel, PanelBody, SelectControl, TabPanel } from '@wordpress/components';
import React from 'react';
import type { IgnorableLintBox } from './Box';
-import LintSettingList from './LintSettingList';
import DialectSelectRow from './DialectSelectRow';
-import { Panel, PanelBody, SelectControl, TabPanel } from '@wordpress/components';
import LintList from './LintList';
+import LintSettingList from './LintSettingList';
export default function SidebarTabContainer({
lintBoxes,
diff --git a/packages/wordpress-plugin/src/harper/useLintBoxes.ts b/packages/wordpress-plugin/src/harper/useLintBoxes.ts
index aad7e56ec..07851a62b 100644
--- a/packages/wordpress-plugin/src/harper/useLintBoxes.ts
+++ b/packages/wordpress-plugin/src/harper/useLintBoxes.ts
@@ -3,10 +3,10 @@ import { useCallback, useEffect, useState } from 'react';
import { type IgnorableLintBox, LintBox } from './Box';
import { useLinter } from './LinterProvider';
import type RichText from './RichText';
+import useDialect from './useDialect';
import useIgnoredLintState, { useIgnoreLint } from './useIgnoredLintState';
import useLintConfig from './useLintConfig';
import usePersonalDictionary from './usePersonalDictionary';
-import useDialect from './useDialect';
/**
* Lint given elements and return the resulting error targets.