@alextheman/eslint-plugin 2.8.1 → 2.8.2

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.1";
3762
+ var version = "2.8.2";
3763
3763
 
3764
3764
  // src/configs/index.ts
3765
3765
  var import_eslint_plugin_package_json = __toESM(require("eslint-plugin-package-json"), 1);
@@ -3867,6 +3867,14 @@ var javaScriptLanguageOptions = {
3867
3867
  };
3868
3868
  var javaScriptLanguageOptions_default = javaScriptLanguageOptions;
3869
3869
 
3870
+ // src/configs/miscellaneous/unusedVarsIgnorePatterns.ts
3871
+ var unusedVarsIgnorePatterns = {
3872
+ argsIgnorePattern: "^_",
3873
+ caughtErrorsIgnorePattern: "^_",
3874
+ varsIgnorePattern: "^_"
3875
+ };
3876
+ var unusedVarsIgnorePatterns_default = unusedVarsIgnorePatterns;
3877
+
3870
3878
  // src/configs/general/javaScriptBase.ts
3871
3879
  var javaScriptBase = [
3872
3880
  import_js.default.configs.recommended,
@@ -3900,14 +3908,7 @@ var javaScriptBase = [
3900
3908
  }
3901
3909
  ],
3902
3910
  "no-undef": "error",
3903
- "no-unused-vars": [
3904
- "error",
3905
- {
3906
- argsIgnorePattern: "^_",
3907
- caughtErrorsIgnorePattern: "^_",
3908
- varsIgnorePattern: "^_"
3909
- }
3910
- ],
3911
+ "no-unused-vars": ["error", unusedVarsIgnorePatterns_default],
3911
3912
  "no-useless-rename": "error",
3912
3913
  "no-useless-return": "error",
3913
3914
  "prefer-const": "error"
@@ -4138,26 +4139,15 @@ var typeScriptBase = [
4138
4139
  "@typescript-eslint/explicit-member-accessibility": "error",
4139
4140
  "@typescript-eslint/no-deprecated": "warn",
4140
4141
  "@typescript-eslint/no-redeclare": ["error", { ignoreDeclarationMerge: true }],
4141
- "@typescript-eslint/no-unused-vars": [
4142
- "error",
4143
- {
4144
- argsIgnorePattern: "^_",
4145
- caughtErrorsIgnorePattern: "^_",
4146
- varsIgnorePattern: "^_"
4147
- }
4148
- ],
4142
+ "@typescript-eslint/no-unused-vars": ["error", unusedVarsIgnorePatterns_default],
4143
+ // Disable import/no-unresolved (enabled in general/javascript, being extended here) because the TypeScript compiler already catches unused imports for us.
4144
+ "import/no-unresolved": "off",
4149
4145
  // Disable regular no-redeclare in favour of TypeScript-specific version since that will flag type redeclarations when we do const MyType = {}; export type MyType = ...
4150
4146
  "no-redeclare": "off",
4151
4147
  // Disable no-undef because undefined variables tend to be better caught by the TypeScript compiler.
4152
4148
  "no-undef": "off",
4153
4149
  // Disable regular no-unused-vars rule since that will flag interface declarations. Only use the TypeScript specific rule for this.
4154
4150
  "no-unused-vars": "off"
4155
- },
4156
- settings: {
4157
- "import/resolver": {
4158
- node: true,
4159
- typescript: true
4160
- }
4161
4151
  }
4162
4152
  }
4163
4153
  ];
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.1";
7
+ var version = "2.8.2";
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
 
