@typescript-eslint/eslint-plugin 8.0.0-alpha.48 → 8.0.0-alpha.49

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -21,6 +21,7 @@ The following nodes are considered boolean expressions and their type is checked
21
21
  - Operands of logical binary operators (`lhs || rhs` and `lhs && rhs`).
22
22
  - Right-hand side operand is ignored when it's not a descendant of another boolean expression.
23
23
  This is to allow usage of boolean operators for their short-circuiting behavior.
24
+ - Asserted argument of an assertion function (`assert(arg)`).
24
25
 
25
26
  ## Examples
26
27
 
@@ -55,6 +56,11 @@ let obj = {};
55
56
  while (obj) {
56
57
  obj = getObj();
57
58
  }
59
+
60
+ // assertion functions without an `is` are boolean contexts.
61
+ declare function assert(value: unknown): asserts value;
62
+ let maybeString = Math.random() > 0.5 ? '' : undefined;
63
+ assert(maybeString);
58
64
  ```
59
65
 
60
66
  </TabItem>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@typescript-eslint/eslint-plugin",
3
- "version": "8.0.0-alpha.48",
3
+ "version": "8.0.0-alpha.49",
4
4
  "description": "TypeScript plugin for ESLint",
5
5
  "files": [
6
6
  "dist",
@@ -60,10 +60,10 @@
60
60
  },
61
61
  "dependencies": {
62
62
  "@eslint-community/regexpp": "^4.10.0",
63
- "@typescript-eslint/scope-manager": "8.0.0-alpha.48",
64
- "@typescript-eslint/type-utils": "8.0.0-alpha.48",
65
- "@typescript-eslint/utils": "8.0.0-alpha.48",
66
- "@typescript-eslint/visitor-keys": "8.0.0-alpha.48",
63
+ "@typescript-eslint/scope-manager": "8.0.0-alpha.49",
64
+ "@typescript-eslint/type-utils": "8.0.0-alpha.49",
65
+ "@typescript-eslint/utils": "8.0.0-alpha.49",
66
+ "@typescript-eslint/visitor-keys": "8.0.0-alpha.49",
67
67
  "graphemer": "^1.4.0",
68
68
  "ignore": "^5.3.1",
69
69
  "natural-compare": "^1.4.0",
@@ -74,8 +74,8 @@
74
74
  "@types/marked": "^5.0.2",
75
75
  "@types/mdast": "^4.0.3",
76
76
  "@types/natural-compare": "*",
77
- "@typescript-eslint/rule-schema-to-typescript-types": "8.0.0-alpha.48",
78
- "@typescript-eslint/rule-tester": "8.0.0-alpha.48",
77
+ "@typescript-eslint/rule-schema-to-typescript-types": "8.0.0-alpha.49",
78
+ "@typescript-eslint/rule-tester": "8.0.0-alpha.49",
79
79
  "ajv": "^6.12.6",
80
80
  "cross-env": "^7.0.3",
81
81
  "cross-fetch": "*",