@flint.fyi/ts 0.22.0 → 0.23.0

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.
Files changed (2) hide show
  1. package/dist/index.mjs +5 -4
  2. package/package.json +6 -6
package/dist/index.mjs CHANGED
@@ -1690,13 +1690,14 @@ function isDirectEqualityCheck(node, operators, parameterName) {
1690
1690
  body = getDirectReturnExpression(node.body);
1691
1691
  break;
1692
1692
  }
1693
- if (body?.kind !== SyntaxKind.BinaryExpression) return;
1693
+ if (body?.kind !== SyntaxKind.BinaryExpression) return false;
1694
1694
  const { left, operatorToken, right } = body;
1695
- if (!operators.includes(operatorToken.kind)) return;
1695
+ if (!operators.includes(operatorToken.kind)) return false;
1696
1696
  const isLeftParam = left.kind === SyntaxKind.Identifier && left.text === parameterName;
1697
1697
  const isRightParam = right.kind === SyntaxKind.Identifier && right.text === parameterName;
1698
- if (isLeftParam && !isRightParam) return right;
1699
- if (isRightParam && !isLeftParam) return left;
1698
+ if (isLeftParam && !isRightParam) return true;
1699
+ if (isRightParam && !isLeftParam) return true;
1700
+ return false;
1700
1701
  }
1701
1702
  function getDirectReturnExpression(body) {
1702
1703
  if (body.statements.length !== 1) return;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flint.fyi/ts",
3
- "version": "0.22.0",
3
+ "version": "0.23.0",
4
4
  "description": "[Experimental] TypeScript language plugin for Flint.",
5
5
  "homepage": "https://flint.fyi/rules/ts",
6
6
  "repository": {
@@ -28,18 +28,18 @@
28
28
  "ts-api-utils": "^2.4.0",
29
29
  "typescript": "^6.0.0",
30
30
  "zod": "^4.3.6",
31
- "@flint.fyi/typescript-language": "^0.19.0",
32
- "@flint.fyi/core": "^0.24.0",
33
- "@flint.fyi/utils": "^0.15.0"
31
+ "@flint.fyi/typescript-language": "^0.20.0",
32
+ "@flint.fyi/core": "^0.25.0",
33
+ "@flint.fyi/utils": "^0.16.0"
34
34
  },
35
35
  "devDependencies": {
36
36
  "tsdown": "0.22.3",
37
37
  "vitest": "4.1.0",
38
38
  "@flint.fyi/build": "^0.1.0",
39
- "@flint.fyi/rule-tester": "^0.17.0"
39
+ "@flint.fyi/rule-tester": "^0.18.0"
40
40
  },
41
41
  "engines": {
42
- "node": ">=24.0.0"
42
+ "node": ">=26.1.0"
43
43
  },
44
44
  "publishConfig": {
45
45
  "access": "public"