@@ -65,47 +65,32 @@ declare const validTestFunctionsSchema: z.ZodEnum<{
65
65
  type TestFunction = z.infer<typeof validTestFunctionsSchema>;
66
66
  declare function parseTestFunction(data: unknown): TestFunction;
67
67
 
68
- /**
69
- * This file was automatically generated by json-schema-to-typescript.
70
- * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
71
- * and run json-schema-to-typescript to regenerate this file.
72
- */
68
+ /** Generated from src/utility/generateRuleOptionsTypes.ts.
69
+ * You may execute the above file to re-generate this type using `npm run generate-rule-options-types` */
73
70
  interface ConsistentTestFunctionOptions {
74
71
  preference?: "it" | "test";
75
72
  }
76
73
 
77
- /**
78
- * This file was automatically generated by json-schema-to-typescript.
79
- * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
80
- * and run json-schema-to-typescript to regenerate this file.
81
- */
74
+ /** Generated from src/utility/generateRuleOptionsTypes.ts.
75
+ * You may execute the above file to re-generate this type using `npm run generate-rule-options-types` */
82
76
  interface NoNamespaceImportsOptions {
83
77
  allow?: string[];
84
78
  }
85
79
 
86
- /**
87
- * This file was automatically generated by json-schema-to-typescript.
88
- * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
89
- * and run json-schema-to-typescript to regenerate this file.
90
- */
80
+ /** Generated from src/utility/generateRuleOptionsTypes.ts.
81
+ * You may execute the above file to re-generate this type using `npm run generate-rule-options-types` */
91
82
  interface NoRelativeImportsOptions {
92
83
  depth?: number;
93
84
  }
94
85
 
95
- /**
96
- * This file was automatically generated by json-schema-to-typescript.
97
- * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
98
- * and run json-schema-to-typescript to regenerate this file.
99
- */
86
+ /** Generated from src/utility/generateRuleOptionsTypes.ts.
87
+ * You may execute the above file to re-generate this type using `npm run generate-rule-options-types` */
100
88
  interface StandardiseErrorMessagesOptions {
101
89
  regex?: string;
102
90
  }
103
91
 
104
- /**
105
- * This file was automatically generated by json-schema-to-typescript.
106
- * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
107
- * and run json-schema-to-typescript to regenerate this file.
108
- */
92
+ /** Generated from src/utility/generateRuleOptionsTypes.ts.
93
+ * You may execute the above file to re-generate this type using `npm run generate-rule-options-types` */
109
94
  interface UseNormalizedImportsOptions {
110
95
  fixable?: boolean;
111
96
  }
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.1";
7
+ var version = "2.8.2";
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
 
@@ -65,47 +65,32 @@ declare const validTestFunctionsSchema: z.ZodEnum<{
65
65
  type TestFunction = z.infer<typeof validTestFunctionsSchema>;
66
66
  declare function parseTestFunction(data: unknown): TestFunction;
67
67
 
68
- /**
69
- * This file was automatically generated by json-schema-to-typescript.
70
- * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
71
- * and run json-schema-to-typescript to regenerate this file.
72
- */
68
+ /** Generated from src/utility/generateRuleOptionsTypes.ts.
69
+ * You may execute the above file to re-generate this type using `npm run generate-rule-options-types` */
73
70
  interface ConsistentTestFunctionOptions {
74
71
  preference?: "it" | "test";
75
72
  }
76
73
 
77
- /**
78
- * This file was automatically generated by json-schema-to-typescript.
79
- * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
80
- * and run json-schema-to-typescript to regenerate this file.
81
- */
74
+ /** Generated from src/utility/generateRuleOptionsTypes.ts.
75
+ * You may execute the above file to re-generate this type using `npm run generate-rule-options-types` */
82
76
  interface NoNamespaceImportsOptions {
83
77
  allow?: string[];
84
78
  }
85
79
 
86
- /**
87
- * This file was automatically generated by json-schema-to-typescript.
88
- * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
89
- * and run json-schema-to-typescript to regenerate this file.
90
- */
80
+ /** Generated from src/utility/generateRuleOptionsTypes.ts.
81
+ * You may execute the above file to re-generate this type using `npm run generate-rule-options-types` */
91
82
  interface NoRelativeImportsOptions {
92
83
  depth?: number;
93
84
  }
94
85
 
95
- /**
96
- * This file was automatically generated by json-schema-to-typescript.
97
- * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
98
- * and run json-schema-to-typescript to regenerate this file.
99
- */
86
+ /** Generated from src/utility/generateRuleOptionsTypes.ts.
87
+ * You may execute the above file to re-generate this type using `npm run generate-rule-options-types` */
100
88
  interface StandardiseErrorMessagesOptions {
101
89
  regex?: string;
102
90
  }
103
91
 
104
- /**
105
- * This file was automatically generated by json-schema-to-typescript.
106
- * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
107
- * and run json-schema-to-typescript to regenerate this file.
108
- */
92
+ /** Generated from src/utility/generateRuleOptionsTypes.ts.
93
+ * You may execute the above file to re-generate this type using `npm run generate-rule-options-types` */
109
94
  interface UseNormalizedImportsOptions {
110
95
  fixable?: boolean;
111
96
  }
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.1";
3746
+ var version = "2.8.2";
3747
3747
 
3748
3748
  // src/configs/index.ts
3749
3749
  import packageJson from "eslint-plugin-package-json";
@@ -3851,6 +3851,14 @@ var javaScriptLanguageOptions = {
3851
3851
  };
3852
3852
  var javaScriptLanguageOptions_default = javaScriptLanguageOptions;
3853
3853
 
3854
+ // src/configs/miscellaneous/unusedVarsIgnorePatterns.ts
3855
+ var unusedVarsIgnorePatterns = {
3856
+ argsIgnorePattern: "^_",
3857
+ caughtErrorsIgnorePattern: "^_",
3858
+ varsIgnorePattern: "^_"
3859
+ };
3860
+ var unusedVarsIgnorePatterns_default = unusedVarsIgnorePatterns;
3861
+
3854
3862
  // src/configs/general/javaScriptBase.ts
3855
3863
  var javaScriptBase = [
3856
3864
  import_js.default.configs.recommended,
@@ -3884,14 +3892,7 @@ var javaScriptBase = [
3884
3892
  }
3885
3893
  ],
3886
3894
  "no-undef": "error",
3887
- "no-unused-vars": [
3888
- "error",
3889
- {
3890
- argsIgnorePattern: "^_",
3891
- caughtErrorsIgnorePattern: "^_",
3892
- varsIgnorePattern: "^_"
3893
- }
3894
- ],
3895
+ "no-unused-vars": ["error", unusedVarsIgnorePatterns_default],
3895
3896
  "no-useless-rename": "error",
3896
3897
  "no-useless-return": "error",
3897
3898
  "prefer-const": "error"
@@ -4122,26 +4123,15 @@ var typeScriptBase = [
4122
4123
  "@typescript-eslint/explicit-member-accessibility": "error",
4123
4124
  "@typescript-eslint/no-deprecated": "warn",
4124
4125
  "@typescript-eslint/no-redeclare": ["error", { ignoreDeclarationMerge: true }],
4125
- "@typescript-eslint/no-unused-vars": [
4126
- "error",
4127
- {
4128
- argsIgnorePattern: "^_",
4129
- caughtErrorsIgnorePattern: "^_",
4130
- varsIgnorePattern: "^_"
4131
- }
4132
- ],
4126
+ "@typescript-eslint/no-unused-vars": ["error", unusedVarsIgnorePatterns_default],
4127
+ // Disable import/no-unresolved (enabled in general/javascript, being extended here) because the TypeScript compiler already catches unused imports for us.
4128
+ "import/no-unresolved": "off",
4133
4129
  // Disable regular no-redeclare in favour of TypeScript-specific version since that will flag type redeclarations when we do const MyType = {}; export type MyType = ...
4134
4130
  "no-redeclare": "off",
4135
4131
  // Disable no-undef because undefined variables tend to be better caught by the TypeScript compiler.
4136
4132
  "no-undef": "off",
4137
4133
  // Disable regular no-unused-vars rule since that will flag interface declarations. Only use the TypeScript specific rule for this.
4138
4134
  "no-unused-vars": "off"
4139
- },
4140
- settings: {
4141
- "import/resolver": {
4142
- node: true,
4143
- typescript: true
4144
- }
4145
4135
  }
4146
4136
  }
4147
4137
  ];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alextheman/eslint-plugin",
3
- "version": "2.8.1",
3
+ "version": "2.8.2",
4
4
  "description": "A package to provide custom ESLint rules and configs",
5
5
  "repository": {
6
6
  "type": "git",