@alextheman/eslint-plugin 2.8.0 → 2.8.1

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.
package/dist/index.cjs CHANGED
@@ -3759,7 +3759,7 @@ module.exports = __toCommonJS(index_exports);
3759
3759
 
3760
3760
  // package.json
3761
3761
  var name = "@alextheman/eslint-plugin";
3762
- var version = "2.8.0";
3762
+ var version = "2.8.1";
3763
3763
 
3764
3764
  // src/configs/index.ts
3765
3765
  var import_eslint_plugin_package_json = __toESM(require("eslint-plugin-package-json"), 1);
@@ -3833,7 +3833,10 @@ function createPluginTestsBaseConfig(plugin) {
3833
3833
  "@alextheman": plugin
3834
3834
  },
3835
3835
  rules: {
3836
- "@alextheman/consistent-test-function": ["error", { preference: "test" }],
3836
+ "@alextheman/consistent-test-function": [
3837
+ "error",
3838
+ { preference: "test" }
3839
+ ],
3837
3840
  "@alextheman/no-isolated-tests": "error",
3838
3841
  "@alextheman/no-skipped-tests": "warn"
3839
3842
  }
@@ -4511,7 +4514,8 @@ var consistentTestFunction = createRule_default({
4511
4514
  type: "object",
4512
4515
  properties: {
4513
4516
  preference: {
4514
- type: "string"
4517
+ type: "string",
4518
+ enum: ["it", "test"]
4515
4519
  }
4516
4520
  },
4517
4521
  additionalProperties: false
@@ -4522,7 +4526,7 @@ var consistentTestFunction = createRule_default({
4522
4526
  create(context) {
4523
4527
  var _a;
4524
4528
  const preference = (_a = context.options[0]) == null ? void 0 : _a.preference;
4525
- const validatedPreference = validTestFunctionsSchema.parse(preference != null ? preference : "test");
4529
+ const validatedPreference = parseTestFunction(preference != null ? preference : "test");
4526
4530
  return {
4527
4531
  CallExpression(node) {
4528
4532
  if (node.callee.type === import_utils2.AST_NODE_TYPES.Identifier && node.callee.name === "it" && validatedPreference === "test") {
package/dist/index.d.cts CHANGED
@@ -4,7 +4,7 @@ import { Config } from 'prettier';
4
4
  import z from 'zod';
5
5
 
6
6
  var name = "@alextheman/eslint-plugin";
7
- var version = "2.8.0";
7
+ var version = "2.8.1";
8
8
 
9
9
  type CamelToKebab<S extends string> = S extends `${IgnoreCase<"J">}avaScript${infer Rest}` ? Rest extends "" ? "javascript" : `javascript${CamelToKebab<Rest>}` : S extends `${IgnoreCase<"T">}ypeScript${infer Rest}` ? Rest extends "" ? "typescript" : `typescript${CamelToKebab<Rest>}` : S extends `${infer Head}${infer Tail}` ? Head extends Lowercase<Head> ? `${Head}${CamelToKebab<Tail>}` : `-${Lowercase<Head>}${CamelToKebab<Tail>}` : S;
10
10
 
@@ -71,7 +71,7 @@ declare function parseTestFunction(data: unknown): TestFunction;
71
71
  * and run json-schema-to-typescript to regenerate this file.
72
72
  */
73
73
  interface ConsistentTestFunctionOptions {
74
- preference?: string;
74
+ preference?: "it" | "test";
75
75
  }
76
76
 
77
77
  /**
package/dist/index.d.ts CHANGED
@@ -4,7 +4,7 @@ import { Config } from 'prettier';
4
4
  import z from 'zod';
5
5
 
6
6
  var name = "@alextheman/eslint-plugin";
7
- var version = "2.8.0";
7
+ var version = "2.8.1";
8
8
 
9
9
  type CamelToKebab<S extends string> = S extends `${IgnoreCase<"J">}avaScript${infer Rest}` ? Rest extends "" ? "javascript" : `javascript${CamelToKebab<Rest>}` : S extends `${IgnoreCase<"T">}ypeScript${infer Rest}` ? Rest extends "" ? "typescript" : `typescript${CamelToKebab<Rest>}` : S extends `${infer Head}${infer Tail}` ? Head extends Lowercase<Head> ? `${Head}${CamelToKebab<Tail>}` : `-${Lowercase<Head>}${CamelToKebab<Tail>}` : S;
10
10
 
@@ -71,7 +71,7 @@ declare function parseTestFunction(data: unknown): TestFunction;
71
71
  * and run json-schema-to-typescript to regenerate this file.
72
72
  */
73
73
  interface ConsistentTestFunctionOptions {
74
- preference?: string;
74
+ preference?: "it" | "test";
75
75
  }
76
76
 
77
77
  /**
package/dist/index.js CHANGED
@@ -3743,7 +3743,7 @@ var require_src = __commonJS({
3743
3743
 
3744
3744
  // package.json
3745
3745
  var name = "@alextheman/eslint-plugin";
3746
- var version = "2.8.0";
3746
+ var version = "2.8.1";
3747
3747
 
3748
3748
  // src/configs/index.ts
3749
3749
  import packageJson from "eslint-plugin-package-json";
@@ -3817,7 +3817,10 @@ function createPluginTestsBaseConfig(plugin) {
3817
3817
  "@alextheman": plugin
3818
3818
  },
3819
3819
  rules: {
3820
- "@alextheman/consistent-test-function": ["error", { preference: "test" }],
3820
+ "@alextheman/consistent-test-function": [
3821
+ "error",
3822
+ { preference: "test" }
3823
+ ],
3821
3824
  "@alextheman/no-isolated-tests": "error",
3822
3825
  "@alextheman/no-skipped-tests": "warn"
3823
3826
  }
@@ -4495,7 +4498,8 @@ var consistentTestFunction = createRule_default({
4495
4498
  type: "object",
4496
4499
  properties: {
4497
4500
  preference: {
4498
- type: "string"
4501
+ type: "string",
4502
+ enum: ["it", "test"]
4499
4503
  }
4500
4504
  },
4501
4505
  additionalProperties: false
@@ -4506,7 +4510,7 @@ var consistentTestFunction = createRule_default({
4506
4510
  create(context) {
4507
4511
  var _a;
4508
4512
  const preference = (_a = context.options[0]) == null ? void 0 : _a.preference;
4509
- const validatedPreference = validTestFunctionsSchema.parse(preference != null ? preference : "test");
4513
+ const validatedPreference = parseTestFunction(preference != null ? preference : "test");
4510
4514
  return {
4511
4515
  CallExpression(node) {
4512
4516
  if (node.callee.type === AST_NODE_TYPES.Identifier && node.callee.name === "it" && validatedPreference === "test") {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alextheman/eslint-plugin",
3
- "version": "2.8.0",
3
+ "version": "2.8.1",
4
4
  "description": "A package to provide custom ESLint rules and configs",
5
5
  "repository": {
6
6
  "type": "git",