@alextheman/eslint-plugin 5.4.3 → 5.5.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 +67 -12
- package/dist/index.d.cts +586 -1
- package/dist/index.d.ts +586 -1
- package/dist/index.js +67 -12
- package/dist/utility/index.d.cts +0 -1
- package/dist/utility/index.d.ts +0 -1
- package/package.json +17 -22
package/dist/index.cjs
CHANGED
|
@@ -61,7 +61,7 @@ eslint_plugin_package_json = __toESM(eslint_plugin_package_json);
|
|
|
61
61
|
let eslint_plugin_jsdoc = require("eslint-plugin-jsdoc");
|
|
62
62
|
eslint_plugin_jsdoc = __toESM(eslint_plugin_jsdoc);
|
|
63
63
|
|
|
64
|
-
//#region node_modules/.pnpm/globals@17.
|
|
64
|
+
//#region node_modules/.pnpm/globals@17.1.0/node_modules/globals/globals.json
|
|
65
65
|
var require_globals$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
66
66
|
module.exports = {
|
|
67
67
|
"amd": {
|
|
@@ -2961,6 +2961,28 @@ var require_globals$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
2961
2961
|
"toint32": false,
|
|
2962
2962
|
"version": false
|
|
2963
2963
|
},
|
|
2964
|
+
"rspack": {
|
|
2965
|
+
"__non_webpack_require__": false,
|
|
2966
|
+
"__resourceQuery": false,
|
|
2967
|
+
"__rspack_unique_id__": false,
|
|
2968
|
+
"__rspack_version__": false,
|
|
2969
|
+
"__system_context__": false,
|
|
2970
|
+
"__webpack_base_uri__": true,
|
|
2971
|
+
"__webpack_chunk_load__": true,
|
|
2972
|
+
"__webpack_chunkname__": false,
|
|
2973
|
+
"__webpack_exports_info__": false,
|
|
2974
|
+
"__webpack_get_script_filename__": true,
|
|
2975
|
+
"__webpack_hash__": false,
|
|
2976
|
+
"__webpack_init_sharing__": false,
|
|
2977
|
+
"__webpack_is_included__": false,
|
|
2978
|
+
"__webpack_module__": false,
|
|
2979
|
+
"__webpack_modules__": false,
|
|
2980
|
+
"__webpack_nonce__": true,
|
|
2981
|
+
"__webpack_public_path__": true,
|
|
2982
|
+
"__webpack_require__": false,
|
|
2983
|
+
"__webpack_runtime_id__": false,
|
|
2984
|
+
"__webpack_share_scopes__": false
|
|
2985
|
+
},
|
|
2964
2986
|
"serviceworker": {
|
|
2965
2987
|
"AbortController": false,
|
|
2966
2988
|
"AbortPaymentEvent": false,
|
|
@@ -3687,6 +3709,21 @@ var require_globals$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
3687
3709
|
"chrome": false,
|
|
3688
3710
|
"opr": false
|
|
3689
3711
|
},
|
|
3712
|
+
"webpack": {
|
|
3713
|
+
"__non_webpack_require__": false,
|
|
3714
|
+
"__resourceQuery": false,
|
|
3715
|
+
"__webpack_base_uri__": true,
|
|
3716
|
+
"__webpack_chunk_load__": true,
|
|
3717
|
+
"__webpack_exports_info__": false,
|
|
3718
|
+
"__webpack_get_script_filename__": true,
|
|
3719
|
+
"__webpack_hash__": false,
|
|
3720
|
+
"__webpack_is_included__": false,
|
|
3721
|
+
"__webpack_module__": false,
|
|
3722
|
+
"__webpack_modules__": false,
|
|
3723
|
+
"__webpack_public_path__": true,
|
|
3724
|
+
"__webpack_require__": false,
|
|
3725
|
+
"__webpack_runtime_id__": false
|
|
3726
|
+
},
|
|
3690
3727
|
"worker": {
|
|
3691
3728
|
"AbortController": false,
|
|
3692
3729
|
"AbortSignal": false,
|
|
@@ -4034,7 +4071,7 @@ var require_globals$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
4034
4071
|
}));
|
|
4035
4072
|
|
|
4036
4073
|
//#endregion
|
|
4037
|
-
//#region node_modules/.pnpm/globals@17.
|
|
4074
|
+
//#region node_modules/.pnpm/globals@17.1.0/node_modules/globals/index.js
|
|
4038
4075
|
var require_globals = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
4039
4076
|
module.exports = require_globals$1();
|
|
4040
4077
|
}));
|
|
@@ -4105,8 +4142,8 @@ var combineRestrictedImports_default = combineRestrictedImports;
|
|
|
4105
4142
|
*
|
|
4106
4143
|
* @returns An array containing the resulting JSON Schema, formatted for ESLint rule schema compatibility.
|
|
4107
4144
|
*/
|
|
4108
|
-
function createRuleSchemaFromZodSchema(schema
|
|
4109
|
-
return [(0, _alextheman_utility.omitProperties)(zod.default.toJSONSchema(schema
|
|
4145
|
+
function createRuleSchemaFromZodSchema(schema) {
|
|
4146
|
+
return [(0, _alextheman_utility.omitProperties)(zod.default.toJSONSchema(schema), "$schema")];
|
|
4110
4147
|
}
|
|
4111
4148
|
var createRuleSchemaFromZodSchema_default = createRuleSchemaFromZodSchema;
|
|
4112
4149
|
|
|
@@ -4340,6 +4377,7 @@ const generalJavaScript = [
|
|
|
4340
4377
|
},
|
|
4341
4378
|
rules: {
|
|
4342
4379
|
eqeqeq: "error",
|
|
4380
|
+
"import/no-duplicates": ["error", { "prefer-inline": false }],
|
|
4343
4381
|
"import/no-unresolved": "error",
|
|
4344
4382
|
"n/file-extension-in-import": [
|
|
4345
4383
|
"error",
|
|
@@ -4551,6 +4589,22 @@ const sortObjects = {
|
|
|
4551
4589
|
};
|
|
4552
4590
|
var sortObjects_default = sortObjects;
|
|
4553
4591
|
|
|
4592
|
+
//#endregion
|
|
4593
|
+
//#region src/configs/helpers/sorting/sortNamedImports.ts
|
|
4594
|
+
const sortNamedImports = {
|
|
4595
|
+
fallbackSort: { type: "unsorted" },
|
|
4596
|
+
ignoreAlias: false,
|
|
4597
|
+
ignoreCase: true,
|
|
4598
|
+
newlinesBetween: "ignore",
|
|
4599
|
+
newlinesInside: "ignore",
|
|
4600
|
+
order: "asc",
|
|
4601
|
+
partitionByComment: false,
|
|
4602
|
+
partitionByNewLine: false,
|
|
4603
|
+
specialCharacters: "keep",
|
|
4604
|
+
type: "alphabetical"
|
|
4605
|
+
};
|
|
4606
|
+
var sortNamedImports_default = sortNamedImports;
|
|
4607
|
+
|
|
4554
4608
|
//#endregion
|
|
4555
4609
|
//#region src/configs/personal/javaScriptBase.ts
|
|
4556
4610
|
function personalJavaScript(plugin) {
|
|
@@ -4583,6 +4637,7 @@ function personalJavaScript(plugin) {
|
|
|
4583
4637
|
"perfectionist/sort-classes": ["error", sortClasses_default],
|
|
4584
4638
|
"perfectionist/sort-exports": ["error", sortExports_default],
|
|
4585
4639
|
"perfectionist/sort-imports": ["error", sortImports_default],
|
|
4640
|
+
"perfectionist/sort-named-imports": ["error", sortNamedImports_default],
|
|
4586
4641
|
"prefer-arrow-callback": ["error", { allowNamedFunctions: false }],
|
|
4587
4642
|
"prefer-destructuring": "error",
|
|
4588
4643
|
"prefer-template": "error",
|
|
@@ -4724,7 +4779,7 @@ const generalTypeScript = [
|
|
|
4724
4779
|
name: "@alextheman/general/typescript",
|
|
4725
4780
|
rules: {
|
|
4726
4781
|
"@typescript-eslint/consistent-type-exports": "error",
|
|
4727
|
-
"@typescript-eslint/consistent-type-imports": "error",
|
|
4782
|
+
"@typescript-eslint/consistent-type-imports": ["error", { fixStyle: "separate-type-imports" }],
|
|
4728
4783
|
"@typescript-eslint/explicit-member-accessibility": "error",
|
|
4729
4784
|
"@typescript-eslint/no-deprecated": "warn",
|
|
4730
4785
|
"@typescript-eslint/no-redeclare": ["error", { ignoreDeclarationMerge: true }],
|
|
@@ -4809,10 +4864,10 @@ const eslintPluginRestrictedImports = combineRestrictedImports_default(generalRe
|
|
|
4809
4864
|
message: "Do not import the plugin directly from the config files. Please create a function that takes in the plugin and returns the config instead.",
|
|
4810
4865
|
name: "src/alexPlugin"
|
|
4811
4866
|
},
|
|
4812
|
-
...["src/index", "src"].map((name
|
|
4867
|
+
...["src/index", "src"].map((name) => {
|
|
4813
4868
|
return {
|
|
4814
4869
|
message: "Do not import directly from the index file.",
|
|
4815
|
-
name
|
|
4870
|
+
name
|
|
4816
4871
|
};
|
|
4817
4872
|
}),
|
|
4818
4873
|
{
|
|
@@ -5116,8 +5171,8 @@ const consistentTestFunction = createRule_default({
|
|
|
5116
5171
|
preference
|
|
5117
5172
|
},
|
|
5118
5173
|
fix: fixOnCondition_default(fixable, (fixer) => {
|
|
5119
|
-
const importedNames = node.specifiers.map((specifier
|
|
5120
|
-
return specifier
|
|
5174
|
+
const importedNames = node.specifiers.map((specifier) => {
|
|
5175
|
+
return specifier.type === _typescript_eslint_utils.AST_NODE_TYPES.ImportSpecifier && specifier.imported.type === _typescript_eslint_utils.AST_NODE_TYPES.Identifier ? specifier.imported.name : "";
|
|
5121
5176
|
});
|
|
5122
5177
|
if (importedNames.includes("it") && importedNames.includes("test")) {
|
|
5123
5178
|
const newSpecifiers = getImportSpecifiersAfterRemoving_default(context, node.specifiers, "it");
|
|
@@ -5134,8 +5189,8 @@ const consistentTestFunction = createRule_default({
|
|
|
5134
5189
|
preference
|
|
5135
5190
|
},
|
|
5136
5191
|
fix: fixOnCondition_default(fixable, (fixer) => {
|
|
5137
|
-
const importedNames = node.specifiers.map((specifier
|
|
5138
|
-
return specifier
|
|
5192
|
+
const importedNames = node.specifiers.map((specifier) => {
|
|
5193
|
+
return specifier.type === _typescript_eslint_utils.AST_NODE_TYPES.ImportSpecifier && specifier.imported.type === _typescript_eslint_utils.AST_NODE_TYPES.Identifier ? specifier.imported.name : "";
|
|
5139
5194
|
});
|
|
5140
5195
|
if (importedNames.includes("it") && importedNames.includes("test")) {
|
|
5141
5196
|
const newSpecifiers = getImportSpecifiersAfterRemoving_default(context, node.specifiers, "test");
|
|
@@ -5454,7 +5509,7 @@ var rules_default = {
|
|
|
5454
5509
|
//#endregion
|
|
5455
5510
|
//#region package.json
|
|
5456
5511
|
var name = "@alextheman/eslint-plugin";
|
|
5457
|
-
var version = "5.
|
|
5512
|
+
var version = "5.5.0";
|
|
5458
5513
|
|
|
5459
5514
|
//#endregion
|
|
5460
5515
|
//#region src/alexPlugin.ts
|