@alextheman/eslint-plugin 5.5.2 → 5.6.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 +195 -243
- package/dist/index.d.cts +5 -5
- package/dist/index.d.ts +5 -5
- package/dist/index.js +189 -237
- package/dist/utility/index.cjs +10 -17
- package/dist/utility/index.js +3 -11
- package/package.json +16 -15
package/dist/utility/index.cjs
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
//#region \0rolldown/runtime.js
|
|
2
3
|
var __create = Object.create;
|
|
3
4
|
var __defProp = Object.defineProperty;
|
|
4
5
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
@@ -45,7 +46,6 @@ zod = __toESM(zod);
|
|
|
45
46
|
function checkCallExpression(node, objectName, propertyName) {
|
|
46
47
|
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;
|
|
47
48
|
}
|
|
48
|
-
var checkCallExpression_default = checkCallExpression;
|
|
49
49
|
|
|
50
50
|
//#endregion
|
|
51
51
|
//#region src/utility/public/combineRestrictedImports.ts
|
|
@@ -73,7 +73,6 @@ function combineRestrictedImports(...groups) {
|
|
|
73
73
|
if (combinedGroup.patterns.length === 0) return (0, _alextheman_utility.omitProperties)(combinedGroup, "patterns");
|
|
74
74
|
return combinedGroup;
|
|
75
75
|
}
|
|
76
|
-
var combineRestrictedImports_default = combineRestrictedImports;
|
|
77
76
|
|
|
78
77
|
//#endregion
|
|
79
78
|
//#region src/utility/public/createRuleSchemaFromZodSchema.ts
|
|
@@ -89,7 +88,6 @@ var combineRestrictedImports_default = combineRestrictedImports;
|
|
|
89
88
|
function createRuleSchemaFromZodSchema(schema) {
|
|
90
89
|
return [(0, _alextheman_utility.omitProperties)(zod.default.toJSONSchema(schema), "$schema")];
|
|
91
90
|
}
|
|
92
|
-
var createRuleSchemaFromZodSchema_default = createRuleSchemaFromZodSchema;
|
|
93
91
|
|
|
94
92
|
//#endregion
|
|
95
93
|
//#region src/utility/public/fixOnCondition.ts
|
|
@@ -109,7 +107,6 @@ function fixOnCondition(fixable, fix) {
|
|
|
109
107
|
return fix(fixer);
|
|
110
108
|
};
|
|
111
109
|
}
|
|
112
|
-
var fixOnCondition_default = fixOnCondition;
|
|
113
110
|
|
|
114
111
|
//#endregion
|
|
115
112
|
//#region src/utility/private/camelToKebab.ts
|
|
@@ -117,16 +114,14 @@ function camelToKebab(string) {
|
|
|
117
114
|
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.");
|
|
118
115
|
return (0, _alextheman_utility.camelToKebab)(string, { preserveConsecutiveCapitals: false });
|
|
119
116
|
}
|
|
120
|
-
var camelToKebab_default = camelToKebab;
|
|
121
117
|
|
|
122
118
|
//#endregion
|
|
123
119
|
//#region src/utility/private/createConfigGroup.ts
|
|
124
120
|
function createConfigGroup(group, configs) {
|
|
125
121
|
const newConfigs = {};
|
|
126
|
-
for (const key in configs) newConfigs[`${
|
|
122
|
+
for (const key in configs) newConfigs[`${camelToKebab(group)}/${camelToKebab(key)}`] = configs[key];
|
|
127
123
|
return newConfigs;
|
|
128
124
|
}
|
|
129
|
-
var createConfigGroup_default = createConfigGroup;
|
|
130
125
|
|
|
131
126
|
//#endregion
|
|
132
127
|
//#region src/utility/public/flattenConfigs.ts
|
|
@@ -169,10 +164,9 @@ var createConfigGroup_default = createConfigGroup;
|
|
|
169
164
|
*/
|
|
170
165
|
function flattenConfigs(config) {
|
|
171
166
|
const allConfigs = {};
|
|
172
|
-
for (const configGroupEntries of Object.entries(config)) Object.assign(allConfigs,
|
|
167
|
+
for (const configGroupEntries of Object.entries(config)) Object.assign(allConfigs, createConfigGroup(...configGroupEntries));
|
|
173
168
|
return allConfigs;
|
|
174
169
|
}
|
|
175
|
-
var flattenConfigs_default = flattenConfigs;
|
|
176
170
|
|
|
177
171
|
//#endregion
|
|
178
172
|
//#region src/utility/public/getImportSpecifiersAfterRemoving.ts
|
|
@@ -198,12 +192,11 @@ function getImportSpecifiersAfterRemoving(context, specifiers, importToRemove) {
|
|
|
198
192
|
return context.sourceCode.getText(specifier);
|
|
199
193
|
}).join(", ");
|
|
200
194
|
}
|
|
201
|
-
var getImportSpecifiersAfterRemoving_default = getImportSpecifiersAfterRemoving;
|
|
202
195
|
|
|
203
196
|
//#endregion
|
|
204
|
-
exports.checkCallExpression =
|
|
205
|
-
exports.combineRestrictedImports =
|
|
206
|
-
exports.createRuleSchemaFromZodSchema =
|
|
207
|
-
exports.fixOnCondition =
|
|
208
|
-
exports.flattenConfigs =
|
|
209
|
-
exports.getImportSpecifiersAfterRemoving =
|
|
197
|
+
exports.checkCallExpression = checkCallExpression;
|
|
198
|
+
exports.combineRestrictedImports = combineRestrictedImports;
|
|
199
|
+
exports.createRuleSchemaFromZodSchema = createRuleSchemaFromZodSchema;
|
|
200
|
+
exports.fixOnCondition = fixOnCondition;
|
|
201
|
+
exports.flattenConfigs = flattenConfigs;
|
|
202
|
+
exports.getImportSpecifiersAfterRemoving = getImportSpecifiersAfterRemoving;
|
package/dist/utility/index.js
CHANGED
|
@@ -17,7 +17,6 @@ import z from "zod";
|
|
|
17
17
|
function checkCallExpression(node, objectName, propertyName) {
|
|
18
18
|
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
19
|
}
|
|
20
|
-
var checkCallExpression_default = checkCallExpression;
|
|
21
20
|
|
|
22
21
|
//#endregion
|
|
23
22
|
//#region src/utility/public/combineRestrictedImports.ts
|
|
@@ -45,7 +44,6 @@ function combineRestrictedImports(...groups) {
|
|
|
45
44
|
if (combinedGroup.patterns.length === 0) return omitProperties(combinedGroup, "patterns");
|
|
46
45
|
return combinedGroup;
|
|
47
46
|
}
|
|
48
|
-
var combineRestrictedImports_default = combineRestrictedImports;
|
|
49
47
|
|
|
50
48
|
//#endregion
|
|
51
49
|
//#region src/utility/public/createRuleSchemaFromZodSchema.ts
|
|
@@ -61,7 +59,6 @@ var combineRestrictedImports_default = combineRestrictedImports;
|
|
|
61
59
|
function createRuleSchemaFromZodSchema(schema) {
|
|
62
60
|
return [omitProperties(z.toJSONSchema(schema), "$schema")];
|
|
63
61
|
}
|
|
64
|
-
var createRuleSchemaFromZodSchema_default = createRuleSchemaFromZodSchema;
|
|
65
62
|
|
|
66
63
|
//#endregion
|
|
67
64
|
//#region src/utility/public/fixOnCondition.ts
|
|
@@ -81,7 +78,6 @@ function fixOnCondition(fixable, fix) {
|
|
|
81
78
|
return fix(fixer);
|
|
82
79
|
};
|
|
83
80
|
}
|
|
84
|
-
var fixOnCondition_default = fixOnCondition;
|
|
85
81
|
|
|
86
82
|
//#endregion
|
|
87
83
|
//#region src/utility/private/camelToKebab.ts
|
|
@@ -89,16 +85,14 @@ function camelToKebab$1(string) {
|
|
|
89
85
|
if (string[0] === string[0].toUpperCase()) throw new DataError(string, "CAMEL_TO_KEBAB_CONVERSION_ERROR", "camelCase string must start with a lowercase letter.");
|
|
90
86
|
return camelToKebab(string, { preserveConsecutiveCapitals: false });
|
|
91
87
|
}
|
|
92
|
-
var camelToKebab_default = camelToKebab$1;
|
|
93
88
|
|
|
94
89
|
//#endregion
|
|
95
90
|
//#region src/utility/private/createConfigGroup.ts
|
|
96
91
|
function createConfigGroup(group, configs) {
|
|
97
92
|
const newConfigs = {};
|
|
98
|
-
for (const key in configs) newConfigs[`${
|
|
93
|
+
for (const key in configs) newConfigs[`${camelToKebab$1(group)}/${camelToKebab$1(key)}`] = configs[key];
|
|
99
94
|
return newConfigs;
|
|
100
95
|
}
|
|
101
|
-
var createConfigGroup_default = createConfigGroup;
|
|
102
96
|
|
|
103
97
|
//#endregion
|
|
104
98
|
//#region src/utility/public/flattenConfigs.ts
|
|
@@ -141,10 +135,9 @@ var createConfigGroup_default = createConfigGroup;
|
|
|
141
135
|
*/
|
|
142
136
|
function flattenConfigs(config) {
|
|
143
137
|
const allConfigs = {};
|
|
144
|
-
for (const configGroupEntries of Object.entries(config)) Object.assign(allConfigs,
|
|
138
|
+
for (const configGroupEntries of Object.entries(config)) Object.assign(allConfigs, createConfigGroup(...configGroupEntries));
|
|
145
139
|
return allConfigs;
|
|
146
140
|
}
|
|
147
|
-
var flattenConfigs_default = flattenConfigs;
|
|
148
141
|
|
|
149
142
|
//#endregion
|
|
150
143
|
//#region src/utility/public/getImportSpecifiersAfterRemoving.ts
|
|
@@ -170,7 +163,6 @@ function getImportSpecifiersAfterRemoving(context, specifiers, importToRemove) {
|
|
|
170
163
|
return context.sourceCode.getText(specifier);
|
|
171
164
|
}).join(", ");
|
|
172
165
|
}
|
|
173
|
-
var getImportSpecifiersAfterRemoving_default = getImportSpecifiersAfterRemoving;
|
|
174
166
|
|
|
175
167
|
//#endregion
|
|
176
|
-
export {
|
|
168
|
+
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.6.1",
|
|
4
4
|
"description": "A package to provide custom ESLint rules and configs.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -29,43 +29,44 @@
|
|
|
29
29
|
"dist"
|
|
30
30
|
],
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@alextheman/utility": "^4.
|
|
32
|
+
"@alextheman/utility": "^4.13.0",
|
|
33
|
+
"@eslint/compat": "^2.0.2",
|
|
34
|
+
"@typescript-eslint/types": "^8.54.0",
|
|
33
35
|
"@typescript-eslint/utils": "^8.54.0",
|
|
34
36
|
"common-tags": "^1.8.2",
|
|
35
37
|
"zod": "^4.3.6"
|
|
36
38
|
},
|
|
37
39
|
"devDependencies": {
|
|
38
|
-
"@eslint/js": "^
|
|
40
|
+
"@eslint/js": "^10.0.1",
|
|
39
41
|
"@types/common-tags": "^1.8.4",
|
|
40
42
|
"@types/eslint": "^9.6.1",
|
|
41
43
|
"@types/eslint-plugin-jsx-a11y": "^6.10.1",
|
|
42
|
-
"@types/node": "^25.1
|
|
44
|
+
"@types/node": "^25.2.1",
|
|
43
45
|
"@typescript-eslint/rule-tester": "^8.54.0",
|
|
44
|
-
"
|
|
45
|
-
"alex-c-line": "^1.22.1",
|
|
46
|
+
"alex-c-line": "^1.23.1",
|
|
46
47
|
"dotenv-cli": "^11.0.0",
|
|
47
|
-
"eslint": "^
|
|
48
|
+
"eslint": "^10.0.0",
|
|
48
49
|
"eslint-config-prettier": "^10.1.8",
|
|
49
50
|
"eslint-import-resolver-typescript": "^4.4.4",
|
|
50
51
|
"eslint-plugin-import": "^2.32.0",
|
|
51
|
-
"eslint-plugin-jsdoc": "^62.5.
|
|
52
|
+
"eslint-plugin-jsdoc": "^62.5.3",
|
|
52
53
|
"eslint-plugin-jsx-a11y": "^6.10.2",
|
|
53
54
|
"eslint-plugin-n": "^17.23.2",
|
|
54
55
|
"eslint-plugin-package-json": "^0.88.2",
|
|
55
|
-
"eslint-plugin-perfectionist": "^5.
|
|
56
|
+
"eslint-plugin-perfectionist": "^5.5.0",
|
|
56
57
|
"eslint-plugin-prettier": "^5.5.5",
|
|
57
58
|
"eslint-plugin-react": "^7.37.5",
|
|
58
59
|
"eslint-plugin-react-hooks": "^7.0.1",
|
|
59
|
-
"eslint-plugin-react-refresh": "^0.
|
|
60
|
-
"eslint-vitest-rule-tester": "^3.0
|
|
61
|
-
"globals": "^17.
|
|
60
|
+
"eslint-plugin-react-refresh": "^0.5.0",
|
|
61
|
+
"eslint-vitest-rule-tester": "^3.1.0",
|
|
62
|
+
"globals": "^17.3.0",
|
|
62
63
|
"husky": "^9.1.7",
|
|
63
|
-
"jsdom": "^
|
|
64
|
+
"jsdom": "^28.0.0",
|
|
64
65
|
"prettier": "^3.8.1",
|
|
65
|
-
"tsdown": "^0.20.
|
|
66
|
+
"tsdown": "^0.20.3",
|
|
66
67
|
"tsx": "^4.21.0",
|
|
67
68
|
"typedoc": "^0.28.16",
|
|
68
|
-
"typedoc-plugin-markdown": "^4.
|
|
69
|
+
"typedoc-plugin-markdown": "^4.10.0",
|
|
69
70
|
"typedoc-rhineai-theme": "^1.2.0",
|
|
70
71
|
"typescript": "^5.9.3",
|
|
71
72
|
"typescript-eslint": "^8.54.0",
|