@alextheman/eslint-plugin 5.12.0 → 5.13.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/README.md +1 -1
- package/dist/index.cjs +46 -146
- package/dist/index.d.cts +1 -6
- package/dist/index.d.ts +1 -6
- package/dist/index.js +41 -144
- package/dist/internal/index.cjs +11 -32
- package/dist/internal/index.js +10 -31
- package/dist/utility/index.cjs +8 -22
- package/dist/utility/index.js +1 -10
- package/package.json +24 -26
package/dist/internal/index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value:
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
//#region \0rolldown/runtime.js
|
|
3
3
|
var __create = Object.create;
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
@@ -8,16 +8,12 @@ var __getProtoOf = Object.getPrototypeOf;
|
|
|
8
8
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
9
|
var __commonJSMin = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
|
|
10
10
|
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
18
|
-
});
|
|
19
|
-
}
|
|
20
|
-
}
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
12
|
+
key = keys[i];
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
14
|
+
get: ((k) => from[k]).bind(null, key),
|
|
15
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
16
|
+
});
|
|
21
17
|
}
|
|
22
18
|
return to;
|
|
23
19
|
};
|
|
@@ -25,11 +21,9 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
25
21
|
value: mod,
|
|
26
22
|
enumerable: true
|
|
27
23
|
}) : target, mod));
|
|
28
|
-
|
|
29
24
|
//#endregion
|
|
30
25
|
let typescript_eslint = require("typescript-eslint");
|
|
31
26
|
typescript_eslint = __toESM(typescript_eslint);
|
|
32
|
-
|
|
33
27
|
//#region node_modules/.pnpm/globals@17.4.0/node_modules/globals/globals.json
|
|
34
28
|
var require_globals$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
35
29
|
module.exports = {
|
|
@@ -4054,22 +4048,13 @@ var require_globals$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
4054
4048
|
}
|
|
4055
4049
|
};
|
|
4056
4050
|
}));
|
|
4057
|
-
|
|
4058
|
-
//#endregion
|
|
4059
|
-
//#region node_modules/.pnpm/globals@17.4.0/node_modules/globals/index.js
|
|
4060
|
-
var require_globals = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
4061
|
-
module.exports = require_globals$1();
|
|
4062
|
-
}));
|
|
4063
|
-
|
|
4064
|
-
//#endregion
|
|
4065
|
-
//#region src/configs/helpers/reactLanguageOptions.ts
|
|
4066
|
-
var import_globals = /* @__PURE__ */ __toESM(require_globals(), 1);
|
|
4067
4051
|
const reactLanguageOptions = {
|
|
4068
4052
|
ecmaVersion: 2020,
|
|
4069
|
-
globals:
|
|
4053
|
+
globals: (/* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
4054
|
+
module.exports = require_globals$1();
|
|
4055
|
+
})))(), 1)).default.browser,
|
|
4070
4056
|
parserOptions: { ecmaFeatures: { jsx: true } }
|
|
4071
4057
|
};
|
|
4072
|
-
|
|
4073
4058
|
//#endregion
|
|
4074
4059
|
//#region src/configs/helpers/typeScriptLanguageOptions.ts
|
|
4075
4060
|
const typeScriptLanguageOptions = {
|
|
@@ -4081,7 +4066,6 @@ const typeScriptLanguageOptions = {
|
|
|
4081
4066
|
tsconfigRootDir: process.cwd()
|
|
4082
4067
|
}
|
|
4083
4068
|
};
|
|
4084
|
-
|
|
4085
4069
|
//#endregion
|
|
4086
4070
|
//#region src/configs/helpers/unusedVarsIgnorePatterns.ts
|
|
4087
4071
|
const unusedVarsIgnorePatterns = {
|
|
@@ -4089,7 +4073,6 @@ const unusedVarsIgnorePatterns = {
|
|
|
4089
4073
|
caughtErrorsIgnorePattern: "^_",
|
|
4090
4074
|
varsIgnorePattern: "^_"
|
|
4091
4075
|
};
|
|
4092
|
-
|
|
4093
4076
|
//#endregion
|
|
4094
4077
|
//#region src/configs/helpers/sorting/sortClasses.ts
|
|
4095
4078
|
const sortClasses = {
|
|
@@ -4116,7 +4099,6 @@ const sortClasses = {
|
|
|
4116
4099
|
specialCharacters: "keep",
|
|
4117
4100
|
type: "alphabetical"
|
|
4118
4101
|
};
|
|
4119
|
-
|
|
4120
4102
|
//#endregion
|
|
4121
4103
|
//#region src/configs/helpers/sorting/sortExports.ts
|
|
4122
4104
|
const sortExports = {
|
|
@@ -4136,7 +4118,6 @@ const sortExports = {
|
|
|
4136
4118
|
specialCharacters: "keep",
|
|
4137
4119
|
type: "alphabetical"
|
|
4138
4120
|
};
|
|
4139
|
-
|
|
4140
4121
|
//#endregion
|
|
4141
4122
|
//#region src/configs/helpers/sorting/sortImports.ts
|
|
4142
4123
|
const sortImports = {
|
|
@@ -4175,7 +4156,6 @@ const sortImports = {
|
|
|
4175
4156
|
specialCharacters: "keep",
|
|
4176
4157
|
type: "alphabetical"
|
|
4177
4158
|
};
|
|
4178
|
-
|
|
4179
4159
|
//#endregion
|
|
4180
4160
|
//#region src/configs/helpers/sorting/sortObjects.ts
|
|
4181
4161
|
const sortObjects = {
|
|
@@ -4192,7 +4172,6 @@ const sortObjects = {
|
|
|
4192
4172
|
type: "alphabetical",
|
|
4193
4173
|
useConfigurationIf: {}
|
|
4194
4174
|
};
|
|
4195
|
-
|
|
4196
4175
|
//#endregion
|
|
4197
4176
|
exports.reactLanguageOptions = reactLanguageOptions;
|
|
4198
4177
|
exports.sortClasses = sortClasses;
|
|
@@ -4200,4 +4179,4 @@ exports.sortExports = sortExports;
|
|
|
4200
4179
|
exports.sortImports = sortImports;
|
|
4201
4180
|
exports.sortObjects = sortObjects;
|
|
4202
4181
|
exports.typeScriptLanguageOptions = typeScriptLanguageOptions;
|
|
4203
|
-
exports.unusedVarsIgnorePatterns = unusedVarsIgnorePatterns;
|
|
4182
|
+
exports.unusedVarsIgnorePatterns = unusedVarsIgnorePatterns;
|
package/dist/internal/index.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import tseslint from "typescript-eslint";
|
|
2
|
-
|
|
3
2
|
//#region \0rolldown/runtime.js
|
|
4
3
|
var __create = Object.create;
|
|
5
4
|
var __defProp = Object.defineProperty;
|
|
@@ -9,16 +8,12 @@ var __getProtoOf = Object.getPrototypeOf;
|
|
|
9
8
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
10
9
|
var __commonJSMin = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
|
|
11
10
|
var __copyProps = (to, from, except, desc) => {
|
|
12
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
19
|
-
});
|
|
20
|
-
}
|
|
21
|
-
}
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
12
|
+
key = keys[i];
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
14
|
+
get: ((k) => from[k]).bind(null, key),
|
|
15
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
16
|
+
});
|
|
22
17
|
}
|
|
23
18
|
return to;
|
|
24
19
|
};
|
|
@@ -26,7 +21,6 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
26
21
|
value: mod,
|
|
27
22
|
enumerable: true
|
|
28
23
|
}) : target, mod));
|
|
29
|
-
|
|
30
24
|
//#endregion
|
|
31
25
|
//#region node_modules/.pnpm/globals@17.4.0/node_modules/globals/globals.json
|
|
32
26
|
var require_globals$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
@@ -4052,22 +4046,13 @@ var require_globals$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
4052
4046
|
}
|
|
4053
4047
|
};
|
|
4054
4048
|
}));
|
|
4055
|
-
|
|
4056
|
-
//#endregion
|
|
4057
|
-
//#region node_modules/.pnpm/globals@17.4.0/node_modules/globals/index.js
|
|
4058
|
-
var require_globals = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
4059
|
-
module.exports = require_globals$1();
|
|
4060
|
-
}));
|
|
4061
|
-
|
|
4062
|
-
//#endregion
|
|
4063
|
-
//#region src/configs/helpers/reactLanguageOptions.ts
|
|
4064
|
-
var import_globals = /* @__PURE__ */ __toESM(require_globals(), 1);
|
|
4065
4049
|
const reactLanguageOptions = {
|
|
4066
4050
|
ecmaVersion: 2020,
|
|
4067
|
-
globals:
|
|
4051
|
+
globals: (/* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
4052
|
+
module.exports = require_globals$1();
|
|
4053
|
+
})))(), 1)).default.browser,
|
|
4068
4054
|
parserOptions: { ecmaFeatures: { jsx: true } }
|
|
4069
4055
|
};
|
|
4070
|
-
|
|
4071
4056
|
//#endregion
|
|
4072
4057
|
//#region src/configs/helpers/typeScriptLanguageOptions.ts
|
|
4073
4058
|
const typeScriptLanguageOptions = {
|
|
@@ -4079,7 +4064,6 @@ const typeScriptLanguageOptions = {
|
|
|
4079
4064
|
tsconfigRootDir: process.cwd()
|
|
4080
4065
|
}
|
|
4081
4066
|
};
|
|
4082
|
-
|
|
4083
4067
|
//#endregion
|
|
4084
4068
|
//#region src/configs/helpers/unusedVarsIgnorePatterns.ts
|
|
4085
4069
|
const unusedVarsIgnorePatterns = {
|
|
@@ -4087,7 +4071,6 @@ const unusedVarsIgnorePatterns = {
|
|
|
4087
4071
|
caughtErrorsIgnorePattern: "^_",
|
|
4088
4072
|
varsIgnorePattern: "^_"
|
|
4089
4073
|
};
|
|
4090
|
-
|
|
4091
4074
|
//#endregion
|
|
4092
4075
|
//#region src/configs/helpers/sorting/sortClasses.ts
|
|
4093
4076
|
const sortClasses = {
|
|
@@ -4114,7 +4097,6 @@ const sortClasses = {
|
|
|
4114
4097
|
specialCharacters: "keep",
|
|
4115
4098
|
type: "alphabetical"
|
|
4116
4099
|
};
|
|
4117
|
-
|
|
4118
4100
|
//#endregion
|
|
4119
4101
|
//#region src/configs/helpers/sorting/sortExports.ts
|
|
4120
4102
|
const sortExports = {
|
|
@@ -4134,7 +4116,6 @@ const sortExports = {
|
|
|
4134
4116
|
specialCharacters: "keep",
|
|
4135
4117
|
type: "alphabetical"
|
|
4136
4118
|
};
|
|
4137
|
-
|
|
4138
4119
|
//#endregion
|
|
4139
4120
|
//#region src/configs/helpers/sorting/sortImports.ts
|
|
4140
4121
|
const sortImports = {
|
|
@@ -4173,7 +4154,6 @@ const sortImports = {
|
|
|
4173
4154
|
specialCharacters: "keep",
|
|
4174
4155
|
type: "alphabetical"
|
|
4175
4156
|
};
|
|
4176
|
-
|
|
4177
4157
|
//#endregion
|
|
4178
4158
|
//#region src/configs/helpers/sorting/sortObjects.ts
|
|
4179
4159
|
const sortObjects = {
|
|
@@ -4190,6 +4170,5 @@ const sortObjects = {
|
|
|
4190
4170
|
type: "alphabetical",
|
|
4191
4171
|
useConfigurationIf: {}
|
|
4192
4172
|
};
|
|
4193
|
-
|
|
4194
4173
|
//#endregion
|
|
4195
|
-
export { reactLanguageOptions, sortClasses, sortExports, sortImports, sortObjects, typeScriptLanguageOptions, unusedVarsIgnorePatterns };
|
|
4174
|
+
export { reactLanguageOptions, sortClasses, sortExports, sortImports, sortObjects, typeScriptLanguageOptions, unusedVarsIgnorePatterns };
|
package/dist/utility/index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value:
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
//#region \0rolldown/runtime.js
|
|
3
3
|
var __create = Object.create;
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
@@ -7,16 +7,12 @@ var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
|
7
7
|
var __getProtoOf = Object.getPrototypeOf;
|
|
8
8
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
9
|
var __copyProps = (to, from, except, desc) => {
|
|
10
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
17
|
-
});
|
|
18
|
-
}
|
|
19
|
-
}
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
11
|
+
key = keys[i];
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
13
|
+
get: ((k) => from[k]).bind(null, key),
|
|
14
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
15
|
+
});
|
|
20
16
|
}
|
|
21
17
|
return to;
|
|
22
18
|
};
|
|
@@ -24,13 +20,11 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
24
20
|
value: mod,
|
|
25
21
|
enumerable: true
|
|
26
22
|
}) : target, mod));
|
|
27
|
-
|
|
28
23
|
//#endregion
|
|
29
24
|
let _typescript_eslint_utils = require("@typescript-eslint/utils");
|
|
30
25
|
let _alextheman_utility = require("@alextheman/utility");
|
|
31
26
|
let zod = require("zod");
|
|
32
27
|
zod = __toESM(zod);
|
|
33
|
-
|
|
34
28
|
//#region src/utility/public/checkCallExpression.ts
|
|
35
29
|
/**
|
|
36
30
|
* Checks if a given node matches the expected object and property names.
|
|
@@ -46,7 +40,6 @@ zod = __toESM(zod);
|
|
|
46
40
|
function checkCallExpression(node, objectName, propertyName) {
|
|
47
41
|
return node.callee.type === _typescript_eslint_utils.AST_NODE_TYPES.MemberExpression && node.callee.object.type === _typescript_eslint_utils.AST_NODE_TYPES.Identifier && node.callee.object.name === objectName && node.callee.property.type === _typescript_eslint_utils.AST_NODE_TYPES.Identifier && node.callee.property.name === propertyName;
|
|
48
42
|
}
|
|
49
|
-
|
|
50
43
|
//#endregion
|
|
51
44
|
//#region src/utility/public/combineRestrictedImports.ts
|
|
52
45
|
/**
|
|
@@ -73,7 +66,6 @@ function combineRestrictedImports(...groups) {
|
|
|
73
66
|
if (combinedGroup.patterns.length === 0) return (0, _alextheman_utility.omitProperties)(combinedGroup, "patterns");
|
|
74
67
|
return combinedGroup;
|
|
75
68
|
}
|
|
76
|
-
|
|
77
69
|
//#endregion
|
|
78
70
|
//#region src/utility/public/createRuleSchemaFromZodSchema.ts
|
|
79
71
|
/**
|
|
@@ -88,7 +80,6 @@ function combineRestrictedImports(...groups) {
|
|
|
88
80
|
function createRuleSchemaFromZodSchema(schema) {
|
|
89
81
|
return [(0, _alextheman_utility.omitProperties)(zod.default.toJSONSchema(schema), "$schema")];
|
|
90
82
|
}
|
|
91
|
-
|
|
92
83
|
//#endregion
|
|
93
84
|
//#region src/utility/public/fixOnCondition.ts
|
|
94
85
|
/**
|
|
@@ -107,14 +98,12 @@ function fixOnCondition(fixable, fix) {
|
|
|
107
98
|
return fix(fixer);
|
|
108
99
|
};
|
|
109
100
|
}
|
|
110
|
-
|
|
111
101
|
//#endregion
|
|
112
102
|
//#region src/utility/private/camelToKebab.ts
|
|
113
103
|
function camelToKebab(string) {
|
|
114
104
|
if (string[0] === string[0].toUpperCase()) throw new _alextheman_utility.DataError({ string }, "CAMEL_TO_KEBAB_CONVERSION_ERROR", "camelCase string must start with a lowercase letter.");
|
|
115
105
|
return (0, _alextheman_utility.camelToKebab)(string, { preserveConsecutiveCapitals: false });
|
|
116
106
|
}
|
|
117
|
-
|
|
118
107
|
//#endregion
|
|
119
108
|
//#region src/utility/private/createConfigGroup.ts
|
|
120
109
|
function createConfigGroup(group, configs) {
|
|
@@ -122,7 +111,6 @@ function createConfigGroup(group, configs) {
|
|
|
122
111
|
for (const key in configs) newConfigs[`${camelToKebab(group)}/${camelToKebab(key)}`] = configs[key];
|
|
123
112
|
return newConfigs;
|
|
124
113
|
}
|
|
125
|
-
|
|
126
114
|
//#endregion
|
|
127
115
|
//#region src/utility/public/flattenConfigs.ts
|
|
128
116
|
/**
|
|
@@ -167,7 +155,6 @@ function flattenConfigs(config) {
|
|
|
167
155
|
for (const configGroupEntries of Object.entries(config)) Object.assign(allConfigs, createConfigGroup(...configGroupEntries));
|
|
168
156
|
return allConfigs;
|
|
169
157
|
}
|
|
170
|
-
|
|
171
158
|
//#endregion
|
|
172
159
|
//#region src/utility/public/getImportSpecifiersAfterRemoving.ts
|
|
173
160
|
/**
|
|
@@ -192,11 +179,10 @@ function getImportSpecifiersAfterRemoving(context, specifiers, importToRemove) {
|
|
|
192
179
|
return context.sourceCode.getText(specifier);
|
|
193
180
|
}).join(", ");
|
|
194
181
|
}
|
|
195
|
-
|
|
196
182
|
//#endregion
|
|
197
183
|
exports.checkCallExpression = checkCallExpression;
|
|
198
184
|
exports.combineRestrictedImports = combineRestrictedImports;
|
|
199
185
|
exports.createRuleSchemaFromZodSchema = createRuleSchemaFromZodSchema;
|
|
200
186
|
exports.fixOnCondition = fixOnCondition;
|
|
201
187
|
exports.flattenConfigs = flattenConfigs;
|
|
202
|
-
exports.getImportSpecifiersAfterRemoving = getImportSpecifiersAfterRemoving;
|
|
188
|
+
exports.getImportSpecifiersAfterRemoving = getImportSpecifiersAfterRemoving;
|
package/dist/utility/index.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { AST_NODE_TYPES } from "@typescript-eslint/utils";
|
|
2
2
|
import { DataError, camelToKebab, omitProperties } from "@alextheman/utility";
|
|
3
3
|
import z from "zod";
|
|
4
|
-
|
|
5
4
|
//#region src/utility/public/checkCallExpression.ts
|
|
6
5
|
/**
|
|
7
6
|
* Checks if a given node matches the expected object and property names.
|
|
@@ -17,7 +16,6 @@ import z from "zod";
|
|
|
17
16
|
function checkCallExpression(node, objectName, propertyName) {
|
|
18
17
|
return node.callee.type === AST_NODE_TYPES.MemberExpression && node.callee.object.type === AST_NODE_TYPES.Identifier && node.callee.object.name === objectName && node.callee.property.type === AST_NODE_TYPES.Identifier && node.callee.property.name === propertyName;
|
|
19
18
|
}
|
|
20
|
-
|
|
21
19
|
//#endregion
|
|
22
20
|
//#region src/utility/public/combineRestrictedImports.ts
|
|
23
21
|
/**
|
|
@@ -44,7 +42,6 @@ function combineRestrictedImports(...groups) {
|
|
|
44
42
|
if (combinedGroup.patterns.length === 0) return omitProperties(combinedGroup, "patterns");
|
|
45
43
|
return combinedGroup;
|
|
46
44
|
}
|
|
47
|
-
|
|
48
45
|
//#endregion
|
|
49
46
|
//#region src/utility/public/createRuleSchemaFromZodSchema.ts
|
|
50
47
|
/**
|
|
@@ -59,7 +56,6 @@ function combineRestrictedImports(...groups) {
|
|
|
59
56
|
function createRuleSchemaFromZodSchema(schema) {
|
|
60
57
|
return [omitProperties(z.toJSONSchema(schema), "$schema")];
|
|
61
58
|
}
|
|
62
|
-
|
|
63
59
|
//#endregion
|
|
64
60
|
//#region src/utility/public/fixOnCondition.ts
|
|
65
61
|
/**
|
|
@@ -78,14 +74,12 @@ function fixOnCondition(fixable, fix) {
|
|
|
78
74
|
return fix(fixer);
|
|
79
75
|
};
|
|
80
76
|
}
|
|
81
|
-
|
|
82
77
|
//#endregion
|
|
83
78
|
//#region src/utility/private/camelToKebab.ts
|
|
84
79
|
function camelToKebab$1(string) {
|
|
85
80
|
if (string[0] === string[0].toUpperCase()) throw new DataError({ string }, "CAMEL_TO_KEBAB_CONVERSION_ERROR", "camelCase string must start with a lowercase letter.");
|
|
86
81
|
return camelToKebab(string, { preserveConsecutiveCapitals: false });
|
|
87
82
|
}
|
|
88
|
-
|
|
89
83
|
//#endregion
|
|
90
84
|
//#region src/utility/private/createConfigGroup.ts
|
|
91
85
|
function createConfigGroup(group, configs) {
|
|
@@ -93,7 +87,6 @@ function createConfigGroup(group, configs) {
|
|
|
93
87
|
for (const key in configs) newConfigs[`${camelToKebab$1(group)}/${camelToKebab$1(key)}`] = configs[key];
|
|
94
88
|
return newConfigs;
|
|
95
89
|
}
|
|
96
|
-
|
|
97
90
|
//#endregion
|
|
98
91
|
//#region src/utility/public/flattenConfigs.ts
|
|
99
92
|
/**
|
|
@@ -138,7 +131,6 @@ function flattenConfigs(config) {
|
|
|
138
131
|
for (const configGroupEntries of Object.entries(config)) Object.assign(allConfigs, createConfigGroup(...configGroupEntries));
|
|
139
132
|
return allConfigs;
|
|
140
133
|
}
|
|
141
|
-
|
|
142
134
|
//#endregion
|
|
143
135
|
//#region src/utility/public/getImportSpecifiersAfterRemoving.ts
|
|
144
136
|
/**
|
|
@@ -163,6 +155,5 @@ function getImportSpecifiersAfterRemoving(context, specifiers, importToRemove) {
|
|
|
163
155
|
return context.sourceCode.getText(specifier);
|
|
164
156
|
}).join(", ");
|
|
165
157
|
}
|
|
166
|
-
|
|
167
158
|
//#endregion
|
|
168
|
-
export { checkCallExpression, combineRestrictedImports, createRuleSchemaFromZodSchema, fixOnCondition, flattenConfigs, getImportSpecifiersAfterRemoving };
|
|
159
|
+
export { checkCallExpression, combineRestrictedImports, createRuleSchemaFromZodSchema, fixOnCondition, flattenConfigs, getImportSpecifiersAfterRemoving };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alextheman/eslint-plugin",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.13.0",
|
|
4
4
|
"description": "A package to provide custom ESLint rules and configs.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -34,12 +34,12 @@
|
|
|
34
34
|
"dist"
|
|
35
35
|
],
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@alextheman/utility": "5.
|
|
38
|
-
"@eslint/compat": "2.0.
|
|
39
|
-
"@typescript-eslint/types": "8.58.
|
|
40
|
-
"@typescript-eslint/utils": "8.58.
|
|
37
|
+
"@alextheman/utility": "5.11.0",
|
|
38
|
+
"@eslint/compat": "2.0.5",
|
|
39
|
+
"@typescript-eslint/types": "8.58.1",
|
|
40
|
+
"@typescript-eslint/utils": "8.58.1",
|
|
41
41
|
"common-tags": "1.8.2",
|
|
42
|
-
"prettier": "3.8.
|
|
42
|
+
"prettier": "3.8.2",
|
|
43
43
|
"zod": "4.3.6"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
@@ -47,16 +47,17 @@
|
|
|
47
47
|
"@types/common-tags": "1.8.4",
|
|
48
48
|
"@types/eslint": "9.6.1",
|
|
49
49
|
"@types/eslint-plugin-jsx-a11y": "6.10.1",
|
|
50
|
-
"@types/node": "25.
|
|
51
|
-
"@typescript-eslint/rule-tester": "8.58.
|
|
52
|
-
"alex-c-line": "2.
|
|
50
|
+
"@types/node": "25.6.0",
|
|
51
|
+
"@typescript-eslint/rule-tester": "8.58.1",
|
|
52
|
+
"alex-c-line": "2.6.1",
|
|
53
53
|
"dotenv-cli": "11.0.0",
|
|
54
54
|
"eslint": "10.2.0",
|
|
55
55
|
"eslint-config-prettier": "10.1.8",
|
|
56
56
|
"eslint-import-resolver-typescript": "4.4.4",
|
|
57
|
-
"eslint-plugin-import": "
|
|
57
|
+
"eslint-plugin-import-x": "4.16.2",
|
|
58
58
|
"eslint-plugin-jsdoc": "62.9.0",
|
|
59
59
|
"eslint-plugin-jsx-a11y": "6.10.2",
|
|
60
|
+
"eslint-plugin-markdownlint": "0.9.0",
|
|
60
61
|
"eslint-plugin-n": "17.24.0",
|
|
61
62
|
"eslint-plugin-package-json": "0.91.1",
|
|
62
63
|
"eslint-plugin-perfectionist": "5.8.0",
|
|
@@ -68,26 +69,25 @@
|
|
|
68
69
|
"execa": "9.6.1",
|
|
69
70
|
"globals": "17.4.0",
|
|
70
71
|
"husky": "9.1.7",
|
|
71
|
-
"jsdom": "29.0.
|
|
72
|
+
"jsdom": "29.0.2",
|
|
73
|
+
"markdownlint-cli2": "0.22.0",
|
|
72
74
|
"tempy": "3.2.0",
|
|
73
|
-
"tsdown": "0.
|
|
75
|
+
"tsdown": "0.21.7",
|
|
74
76
|
"tsx": "4.21.0",
|
|
75
|
-
"typedoc": "0.28.18",
|
|
76
|
-
"typedoc-plugin-markdown": "4.11.0",
|
|
77
|
-
"typedoc-rhineai-theme": "1.2.0",
|
|
78
77
|
"typescript": "6.0.2",
|
|
79
|
-
"typescript-eslint": "8.58.
|
|
80
|
-
"vite": "8.0.
|
|
81
|
-
"vitest": "4.1.
|
|
78
|
+
"typescript-eslint": "8.58.1",
|
|
79
|
+
"vite": "8.0.8",
|
|
80
|
+
"vitest": "4.1.4"
|
|
82
81
|
},
|
|
83
82
|
"peerDependencies": {
|
|
84
83
|
"@eslint/js": ">=9.0.0",
|
|
85
84
|
"eslint": ">=9.0.0",
|
|
86
85
|
"eslint-config-prettier": ">=10.0.0",
|
|
87
|
-
"eslint-import-resolver-typescript": "
|
|
88
|
-
"eslint-plugin-import": ">=
|
|
86
|
+
"eslint-import-resolver-typescript": "4.4.4",
|
|
87
|
+
"eslint-plugin-import-x": ">=4.16.2",
|
|
89
88
|
"eslint-plugin-jsdoc": ">=61.5.0",
|
|
90
89
|
"eslint-plugin-jsx-a11y": ">=6.0.0",
|
|
90
|
+
"eslint-plugin-markdownlint": "0.9.0",
|
|
91
91
|
"eslint-plugin-n": ">=17.23.1",
|
|
92
92
|
"eslint-plugin-package-json": ">=0.85.0",
|
|
93
93
|
"eslint-plugin-perfectionist": ">=5.0.0",
|
|
@@ -95,26 +95,24 @@
|
|
|
95
95
|
"eslint-plugin-react": ">=7.0.0",
|
|
96
96
|
"eslint-plugin-react-hooks": ">=7.0.0",
|
|
97
97
|
"eslint-plugin-react-refresh": ">=0.4.0",
|
|
98
|
-
"typedoc": ">=0.28.15",
|
|
99
|
-
"typedoc-plugin-markdown": ">=4.9.0",
|
|
100
|
-
"typedoc-rhineai-theme": ">=1.2.0",
|
|
101
98
|
"typescript-eslint": ">=8.0.0"
|
|
102
99
|
},
|
|
103
100
|
"scripts": {
|
|
104
101
|
"build": "tsdown",
|
|
105
|
-
"create-feature-docs": "typedoc",
|
|
106
102
|
"create-local-package": "pnpm run build && rm -f alextheman-eslint-plugin-*.tgz && pnpm pack",
|
|
107
103
|
"create-release-note": "bash -c 'git pull origin main && alex-c-line template release-note create $@' --",
|
|
108
|
-
"format": "pnpm run format-prettier && pnpm run format-eslint",
|
|
104
|
+
"format": "pnpm run format-prettier && pnpm run format-eslint && pnpm run format-markdownlint",
|
|
109
105
|
"format-and-build": "tsx src/utility/checkConfigChanges.ts || pnpm run build && pnpm run format",
|
|
110
106
|
"format-eslint": "eslint --fix --suppress-all \"{src,tests}/**/*.ts\" \"package.json\" && rm -f eslint-suppressions.json",
|
|
107
|
+
"format-markdownlint": "markdownlint-cli2 --fix \"**/*.md\" \"!{node_modules,dist}/**\" | grep -v \"^Finding:\"",
|
|
111
108
|
"format-prettier": "pnpm run format-prettier-typescript && pnpm run format-prettier-javascript && pnpm run format-prettier-yml",
|
|
112
109
|
"format-prettier-javascript": "prettier --write \"./**/*.js\"",
|
|
113
110
|
"format-prettier-typescript": "prettier --write --parser typescript \"./**/*.ts\"",
|
|
114
111
|
"format-prettier-yml": "prettier --write \"./**/*.yml\"",
|
|
115
|
-
"lint": "pnpm run lint-tsc && pnpm run lint-eslint && pnpm run lint-prettier && pnpm run lint-pre-release",
|
|
112
|
+
"lint": "pnpm run lint-tsc && pnpm run lint-eslint && pnpm run lint-markdownlint && pnpm run lint-prettier && pnpm run lint-pre-release",
|
|
116
113
|
"lint-and-build": "tsx src/utility/checkConfigChanges.ts || pnpm run build && pnpm run lint",
|
|
117
114
|
"lint-eslint": "eslint \"{src,tests}/**/*.ts\" \"package.json\"",
|
|
115
|
+
"lint-markdownlint": "bash -o pipefail -c 'pnpm exec markdownlint-cli2 \"**/*.md\" \"!{node_modules,dist}/**\" | grep -v \"^Finding:\"'",
|
|
118
116
|
"lint-pre-release": "alex-c-line package-json check --rules no-pre-release-dependencies",
|
|
119
117
|
"lint-prettier": "pnpm run lint-prettier-typescript && pnpm run lint-prettier-javascript && pnpm run lint-prettier-yml",
|
|
120
118
|
"lint-prettier-javascript": "prettier --check \"./**/*.js\"",
|