Skip to content

Commit

Permalink
Merge pull request #1123 from ydah/typo
Browse files Browse the repository at this point in the history
Fix some typos
  • Loading branch information
makenowjust authored Dec 15, 2023
2 parents 99f3e27 + 7b629c5 commit a84fc85
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ final case class AttackPattern(pumps: Seq[(UString, UString, Int)], suffix: UStr
UString(str.result())
}

/** Returns the string reperesentation of this. */
/** Returns the string representation of this. */
def toString(style: AttackPattern.Style): String = {
val seq = Seq.newBuilder[String]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,13 @@ private[unicode] object Property {
lazy val BinaryPropertyNames: Set[String] =
Set("ASCII", "Any", "Assigned") ++ PropertyData.BinaryPropertyMap.keySet

/** An interval set of "ASCII" binrary property code points. */
/** An interval set of "ASCII" binary property code points. */
private lazy val ASCII = IntervalSet((UChar(0), UChar(0x80)))

/** An interval set of "Any" binrary property code points. */
/** An interval set of "Any" binary property code points. */
private lazy val Any = IntervalSet((UChar(0), UChar(0x110000)))

/** An interval set of "Assigned" binrary property code points. */
/** An interval set of "Assigned" binary property code points. */
private lazy val Assigned = Any.diff(PropertyData.GeneralCategoryMap("Unassigned"))

/** A map from "General_Category" value alias to canonical value name.
Expand Down
6 changes: 3 additions & 3 deletions packages/eslint-plugin-redos/src/rules/no-vulnerable.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ tester.run("no-vulnerable", rule, {
errors: [
{
message:
"Error on ReDoS vulnerablity check: look-ahead assertion (unsupported)",
"Error on ReDoS vulnerability check: look-ahead assertion (unsupported)",
},
],
},
Expand All @@ -100,7 +100,7 @@ tester.run("no-vulnerable", rule, {
errors: [
{
message:
"Error on ReDoS vulnerablity check: parsing failure (at 1) (invalid)",
"Error on ReDoS vulnerability check: parsing failure (at 1) (invalid)",
},
],
},
Expand All @@ -123,7 +123,7 @@ tester.run("no-vulnerable", rule, {
{
code: `const x = /^.*$/;`,
options: [{ timeout: 0, ignoreErrors: false }],
errors: [{ message: "Error on ReDoS vulnerablity check: timeout" }],
errors: [{ message: "Error on ReDoS vulnerability check: timeout" }],
},
],
});
4 changes: 2 additions & 2 deletions packages/eslint-plugin-redos/src/rules/no-vulnerable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -169,14 +169,14 @@ const rule: Rule.RuleModule = {
switch (result.error.kind) {
case "timeout":
context.report({
message: `Error on ReDoS vulnerablity check: timeout`,
message: `Error on ReDoS vulnerability check: timeout`,
node,
});
break;
case "invalid":
case "unsupported":
context.report({
message: `Error on ReDoS vulnerablity check: ${result.error.message} (${result.error.kind})`,
message: `Error on ReDoS vulnerability check: ${result.error.message} (${result.error.kind})`,
node,
});
break;
Expand Down
2 changes: 1 addition & 1 deletion packages/recheck/src/lib/worker-pool.ts
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ export class WorkerPool {
return worker;
}

/** Cancels the given refernece. */
/** Cancels the given reference. */
private cancelRef(ref: Ref): void {
ref.resolve({
source: ref.source,
Expand Down
4 changes: 2 additions & 2 deletions website/docs/usage/as-eslint-plugin.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ Therefore, to reduce unnecessary computation time, we recommend adding such a fo
The above settings disables the `redos/no-vulnerable` rule against test files.
Since ReDoS vulnerabilities in test codes are not critical problems, it will be no problem in many cases.

Alternatively, it is useful to set `cache` option. It makes the second run faster, so it improves responces of a linting on editor for example.
Alternatively, it is useful to set `cache` option. It makes the second run faster, so it improves responses of a linting on editor for example.

```json title=".eslintrc.json"
{
Expand Down Expand Up @@ -154,7 +154,7 @@ The following is the default configuration.
Note that the plugin accepts all parameter values listed in [this page](parameters.md).

In addition, `ignoreErrors`, `permittableComplexities` and `cache` are only available in ESLint plugin.
They specify error reporting and caching policiy.
They specify error reporting and caching policy.

:::

Expand Down

0 comments on commit a84fc85

Please sign in to comment.