@alextheman/eslint-plugin 2.7.0 → 2.7.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 +4 -7
- package/dist/index.d.cts +5 -4
- package/dist/index.d.ts +5 -4
- package/dist/index.js +4 -7
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -3758,7 +3758,7 @@ module.exports = __toCommonJS(index_exports);
|
|
|
3758
3758
|
|
|
3759
3759
|
// package.json
|
|
3760
3760
|
var name = "@alextheman/eslint-plugin";
|
|
3761
|
-
var version = "2.7.
|
|
3761
|
+
var version = "2.7.2";
|
|
3762
3762
|
|
|
3763
3763
|
// src/configs/index.ts
|
|
3764
3764
|
var import_eslint_plugin_package_json = __toESM(require("eslint-plugin-package-json"), 1);
|
|
@@ -4353,11 +4353,8 @@ var createConfigGroup_default = createConfigGroup;
|
|
|
4353
4353
|
// src/utility/createPluginConfigs.ts
|
|
4354
4354
|
function createPluginConfigs(config) {
|
|
4355
4355
|
const allConfigs = {};
|
|
4356
|
-
for (const
|
|
4357
|
-
Object.assign(
|
|
4358
|
-
allConfigs,
|
|
4359
|
-
createConfigGroup_default(group, config[group])
|
|
4360
|
-
);
|
|
4356
|
+
for (const configGroupEntries of Object.entries(config)) {
|
|
4357
|
+
Object.assign(allConfigs, createConfigGroup_default(...configGroupEntries));
|
|
4361
4358
|
}
|
|
4362
4359
|
return allConfigs;
|
|
4363
4360
|
}
|
|
@@ -4980,7 +4977,7 @@ var rules_default = {
|
|
|
4980
4977
|
"use-object-shorthand": use_object_shorthand_default
|
|
4981
4978
|
};
|
|
4982
4979
|
|
|
4983
|
-
// src/alexPlugin
|
|
4980
|
+
// src/alexPlugin.ts
|
|
4984
4981
|
var alexPlugin = {
|
|
4985
4982
|
meta: {
|
|
4986
4983
|
name,
|
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.7.
|
|
7
|
+
var version = "2.7.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
|
|
|
@@ -18,9 +18,10 @@ interface AlexPluginConfigGroup {
|
|
|
18
18
|
personal: Record<PersonalConfig, Linter.Config[]>;
|
|
19
19
|
combined: Record<CombinedConfig, Linter.Config[]>;
|
|
20
20
|
}
|
|
21
|
+
type ConfigGroupName = keyof AlexPluginConfigGroup;
|
|
21
22
|
type ConfigKey = {
|
|
22
|
-
[
|
|
23
|
-
}[
|
|
23
|
+
[Group in ConfigGroupName & string]: `${CamelToKebab<Group>}/${CamelToKebab<keyof AlexPluginConfigGroup[Group] & string>}`;
|
|
24
|
+
}[ConfigGroupName & string];
|
|
24
25
|
|
|
25
26
|
declare function createAlexPluginConfigs(plugin: AlexPlugin): Record<ConfigKey, Linter.Config[]>;
|
|
26
27
|
|
|
@@ -44,4 +45,4 @@ declare const validTestFunctionsSchema: z.ZodEnum<{
|
|
|
44
45
|
type TestFunction = z.infer<typeof validTestFunctionsSchema>;
|
|
45
46
|
declare function parseTestFunction(data: unknown): TestFunction;
|
|
46
47
|
|
|
47
|
-
export { type AlexPlugin, type AlexPluginConfigGroup, type CombinedConfig, type ConfigKey, type GeneralConfig, type PersonalConfig, type PluginConfig, type TestFunction, alexPlugin as default, parseTestFunction, prettierRules };
|
|
48
|
+
export { type AlexPlugin, type AlexPluginConfigGroup, type CombinedConfig, type ConfigGroupName, type ConfigKey, type GeneralConfig, type PersonalConfig, type PluginConfig, type TestFunction, alexPlugin as default, parseTestFunction, prettierRules };
|
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.7.
|
|
7
|
+
var version = "2.7.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
|
|
|
@@ -18,9 +18,10 @@ interface AlexPluginConfigGroup {
|
|
|
18
18
|
personal: Record<PersonalConfig, Linter.Config[]>;
|
|
19
19
|
combined: Record<CombinedConfig, Linter.Config[]>;
|
|
20
20
|
}
|
|
21
|
+
type ConfigGroupName = keyof AlexPluginConfigGroup;
|
|
21
22
|
type ConfigKey = {
|
|
22
|
-
[
|
|
23
|
-
}[
|
|
23
|
+
[Group in ConfigGroupName & string]: `${CamelToKebab<Group>}/${CamelToKebab<keyof AlexPluginConfigGroup[Group] & string>}`;
|
|
24
|
+
}[ConfigGroupName & string];
|
|
24
25
|
|
|
25
26
|
declare function createAlexPluginConfigs(plugin: AlexPlugin): Record<ConfigKey, Linter.Config[]>;
|
|
26
27
|
|
|
@@ -44,4 +45,4 @@ declare const validTestFunctionsSchema: z.ZodEnum<{
|
|
|
44
45
|
type TestFunction = z.infer<typeof validTestFunctionsSchema>;
|
|
45
46
|
declare function parseTestFunction(data: unknown): TestFunction;
|
|
46
47
|
|
|
47
|
-
export { type AlexPlugin, type AlexPluginConfigGroup, type CombinedConfig, type ConfigKey, type GeneralConfig, type PersonalConfig, type PluginConfig, type TestFunction, alexPlugin as default, parseTestFunction, prettierRules };
|
|
48
|
+
export { type AlexPlugin, type AlexPluginConfigGroup, type CombinedConfig, type ConfigGroupName, type ConfigKey, type GeneralConfig, type PersonalConfig, type PluginConfig, type TestFunction, alexPlugin as default, parseTestFunction, prettierRules };
|
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.7.
|
|
3746
|
+
var version = "2.7.2";
|
|
3747
3747
|
|
|
3748
3748
|
// src/configs/index.ts
|
|
3749
3749
|
import packageJson from "eslint-plugin-package-json";
|
|
@@ -4338,11 +4338,8 @@ var createConfigGroup_default = createConfigGroup;
|
|
|
4338
4338
|
// src/utility/createPluginConfigs.ts
|
|
4339
4339
|
function createPluginConfigs(config) {
|
|
4340
4340
|
const allConfigs = {};
|
|
4341
|
-
for (const
|
|
4342
|
-
Object.assign(
|
|
4343
|
-
allConfigs,
|
|
4344
|
-
createConfigGroup_default(group, config[group])
|
|
4345
|
-
);
|
|
4341
|
+
for (const configGroupEntries of Object.entries(config)) {
|
|
4342
|
+
Object.assign(allConfigs, createConfigGroup_default(...configGroupEntries));
|
|
4346
4343
|
}
|
|
4347
4344
|
return allConfigs;
|
|
4348
4345
|
}
|
|
@@ -4965,7 +4962,7 @@ var rules_default = {
|
|
|
4965
4962
|
"use-object-shorthand": use_object_shorthand_default
|
|
4966
4963
|
};
|
|
4967
4964
|
|
|
4968
|
-
// src/alexPlugin
|
|
4965
|
+
// src/alexPlugin.ts
|
|
4969
4966
|
var alexPlugin = {
|
|
4970
4967
|
meta: {
|
|
4971
4968
|
name,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alextheman/eslint-plugin",
|
|
3
|
-
"version": "2.7.
|
|
3
|
+
"version": "2.7.2",
|
|
4
4
|
"description": "A package to provide custom ESLint rules and configs",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"author": "alextheman",
|
|
@@ -16,12 +16,12 @@
|
|
|
16
16
|
"change-minor": "npm version minor -m \"Change version number to v%s\"",
|
|
17
17
|
"change-patch": "npm version patch -m \"Change version number to v%s\"",
|
|
18
18
|
"create-local-package": "npm run build && rm -f alextheman-eslint-plugin-*.tgz && npm pack",
|
|
19
|
-
"format": "npm run build && npm run format-prettier && npm run format-eslint",
|
|
19
|
+
"format": "npx tsx src/utility/checkConfigChanges.ts || npm run build && npm run format-prettier && npm run format-eslint",
|
|
20
20
|
"format-eslint": "eslint --fix --suppress-all \"src/**/*.ts\" \"tests/**/*.ts\" \"package.json\" && rm -f eslint-suppressions.json",
|
|
21
21
|
"format-prettier": "npm run format-prettier-typescript && npm run format-prettier-javascript",
|
|
22
22
|
"format-prettier-javascript": "prettier --write \"./**/*.js\"",
|
|
23
23
|
"format-prettier-typescript": "prettier --write --parser typescript \"./**/*.ts\"",
|
|
24
|
-
"lint": "npm run build && npm run lint-tsc && npm run lint-eslint && npm run lint-prettier",
|
|
24
|
+
"lint": "npx tsx src/utility/checkConfigChanges.ts || npm run build && npm run lint-tsc && npm run lint-eslint && npm run lint-prettier",
|
|
25
25
|
"lint-eslint": "eslint \"src/**/*.ts\" \"tests/**/*.ts\" \"package.json\"",
|
|
26
26
|
"lint-prettier": "npm run lint-prettier-typescript && npm run lint-prettier-javascript",
|
|
27
27
|
"lint-prettier-javascript": "prettier --check \"./**/*.js\"",
|