eslint-plugin-function 0.0.12 → 0.0.14

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.js +4 -3
  2. package/package.json +7 -7
package/dist/index.js CHANGED
@@ -9,7 +9,7 @@ import { AST_NODE_TYPES } from '@typescript-eslint/types';
9
9
 
10
10
  // package.json
11
11
  var name = "eslint-plugin-function";
12
- var version = "0.0.12";
12
+ var version = "0.0.14";
13
13
  function getDocsUrl() {
14
14
  return "TODO: add docs for local ESLint rules";
15
15
  }
@@ -157,6 +157,7 @@ var defaultOptions = [
157
157
  }
158
158
  ];
159
159
  var allowedVariants = [
160
+ "never",
160
161
  "boolean",
161
162
  "falsy boolean",
162
163
  "truthy boolean"
@@ -196,8 +197,8 @@ function create3(context, [opts]) {
196
197
  return;
197
198
  }
198
199
  const returnType = getConstrainedTypeAtLocation(services, returnExpression);
199
- const parts = inspectVariantTypes(unionConstituents(returnType));
200
- if (allowedVariants.some((variant) => parts.has(variant))) return;
200
+ const parts = [...inspectVariantTypes(unionConstituents(returnType))];
201
+ if (parts.every((part) => allowedVariants.some((allowed) => part === allowed))) return;
201
202
  onViolation(returnExpression, {
202
203
  variants: [...parts].map((part) => `'${part}'`).join(", ")
203
204
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-plugin-function",
3
- "version": "0.0.12",
3
+ "version": "0.0.14",
4
4
  "private": false,
5
5
  "description": "(WIP) The ESLint plugin for function-related rules.",
6
6
  "license": "MIT",
@@ -18,9 +18,9 @@
18
18
  "package.json"
19
19
  ],
20
20
  "dependencies": {
21
- "@eslint-react/ast": "^1.40.3",
22
- "@eslint-react/eff": "^1.40.3",
23
- "@eslint-react/kit": "^1.40.3",
21
+ "@eslint-react/ast": "^1.40.5-beta.0",
22
+ "@eslint-react/eff": "^1.40.5-beta.0",
23
+ "@eslint-react/kit": "^1.40.5-beta.0",
24
24
  "@typescript-eslint/scope-manager": "^8.29.0",
25
25
  "@typescript-eslint/type-utils": "^8.29.0",
26
26
  "@typescript-eslint/types": "^8.29.0",
@@ -35,7 +35,7 @@
35
35
  "@types/node": "^22.14.0",
36
36
  "@typescript-eslint/rule-tester": "^8.29.0",
37
37
  "dedent": "^1.5.3",
38
- "eslint": "^9.23.0",
38
+ "eslint": "^9.24.0",
39
39
  "eslint-config-flat-gitignore": "^2.1.0",
40
40
  "eslint-plugin-vitest": "^0.5.4",
41
41
  "jiti": "^2.4.2",
@@ -47,9 +47,9 @@
47
47
  "@local/configs": "0.0.0"
48
48
  },
49
49
  "peerDependencies": {
50
- "eslint": "^9.23.0",
50
+ "eslint": "^9.24.0",
51
51
  "ts-api-utils": "^2.1.0",
52
- "typescript": "^5.8.2"
52
+ "typescript": "^5.8.3"
53
53
  },
54
54
  "engines": {
55
55
  "bun": ">=1.0.15",