@alextheman/eslint-plugin 2.7.6 → 2.7.7
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 +52 -29
- package/dist/index.d.cts +23 -3
- package/dist/index.d.ts +23 -3
- package/dist/index.js +50 -28
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -3752,13 +3752,14 @@ var index_exports = {};
|
|
|
3752
3752
|
__export(index_exports, {
|
|
3753
3753
|
default: () => index_default,
|
|
3754
3754
|
parseTestFunction: () => parseTestFunction,
|
|
3755
|
-
prettierRules: () => prettierRules_default
|
|
3755
|
+
prettierRules: () => prettierRules_default,
|
|
3756
|
+
sortObjects: () => sortObjects_default
|
|
3756
3757
|
});
|
|
3757
3758
|
module.exports = __toCommonJS(index_exports);
|
|
3758
3759
|
|
|
3759
3760
|
// package.json
|
|
3760
3761
|
var name = "@alextheman/eslint-plugin";
|
|
3761
|
-
var version = "2.7.
|
|
3762
|
+
var version = "2.7.7";
|
|
3762
3763
|
|
|
3763
3764
|
// src/configs/index.ts
|
|
3764
3765
|
var import_eslint_plugin_package_json = __toESM(require("eslint-plugin-package-json"), 1);
|
|
@@ -3907,6 +3908,14 @@ var javaScriptBase_default = javaScriptBase;
|
|
|
3907
3908
|
// src/configs/personal/javaScriptBase.ts
|
|
3908
3909
|
var import_eslint_plugin_perfectionist = __toESM(require("eslint-plugin-perfectionist"), 1);
|
|
3909
3910
|
var import_eslint_plugin_prettier = __toESM(require("eslint-plugin-prettier"), 1);
|
|
3911
|
+
|
|
3912
|
+
// src/configs/miscellaneous/prettierRules.ts
|
|
3913
|
+
var prettierRules = {
|
|
3914
|
+
printWidth: 100
|
|
3915
|
+
};
|
|
3916
|
+
var prettierRules_default = prettierRules;
|
|
3917
|
+
|
|
3918
|
+
// src/configs/personal/javaScriptBase.ts
|
|
3910
3919
|
function createPersonalJavaScriptBaseConfig(plugin) {
|
|
3911
3920
|
return [
|
|
3912
3921
|
{
|
|
@@ -4073,12 +4082,6 @@ function createCombinedJavaScriptReactBaseConfig(plugin) {
|
|
|
4073
4082
|
}
|
|
4074
4083
|
var javaScriptReactBase_default = createCombinedJavaScriptReactBaseConfig;
|
|
4075
4084
|
|
|
4076
|
-
// src/configs/general/prettierRules.ts
|
|
4077
|
-
var prettierRules = {
|
|
4078
|
-
printWidth: 100
|
|
4079
|
-
};
|
|
4080
|
-
var prettierRules_default = prettierRules;
|
|
4081
|
-
|
|
4082
4085
|
// src/configs/general/typeScriptBase.ts
|
|
4083
4086
|
var import_parser = __toESM(require("@typescript-eslint/parser"), 1);
|
|
4084
4087
|
var import_typescript_eslint = __toESM(require("typescript-eslint"), 1);
|
|
@@ -4130,6 +4133,28 @@ var typeScriptBase_default = typeScriptBase;
|
|
|
4130
4133
|
|
|
4131
4134
|
// src/configs/personal/eslintPlugin.ts
|
|
4132
4135
|
var import_eslint_plugin_perfectionist2 = __toESM(require("eslint-plugin-perfectionist"), 1);
|
|
4136
|
+
|
|
4137
|
+
// src/configs/miscellaneous/sortObjects.ts
|
|
4138
|
+
var sortObjects = {
|
|
4139
|
+
customGroups: [],
|
|
4140
|
+
destructuredObjects: true,
|
|
4141
|
+
fallbackSort: { type: "unsorted" },
|
|
4142
|
+
groups: [],
|
|
4143
|
+
ignoreCase: true,
|
|
4144
|
+
ignorePattern: [],
|
|
4145
|
+
newlinesBetween: "ignore",
|
|
4146
|
+
objectDeclarations: true,
|
|
4147
|
+
order: "asc",
|
|
4148
|
+
partitionByComment: false,
|
|
4149
|
+
partitionByNewLine: false,
|
|
4150
|
+
specialCharacters: "keep",
|
|
4151
|
+
styledComponents: true,
|
|
4152
|
+
type: "alphabetical",
|
|
4153
|
+
useConfigurationIf: {}
|
|
4154
|
+
};
|
|
4155
|
+
var sortObjects_default = sortObjects;
|
|
4156
|
+
|
|
4157
|
+
// src/configs/personal/eslintPlugin.ts
|
|
4133
4158
|
function createPersonalEslintPluginConfig(plugin) {
|
|
4134
4159
|
return [
|
|
4135
4160
|
{
|
|
@@ -4163,26 +4188,7 @@ function createPersonalEslintPluginConfig(plugin) {
|
|
|
4163
4188
|
// as well to make it easier to compare against the file directory.
|
|
4164
4189
|
files: ["src/rules/index.ts", "src/configs/**"],
|
|
4165
4190
|
rules: {
|
|
4166
|
-
"perfectionist/sort-objects": [
|
|
4167
|
-
"error",
|
|
4168
|
-
{
|
|
4169
|
-
customGroups: [],
|
|
4170
|
-
destructuredObjects: true,
|
|
4171
|
-
fallbackSort: { type: "unsorted" },
|
|
4172
|
-
groups: [],
|
|
4173
|
-
ignoreCase: true,
|
|
4174
|
-
ignorePattern: [],
|
|
4175
|
-
newlinesBetween: "ignore",
|
|
4176
|
-
objectDeclarations: true,
|
|
4177
|
-
order: "asc",
|
|
4178
|
-
partitionByComment: false,
|
|
4179
|
-
partitionByNewLine: false,
|
|
4180
|
-
specialCharacters: "keep",
|
|
4181
|
-
styledComponents: true,
|
|
4182
|
-
type: "alphabetical",
|
|
4183
|
-
useConfigurationIf: {}
|
|
4184
|
-
}
|
|
4185
|
-
]
|
|
4191
|
+
"perfectionist/sort-objects": ["error", sortObjects_default]
|
|
4186
4192
|
}
|
|
4187
4193
|
}
|
|
4188
4194
|
];
|
|
@@ -4347,6 +4353,21 @@ function createCombinedTypeScriptReactBaseConfig(plugin) {
|
|
|
4347
4353
|
}
|
|
4348
4354
|
var typeScriptReactBase_default = createCombinedTypeScriptReactBaseConfig;
|
|
4349
4355
|
|
|
4356
|
+
// src/configs/personal/alexCLine.ts
|
|
4357
|
+
var import_eslint_plugin_perfectionist3 = __toESM(require("eslint-plugin-perfectionist"), 1);
|
|
4358
|
+
var alexCLineConfig = [
|
|
4359
|
+
{
|
|
4360
|
+
files: ["src/commands/index.ts"],
|
|
4361
|
+
plugins: {
|
|
4362
|
+
perfectionist: import_eslint_plugin_perfectionist3.default
|
|
4363
|
+
},
|
|
4364
|
+
rules: {
|
|
4365
|
+
"perfectionist/sort-objects": ["error", sortObjects_default]
|
|
4366
|
+
}
|
|
4367
|
+
}
|
|
4368
|
+
];
|
|
4369
|
+
var alexCLine_default = alexCLineConfig;
|
|
4370
|
+
|
|
4350
4371
|
// src/utility/camelToKebab.ts
|
|
4351
4372
|
var import_utility2 = require("@alextheman/utility");
|
|
4352
4373
|
function camelToKebab(string) {
|
|
@@ -4399,6 +4420,7 @@ function createAlexPluginConfigs(plugin) {
|
|
|
4399
4420
|
typeScript: typeScriptBase_default
|
|
4400
4421
|
},
|
|
4401
4422
|
personal: {
|
|
4423
|
+
alexCLine: alexCLine_default,
|
|
4402
4424
|
eslintPlugin: eslintPlugin_default(plugin),
|
|
4403
4425
|
javaScript: javaScriptBase_default2(plugin),
|
|
4404
4426
|
neurosongsBackEnd: neurosongsBackEnd_default,
|
|
@@ -5011,5 +5033,6 @@ var index_default = alexPlugin_default;
|
|
|
5011
5033
|
// Annotate the CommonJS export names for ESM import in node:
|
|
5012
5034
|
0 && (module.exports = {
|
|
5013
5035
|
parseTestFunction,
|
|
5014
|
-
prettierRules
|
|
5036
|
+
prettierRules,
|
|
5037
|
+
sortObjects
|
|
5015
5038
|
});
|
package/dist/index.d.cts
CHANGED
|
@@ -4,13 +4,13 @@ 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.7";
|
|
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
|
|
|
11
11
|
type GeneralConfig = "javaScript" | "typeScript" | "react";
|
|
12
12
|
type PluginConfig = "base" | "tests";
|
|
13
|
-
type PersonalConfig = "javaScript" | "typeScript" | "react" | "tests" | "eslintPlugin" | "neurosongsBackEnd" | "neurosongsFrontEnd" | "utility";
|
|
13
|
+
type PersonalConfig = "javaScript" | "typeScript" | "react" | "tests" | "eslintPlugin" | "neurosongsBackEnd" | "neurosongsFrontEnd" | "utility" | "alexCLine";
|
|
14
14
|
type CombinedConfig = "javaScript" | "typeScript" | "react" | "tests" | "typeScriptReact" | "javaScriptReact";
|
|
15
15
|
interface AlexPluginConfigGroup {
|
|
16
16
|
general: Record<GeneralConfig, Linter.Config[]>;
|
|
@@ -38,6 +38,26 @@ declare const alexPlugin: AlexPlugin;
|
|
|
38
38
|
|
|
39
39
|
declare const prettierRules: Config;
|
|
40
40
|
|
|
41
|
+
declare const sortObjects: {
|
|
42
|
+
customGroups: never[];
|
|
43
|
+
destructuredObjects: boolean;
|
|
44
|
+
fallbackSort: {
|
|
45
|
+
type: string;
|
|
46
|
+
};
|
|
47
|
+
groups: never[];
|
|
48
|
+
ignoreCase: boolean;
|
|
49
|
+
ignorePattern: never[];
|
|
50
|
+
newlinesBetween: string;
|
|
51
|
+
objectDeclarations: boolean;
|
|
52
|
+
order: string;
|
|
53
|
+
partitionByComment: boolean;
|
|
54
|
+
partitionByNewLine: boolean;
|
|
55
|
+
specialCharacters: string;
|
|
56
|
+
styledComponents: boolean;
|
|
57
|
+
type: string;
|
|
58
|
+
useConfigurationIf: {};
|
|
59
|
+
};
|
|
60
|
+
|
|
41
61
|
declare const validTestFunctionsSchema: z.ZodEnum<{
|
|
42
62
|
test: "test";
|
|
43
63
|
it: "it";
|
|
@@ -45,4 +65,4 @@ declare const validTestFunctionsSchema: z.ZodEnum<{
|
|
|
45
65
|
type TestFunction = z.infer<typeof validTestFunctionsSchema>;
|
|
46
66
|
declare function parseTestFunction(data: unknown): TestFunction;
|
|
47
67
|
|
|
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 };
|
|
68
|
+
export { type AlexPlugin, type AlexPluginConfigGroup, type CombinedConfig, type ConfigGroupName, type ConfigKey, type GeneralConfig, type PersonalConfig, type PluginConfig, type TestFunction, alexPlugin as default, parseTestFunction, prettierRules, sortObjects };
|
package/dist/index.d.ts
CHANGED
|
@@ -4,13 +4,13 @@ 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.7";
|
|
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
|
|
|
11
11
|
type GeneralConfig = "javaScript" | "typeScript" | "react";
|
|
12
12
|
type PluginConfig = "base" | "tests";
|
|
13
|
-
type PersonalConfig = "javaScript" | "typeScript" | "react" | "tests" | "eslintPlugin" | "neurosongsBackEnd" | "neurosongsFrontEnd" | "utility";
|
|
13
|
+
type PersonalConfig = "javaScript" | "typeScript" | "react" | "tests" | "eslintPlugin" | "neurosongsBackEnd" | "neurosongsFrontEnd" | "utility" | "alexCLine";
|
|
14
14
|
type CombinedConfig = "javaScript" | "typeScript" | "react" | "tests" | "typeScriptReact" | "javaScriptReact";
|
|
15
15
|
interface AlexPluginConfigGroup {
|
|
16
16
|
general: Record<GeneralConfig, Linter.Config[]>;
|
|
@@ -38,6 +38,26 @@ declare const alexPlugin: AlexPlugin;
|
|
|
38
38
|
|
|
39
39
|
declare const prettierRules: Config;
|
|
40
40
|
|
|
41
|
+
declare const sortObjects: {
|
|
42
|
+
customGroups: never[];
|
|
43
|
+
destructuredObjects: boolean;
|
|
44
|
+
fallbackSort: {
|
|
45
|
+
type: string;
|
|
46
|
+
};
|
|
47
|
+
groups: never[];
|
|
48
|
+
ignoreCase: boolean;
|
|
49
|
+
ignorePattern: never[];
|
|
50
|
+
newlinesBetween: string;
|
|
51
|
+
objectDeclarations: boolean;
|
|
52
|
+
order: string;
|
|
53
|
+
partitionByComment: boolean;
|
|
54
|
+
partitionByNewLine: boolean;
|
|
55
|
+
specialCharacters: string;
|
|
56
|
+
styledComponents: boolean;
|
|
57
|
+
type: string;
|
|
58
|
+
useConfigurationIf: {};
|
|
59
|
+
};
|
|
60
|
+
|
|
41
61
|
declare const validTestFunctionsSchema: z.ZodEnum<{
|
|
42
62
|
test: "test";
|
|
43
63
|
it: "it";
|
|
@@ -45,4 +65,4 @@ declare const validTestFunctionsSchema: z.ZodEnum<{
|
|
|
45
65
|
type TestFunction = z.infer<typeof validTestFunctionsSchema>;
|
|
46
66
|
declare function parseTestFunction(data: unknown): TestFunction;
|
|
47
67
|
|
|
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 };
|
|
68
|
+
export { type AlexPlugin, type AlexPluginConfigGroup, type CombinedConfig, type ConfigGroupName, type ConfigKey, type GeneralConfig, type PersonalConfig, type PluginConfig, type TestFunction, alexPlugin as default, parseTestFunction, prettierRules, sortObjects };
|
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.7";
|
|
3747
3747
|
|
|
3748
3748
|
// src/configs/index.ts
|
|
3749
3749
|
import packageJson from "eslint-plugin-package-json";
|
|
@@ -3892,6 +3892,14 @@ var javaScriptBase_default = javaScriptBase;
|
|
|
3892
3892
|
// src/configs/personal/javaScriptBase.ts
|
|
3893
3893
|
import perfectionist from "eslint-plugin-perfectionist";
|
|
3894
3894
|
import prettierPlugin from "eslint-plugin-prettier";
|
|
3895
|
+
|
|
3896
|
+
// src/configs/miscellaneous/prettierRules.ts
|
|
3897
|
+
var prettierRules = {
|
|
3898
|
+
printWidth: 100
|
|
3899
|
+
};
|
|
3900
|
+
var prettierRules_default = prettierRules;
|
|
3901
|
+
|
|
3902
|
+
// src/configs/personal/javaScriptBase.ts
|
|
3895
3903
|
function createPersonalJavaScriptBaseConfig(plugin) {
|
|
3896
3904
|
return [
|
|
3897
3905
|
{
|
|
@@ -4058,12 +4066,6 @@ function createCombinedJavaScriptReactBaseConfig(plugin) {
|
|
|
4058
4066
|
}
|
|
4059
4067
|
var javaScriptReactBase_default = createCombinedJavaScriptReactBaseConfig;
|
|
4060
4068
|
|
|
4061
|
-
// src/configs/general/prettierRules.ts
|
|
4062
|
-
var prettierRules = {
|
|
4063
|
-
printWidth: 100
|
|
4064
|
-
};
|
|
4065
|
-
var prettierRules_default = prettierRules;
|
|
4066
|
-
|
|
4067
4069
|
// src/configs/general/typeScriptBase.ts
|
|
4068
4070
|
import tsparser from "@typescript-eslint/parser";
|
|
4069
4071
|
import tseslint from "typescript-eslint";
|
|
@@ -4115,6 +4117,28 @@ var typeScriptBase_default = typeScriptBase;
|
|
|
4115
4117
|
|
|
4116
4118
|
// src/configs/personal/eslintPlugin.ts
|
|
4117
4119
|
import perfectionist2 from "eslint-plugin-perfectionist";
|
|
4120
|
+
|
|
4121
|
+
// src/configs/miscellaneous/sortObjects.ts
|
|
4122
|
+
var sortObjects = {
|
|
4123
|
+
customGroups: [],
|
|
4124
|
+
destructuredObjects: true,
|
|
4125
|
+
fallbackSort: { type: "unsorted" },
|
|
4126
|
+
groups: [],
|
|
4127
|
+
ignoreCase: true,
|
|
4128
|
+
ignorePattern: [],
|
|
4129
|
+
newlinesBetween: "ignore",
|
|
4130
|
+
objectDeclarations: true,
|
|
4131
|
+
order: "asc",
|
|
4132
|
+
partitionByComment: false,
|
|
4133
|
+
partitionByNewLine: false,
|
|
4134
|
+
specialCharacters: "keep",
|
|
4135
|
+
styledComponents: true,
|
|
4136
|
+
type: "alphabetical",
|
|
4137
|
+
useConfigurationIf: {}
|
|
4138
|
+
};
|
|
4139
|
+
var sortObjects_default = sortObjects;
|
|
4140
|
+
|
|
4141
|
+
// src/configs/personal/eslintPlugin.ts
|
|
4118
4142
|
function createPersonalEslintPluginConfig(plugin) {
|
|
4119
4143
|
return [
|
|
4120
4144
|
{
|
|
@@ -4148,26 +4172,7 @@ function createPersonalEslintPluginConfig(plugin) {
|
|
|
4148
4172
|
// as well to make it easier to compare against the file directory.
|
|
4149
4173
|
files: ["src/rules/index.ts", "src/configs/**"],
|
|
4150
4174
|
rules: {
|
|
4151
|
-
"perfectionist/sort-objects": [
|
|
4152
|
-
"error",
|
|
4153
|
-
{
|
|
4154
|
-
customGroups: [],
|
|
4155
|
-
destructuredObjects: true,
|
|
4156
|
-
fallbackSort: { type: "unsorted" },
|
|
4157
|
-
groups: [],
|
|
4158
|
-
ignoreCase: true,
|
|
4159
|
-
ignorePattern: [],
|
|
4160
|
-
newlinesBetween: "ignore",
|
|
4161
|
-
objectDeclarations: true,
|
|
4162
|
-
order: "asc",
|
|
4163
|
-
partitionByComment: false,
|
|
4164
|
-
partitionByNewLine: false,
|
|
4165
|
-
specialCharacters: "keep",
|
|
4166
|
-
styledComponents: true,
|
|
4167
|
-
type: "alphabetical",
|
|
4168
|
-
useConfigurationIf: {}
|
|
4169
|
-
}
|
|
4170
|
-
]
|
|
4175
|
+
"perfectionist/sort-objects": ["error", sortObjects_default]
|
|
4171
4176
|
}
|
|
4172
4177
|
}
|
|
4173
4178
|
];
|
|
@@ -4332,6 +4337,21 @@ function createCombinedTypeScriptReactBaseConfig(plugin) {
|
|
|
4332
4337
|
}
|
|
4333
4338
|
var typeScriptReactBase_default = createCombinedTypeScriptReactBaseConfig;
|
|
4334
4339
|
|
|
4340
|
+
// src/configs/personal/alexCLine.ts
|
|
4341
|
+
import perfectionist3 from "eslint-plugin-perfectionist";
|
|
4342
|
+
var alexCLineConfig = [
|
|
4343
|
+
{
|
|
4344
|
+
files: ["src/commands/index.ts"],
|
|
4345
|
+
plugins: {
|
|
4346
|
+
perfectionist: perfectionist3
|
|
4347
|
+
},
|
|
4348
|
+
rules: {
|
|
4349
|
+
"perfectionist/sort-objects": ["error", sortObjects_default]
|
|
4350
|
+
}
|
|
4351
|
+
}
|
|
4352
|
+
];
|
|
4353
|
+
var alexCLine_default = alexCLineConfig;
|
|
4354
|
+
|
|
4335
4355
|
// src/utility/camelToKebab.ts
|
|
4336
4356
|
import { camelToKebab as alexCamelToKebab } from "@alextheman/utility";
|
|
4337
4357
|
function camelToKebab(string) {
|
|
@@ -4384,6 +4404,7 @@ function createAlexPluginConfigs(plugin) {
|
|
|
4384
4404
|
typeScript: typeScriptBase_default
|
|
4385
4405
|
},
|
|
4386
4406
|
personal: {
|
|
4407
|
+
alexCLine: alexCLine_default,
|
|
4387
4408
|
eslintPlugin: eslintPlugin_default(plugin),
|
|
4388
4409
|
javaScript: javaScriptBase_default2(plugin),
|
|
4389
4410
|
neurosongsBackEnd: neurosongsBackEnd_default,
|
|
@@ -4996,5 +5017,6 @@ var index_default = alexPlugin_default;
|
|
|
4996
5017
|
export {
|
|
4997
5018
|
index_default as default,
|
|
4998
5019
|
parseTestFunction,
|
|
4999
|
-
prettierRules_default as prettierRules
|
|
5020
|
+
prettierRules_default as prettierRules,
|
|
5021
|
+
sortObjects_default as sortObjects
|
|
5000
5022
|
};
|