@alextheman/eslint-plugin 1.13.7 → 1.14.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.
package/dist/index.cjs CHANGED
@@ -3700,13 +3700,14 @@ var require_globals2 = __commonJS({
3700
3700
  var index_exports = {};
3701
3701
  __export(index_exports, {
3702
3702
  default: () => index_default,
3703
+ parseTestFunction: () => parseTestFunction,
3703
3704
  prettierRules: () => prettierRules_default
3704
3705
  });
3705
3706
  module.exports = __toCommonJS(index_exports);
3706
3707
 
3707
3708
  // package.json
3708
3709
  var name = "@alextheman/eslint-plugin";
3709
- var version = "1.13.7";
3710
+ var version = "1.14.0";
3710
3711
 
3711
3712
  // src/configs/alexPluginBase.ts
3712
3713
  function createAlexPluginBaseConfig(plugin) {
@@ -3775,6 +3776,7 @@ var typeScriptBase = [
3775
3776
  },
3776
3777
  rules: {
3777
3778
  "@typescript-eslint/consistent-type-imports": "error",
3779
+ "@typescript-eslint/no-redeclare": ["error", { ignoreDeclarationMerge: true }],
3778
3780
  "@typescript-eslint/no-unused-vars": [
3779
3781
  "error",
3780
3782
  {
@@ -3797,6 +3799,8 @@ var typeScriptBase = [
3797
3799
  "no-lonely-if": "error",
3798
3800
  "no-new-wrappers": "error",
3799
3801
  "no-param-reassign": "error",
3802
+ // Disable regular no-redeclare in favour of TypeScript-specific version since that will flag type redeclarations when we do const MyType = {}; export type MyType = ...
3803
+ "no-redeclare": "off",
3800
3804
  "no-restricted-imports": [
3801
3805
  "error",
3802
3806
  {
@@ -3963,6 +3967,9 @@ var getImportSpecifiersAfterRemoving_default = getImportSpecifiersAfterRemoving;
3963
3967
 
3964
3968
  // src/rules/consistent-test-function.ts
3965
3969
  var validTestFunctionsSchema = import_zod.default.enum(["test", "it"]);
3970
+ function parseTestFunction(data) {
3971
+ return validTestFunctionsSchema.parse(data);
3972
+ }
3966
3973
  var consistentTestFunction = createRule_default({
3967
3974
  name: "consistent-test-function",
3968
3975
  meta: {
@@ -4435,5 +4442,6 @@ var alexPlugin_default = alexPlugin;
4435
4442
  var index_default = alexPlugin_default;
4436
4443
  // Annotate the CommonJS export names for ESM import in node:
4437
4444
  0 && (module.exports = {
4445
+ parseTestFunction,
4438
4446
  prettierRules
4439
4447
  });
package/dist/index.d.cts CHANGED
@@ -3,7 +3,7 @@ import z from 'zod';
3
3
  import { Config } from 'prettier';
4
4
 
5
5
  var name = "@alextheman/eslint-plugin";
6
- var version = "1.13.7";
6
+ var version = "1.14.0";
7
7
 
8
8
  interface AlexPlugin {
9
9
  meta: {
@@ -28,6 +28,7 @@ declare const validTestFunctionsSchema: z.ZodEnum<{
28
28
  test: "test";
29
29
  it: "it";
30
30
  }>;
31
- type ValidTestFunctions = z.infer<typeof validTestFunctionsSchema>;
31
+ type TestFunction = z.infer<typeof validTestFunctionsSchema>;
32
+ declare function parseTestFunction(data: unknown): TestFunction;
32
33
 
33
- export { type AlexPlugin, type ValidTestFunctions, alexPlugin as default, prettierRules };
34
+ export { type AlexPlugin, type TestFunction, alexPlugin as default, parseTestFunction, prettierRules };
package/dist/index.d.ts CHANGED
@@ -3,7 +3,7 @@ import z from 'zod';
3
3
  import { Config } from 'prettier';
4
4
 
5
5
  var name = "@alextheman/eslint-plugin";
6
- var version = "1.13.7";
6
+ var version = "1.14.0";
7
7
 
8
8
  interface AlexPlugin {
9
9
  meta: {
@@ -28,6 +28,7 @@ declare const validTestFunctionsSchema: z.ZodEnum<{
28
28
  test: "test";
29
29
  it: "it";
30
30
  }>;
31
- type ValidTestFunctions = z.infer<typeof validTestFunctionsSchema>;
31
+ type TestFunction = z.infer<typeof validTestFunctionsSchema>;
32
+ declare function parseTestFunction(data: unknown): TestFunction;
32
33
 
33
- export { type AlexPlugin, type ValidTestFunctions, alexPlugin as default, prettierRules };
34
+ export { type AlexPlugin, type TestFunction, alexPlugin as default, parseTestFunction, prettierRules };
package/dist/index.js CHANGED
@@ -3692,7 +3692,7 @@ var require_globals2 = __commonJS({
3692
3692
 
3693
3693
  // package.json
3694
3694
  var name = "@alextheman/eslint-plugin";
3695
- var version = "1.13.7";
3695
+ var version = "1.14.0";
3696
3696
 
3697
3697
  // src/configs/alexPluginBase.ts
3698
3698
  function createAlexPluginBaseConfig(plugin) {
@@ -3761,6 +3761,7 @@ var typeScriptBase = [
3761
3761
  },
3762
3762
  rules: {
3763
3763
  "@typescript-eslint/consistent-type-imports": "error",
3764
+ "@typescript-eslint/no-redeclare": ["error", { ignoreDeclarationMerge: true }],
3764
3765
  "@typescript-eslint/no-unused-vars": [
3765
3766
  "error",
3766
3767
  {
@@ -3783,6 +3784,8 @@ var typeScriptBase = [
3783
3784
  "no-lonely-if": "error",
3784
3785
  "no-new-wrappers": "error",
3785
3786
  "no-param-reassign": "error",
3787
+ // Disable regular no-redeclare in favour of TypeScript-specific version since that will flag type redeclarations when we do const MyType = {}; export type MyType = ...
3788
+ "no-redeclare": "off",
3786
3789
  "no-restricted-imports": [
3787
3790
  "error",
3788
3791
  {
@@ -3949,6 +3952,9 @@ var getImportSpecifiersAfterRemoving_default = getImportSpecifiersAfterRemoving;
3949
3952
 
3950
3953
  // src/rules/consistent-test-function.ts
3951
3954
  var validTestFunctionsSchema = z.enum(["test", "it"]);
3955
+ function parseTestFunction(data) {
3956
+ return validTestFunctionsSchema.parse(data);
3957
+ }
3952
3958
  var consistentTestFunction = createRule_default({
3953
3959
  name: "consistent-test-function",
3954
3960
  meta: {
@@ -4421,5 +4427,6 @@ var alexPlugin_default = alexPlugin;
4421
4427
  var index_default = alexPlugin_default;
4422
4428
  export {
4423
4429
  index_default as default,
4430
+ parseTestFunction,
4424
4431
  prettierRules_default as prettierRules
4425
4432
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alextheman/eslint-plugin",
3
- "version": "1.13.7",
3
+ "version": "1.14.0",
4
4
  "description": "A package to provide custom ESLint rules and configs",
5
5
  "license": "ISC",
6
6
  "author": "alextheman",