@alextheman/eslint-plugin 2.7.6 → 2.7.8
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 +132 -78
- package/dist/index.d.cts +23 -3
- package/dist/index.d.ts +23 -3
- package/dist/index.js +132 -79
- 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.8";
|
|
3762
3763
|
|
|
3763
3764
|
// src/configs/index.ts
|
|
3764
3765
|
var import_eslint_plugin_package_json = __toESM(require("eslint-plugin-package-json"), 1);
|
|
@@ -3771,6 +3772,7 @@ var personalTestsBaseConfig = [
|
|
|
3771
3772
|
languageOptions: {
|
|
3772
3773
|
globals: __spreadValues(__spreadValues(__spreadValues({}, import_globals.default.node), import_globals.default.browser), import_globals.default.vitest)
|
|
3773
3774
|
},
|
|
3775
|
+
name: "@alextheman/personal/tests",
|
|
3774
3776
|
rules: {
|
|
3775
3777
|
"no-restricted-globals": [
|
|
3776
3778
|
"error",
|
|
@@ -3807,6 +3809,7 @@ var testsBase_default = personalTestsBaseConfig;
|
|
|
3807
3809
|
function createPluginBaseConfig(plugin) {
|
|
3808
3810
|
return [
|
|
3809
3811
|
{
|
|
3812
|
+
name: "@alextheman/plugin/base",
|
|
3810
3813
|
plugins: {
|
|
3811
3814
|
"@alextheman": plugin
|
|
3812
3815
|
},
|
|
@@ -3825,6 +3828,7 @@ function createPluginTestsBaseConfig(plugin) {
|
|
|
3825
3828
|
return [
|
|
3826
3829
|
{
|
|
3827
3830
|
files: ["**/*.test.ts"],
|
|
3831
|
+
name: "@alextheman/plugin/tests",
|
|
3828
3832
|
plugins: {
|
|
3829
3833
|
"@alextheman": plugin
|
|
3830
3834
|
},
|
|
@@ -3840,7 +3844,11 @@ var testsBase_default2 = createPluginTestsBaseConfig;
|
|
|
3840
3844
|
|
|
3841
3845
|
// src/configs/combined/testsBase.ts
|
|
3842
3846
|
function createCombinedTestsBaseConfig(plugin) {
|
|
3843
|
-
return [
|
|
3847
|
+
return [
|
|
3848
|
+
{ name: "@alextheman/combined/tests" },
|
|
3849
|
+
...testsBase_default2(plugin),
|
|
3850
|
+
...testsBase_default
|
|
3851
|
+
];
|
|
3844
3852
|
}
|
|
3845
3853
|
var testsBase_default3 = createCombinedTestsBaseConfig;
|
|
3846
3854
|
|
|
@@ -3848,17 +3856,23 @@ var testsBase_default3 = createCombinedTestsBaseConfig;
|
|
|
3848
3856
|
var import_js = __toESM(require_src(), 1);
|
|
3849
3857
|
var import_eslint_config_prettier = __toESM(require("eslint-config-prettier"), 1);
|
|
3850
3858
|
var import_eslint_plugin_import = __toESM(require("eslint-plugin-import"), 1);
|
|
3859
|
+
|
|
3860
|
+
// src/configs/miscellaneous/javaScriptLanguageOptions.ts
|
|
3851
3861
|
var import_globals2 = __toESM(require_globals2(), 1);
|
|
3862
|
+
var javaScriptLanguageOptions = {
|
|
3863
|
+
globals: __spreadValues(__spreadValues(__spreadValues({}, import_globals2.default.node), import_globals2.default.browser), import_globals2.default.vitest)
|
|
3864
|
+
};
|
|
3865
|
+
var javaScriptLanguageOptions_default = javaScriptLanguageOptions;
|
|
3866
|
+
|
|
3867
|
+
// src/configs/general/javaScriptBase.ts
|
|
3852
3868
|
var javaScriptBase = [
|
|
3853
3869
|
import_js.default.configs.recommended,
|
|
3854
3870
|
import_eslint_config_prettier.default,
|
|
3855
3871
|
{
|
|
3856
3872
|
files: ["**/*.js", "**/*.jsx", "**/*.ts", "**/*.tsx"],
|
|
3857
3873
|
ignores: ["dist"],
|
|
3858
|
-
languageOptions:
|
|
3859
|
-
|
|
3860
|
-
},
|
|
3861
|
-
name: "@alextheman/eslint-config-javascript-base",
|
|
3874
|
+
languageOptions: javaScriptLanguageOptions_default,
|
|
3875
|
+
name: "@alextheman/general/javascript",
|
|
3862
3876
|
plugins: {
|
|
3863
3877
|
import: import_eslint_plugin_import.default
|
|
3864
3878
|
},
|
|
@@ -3907,10 +3921,20 @@ var javaScriptBase_default = javaScriptBase;
|
|
|
3907
3921
|
// src/configs/personal/javaScriptBase.ts
|
|
3908
3922
|
var import_eslint_plugin_perfectionist = __toESM(require("eslint-plugin-perfectionist"), 1);
|
|
3909
3923
|
var import_eslint_plugin_prettier = __toESM(require("eslint-plugin-prettier"), 1);
|
|
3924
|
+
|
|
3925
|
+
// src/configs/miscellaneous/prettierRules.ts
|
|
3926
|
+
var prettierRules = {
|
|
3927
|
+
printWidth: 100
|
|
3928
|
+
};
|
|
3929
|
+
var prettierRules_default = prettierRules;
|
|
3930
|
+
|
|
3931
|
+
// src/configs/personal/javaScriptBase.ts
|
|
3910
3932
|
function createPersonalJavaScriptBaseConfig(plugin) {
|
|
3911
3933
|
return [
|
|
3912
3934
|
{
|
|
3913
3935
|
files: ["**/*.js", "**/*.jsx", "**/*.ts", "**/*.tsx"],
|
|
3936
|
+
languageOptions: javaScriptLanguageOptions_default,
|
|
3937
|
+
name: "@alextheman/personal/javascript",
|
|
3914
3938
|
plugins: {
|
|
3915
3939
|
"@alextheman": plugin,
|
|
3916
3940
|
perfectionist: import_eslint_plugin_perfectionist.default,
|
|
@@ -3967,6 +3991,9 @@ var javaScriptBase_default2 = createPersonalJavaScriptBaseConfig;
|
|
|
3967
3991
|
// src/configs/combined/javaScriptBase.ts
|
|
3968
3992
|
function createCombinedJavaScriptBaseConfig(plugin) {
|
|
3969
3993
|
return [
|
|
3994
|
+
{
|
|
3995
|
+
name: "@alextheman/combined/javascript"
|
|
3996
|
+
},
|
|
3970
3997
|
...pluginBase_default(plugin),
|
|
3971
3998
|
...javaScriptBase_default,
|
|
3972
3999
|
...javaScriptBase_default2(plugin),
|
|
@@ -3980,22 +4007,28 @@ var import_eslint_plugin_jsx_a11y = __toESM(require("eslint-plugin-jsx-a11y"), 1
|
|
|
3980
4007
|
var import_eslint_plugin_react = __toESM(require("eslint-plugin-react"), 1);
|
|
3981
4008
|
var import_eslint_plugin_react_hooks = __toESM(require("eslint-plugin-react-hooks"), 1);
|
|
3982
4009
|
var import_eslint_plugin_react_refresh = __toESM(require("eslint-plugin-react-refresh"), 1);
|
|
4010
|
+
|
|
4011
|
+
// src/configs/miscellaneous/reactLanguageOptions.ts
|
|
3983
4012
|
var import_globals3 = __toESM(require_globals2(), 1);
|
|
4013
|
+
var reactLanguageOptions = {
|
|
4014
|
+
ecmaVersion: 2020,
|
|
4015
|
+
globals: import_globals3.default.browser,
|
|
4016
|
+
parserOptions: {
|
|
4017
|
+
ecmaFeatures: {
|
|
4018
|
+
jsx: true
|
|
4019
|
+
}
|
|
4020
|
+
}
|
|
4021
|
+
};
|
|
4022
|
+
var reactLanguageOptions_default = reactLanguageOptions;
|
|
4023
|
+
|
|
4024
|
+
// src/configs/general/reactBase.ts
|
|
3984
4025
|
var reactBase = [
|
|
3985
4026
|
import_eslint_plugin_react.default.configs.flat.recommended,
|
|
3986
4027
|
import_eslint_plugin_react.default.configs.flat["jsx-runtime"],
|
|
3987
4028
|
import_eslint_plugin_jsx_a11y.default.flatConfigs.recommended,
|
|
3988
4029
|
{
|
|
3989
|
-
languageOptions:
|
|
3990
|
-
|
|
3991
|
-
globals: import_globals3.default.browser,
|
|
3992
|
-
parserOptions: {
|
|
3993
|
-
ecmaFeatures: {
|
|
3994
|
-
jsx: true
|
|
3995
|
-
}
|
|
3996
|
-
}
|
|
3997
|
-
},
|
|
3998
|
-
name: "@alextheman/eslint-config-react-base",
|
|
4030
|
+
languageOptions: reactLanguageOptions_default,
|
|
4031
|
+
name: "@alextheman/general/react",
|
|
3999
4032
|
plugins: {
|
|
4000
4033
|
react: import_eslint_plugin_react.default,
|
|
4001
4034
|
"react-hooks": import_eslint_plugin_react_hooks.default,
|
|
@@ -4025,19 +4058,10 @@ var reactBase_default = reactBase;
|
|
|
4025
4058
|
var import_eslint_plugin_react2 = __toESM(require("eslint-plugin-react"), 1);
|
|
4026
4059
|
var import_eslint_plugin_react_hooks2 = __toESM(require("eslint-plugin-react-hooks"), 1);
|
|
4027
4060
|
var import_eslint_plugin_react_refresh2 = __toESM(require("eslint-plugin-react-refresh"), 1);
|
|
4028
|
-
var import_globals4 = __toESM(require_globals2(), 1);
|
|
4029
4061
|
var personalReactBaseConfig = [
|
|
4030
4062
|
{
|
|
4031
|
-
languageOptions:
|
|
4032
|
-
|
|
4033
|
-
globals: import_globals4.default.browser,
|
|
4034
|
-
parserOptions: {
|
|
4035
|
-
ecmaFeatures: {
|
|
4036
|
-
jsx: true
|
|
4037
|
-
}
|
|
4038
|
-
}
|
|
4039
|
-
},
|
|
4040
|
-
name: "@alextheman/eslint-config-react-base",
|
|
4063
|
+
languageOptions: reactLanguageOptions_default,
|
|
4064
|
+
name: "@alextheman/personal/react",
|
|
4041
4065
|
plugins: {
|
|
4042
4066
|
react: import_eslint_plugin_react2.default,
|
|
4043
4067
|
"react-hooks": import_eslint_plugin_react_hooks2.default,
|
|
@@ -4064,39 +4088,47 @@ var personalReactBaseConfig = [
|
|
|
4064
4088
|
var reactBase_default2 = personalReactBaseConfig;
|
|
4065
4089
|
|
|
4066
4090
|
// src/configs/combined/reactBase.ts
|
|
4067
|
-
var combinedReactBaseConfig = [
|
|
4091
|
+
var combinedReactBaseConfig = [
|
|
4092
|
+
{ name: "@alextheman/combined/react" },
|
|
4093
|
+
...reactBase_default,
|
|
4094
|
+
...reactBase_default2
|
|
4095
|
+
];
|
|
4068
4096
|
var reactBase_default3 = combinedReactBaseConfig;
|
|
4069
4097
|
|
|
4070
4098
|
// src/configs/combined/javaScriptReactBase.ts
|
|
4071
4099
|
function createCombinedJavaScriptReactBaseConfig(plugin) {
|
|
4072
|
-
return [
|
|
4100
|
+
return [
|
|
4101
|
+
{ name: "@alextheman/combined/javascript-react" },
|
|
4102
|
+
...javaScriptBase_default3(plugin),
|
|
4103
|
+
...reactBase_default3
|
|
4104
|
+
];
|
|
4073
4105
|
}
|
|
4074
4106
|
var javaScriptReactBase_default = createCombinedJavaScriptReactBaseConfig;
|
|
4075
4107
|
|
|
4076
|
-
// src/configs/general/
|
|
4077
|
-
var
|
|
4078
|
-
|
|
4108
|
+
// src/configs/general/typeScriptBase.ts
|
|
4109
|
+
var import_typescript_eslint = __toESM(require("typescript-eslint"), 1);
|
|
4110
|
+
|
|
4111
|
+
// src/configs/miscellaneous/typeScriptLanguageOptions.ts
|
|
4112
|
+
var import_parser = __toESM(require("@typescript-eslint/parser"), 1);
|
|
4113
|
+
var typeScriptLanguageOptions = {
|
|
4114
|
+
parser: import_parser.default,
|
|
4115
|
+
parserOptions: {
|
|
4116
|
+
ecmaVersion: "latest",
|
|
4117
|
+
projectService: true,
|
|
4118
|
+
sourceType: "module",
|
|
4119
|
+
tsconfigRootDir: process.cwd()
|
|
4120
|
+
}
|
|
4079
4121
|
};
|
|
4080
|
-
var
|
|
4122
|
+
var typeScriptLanguageOptions_default = typeScriptLanguageOptions;
|
|
4081
4123
|
|
|
4082
4124
|
// src/configs/general/typeScriptBase.ts
|
|
4083
|
-
var import_parser = __toESM(require("@typescript-eslint/parser"), 1);
|
|
4084
|
-
var import_typescript_eslint = __toESM(require("typescript-eslint"), 1);
|
|
4085
4125
|
var typeScriptBase = [
|
|
4086
4126
|
...import_typescript_eslint.default.configs.recommended,
|
|
4087
4127
|
...javaScriptBase_default,
|
|
4088
4128
|
{
|
|
4089
4129
|
files: ["**/*.ts", "**/*.tsx"],
|
|
4090
|
-
languageOptions:
|
|
4091
|
-
|
|
4092
|
-
parserOptions: {
|
|
4093
|
-
ecmaVersion: "latest",
|
|
4094
|
-
projectService: true,
|
|
4095
|
-
sourceType: "module",
|
|
4096
|
-
tsconfigRootDir: process.cwd()
|
|
4097
|
-
}
|
|
4098
|
-
},
|
|
4099
|
-
name: "@alextheman/eslint-config-typescript-base",
|
|
4130
|
+
languageOptions: typeScriptLanguageOptions_default,
|
|
4131
|
+
name: "@alextheman/general/typescript",
|
|
4100
4132
|
rules: {
|
|
4101
4133
|
"@typescript-eslint/consistent-type-exports": "error",
|
|
4102
4134
|
"@typescript-eslint/consistent-type-imports": "error",
|
|
@@ -4130,9 +4162,32 @@ var typeScriptBase_default = typeScriptBase;
|
|
|
4130
4162
|
|
|
4131
4163
|
// src/configs/personal/eslintPlugin.ts
|
|
4132
4164
|
var import_eslint_plugin_perfectionist2 = __toESM(require("eslint-plugin-perfectionist"), 1);
|
|
4165
|
+
|
|
4166
|
+
// src/configs/miscellaneous/sortObjects.ts
|
|
4167
|
+
var sortObjects = {
|
|
4168
|
+
customGroups: [],
|
|
4169
|
+
destructuredObjects: true,
|
|
4170
|
+
fallbackSort: { type: "unsorted" },
|
|
4171
|
+
groups: [],
|
|
4172
|
+
ignoreCase: true,
|
|
4173
|
+
ignorePattern: [],
|
|
4174
|
+
newlinesBetween: "ignore",
|
|
4175
|
+
objectDeclarations: true,
|
|
4176
|
+
order: "asc",
|
|
4177
|
+
partitionByComment: false,
|
|
4178
|
+
partitionByNewLine: false,
|
|
4179
|
+
specialCharacters: "keep",
|
|
4180
|
+
styledComponents: true,
|
|
4181
|
+
type: "alphabetical",
|
|
4182
|
+
useConfigurationIf: {}
|
|
4183
|
+
};
|
|
4184
|
+
var sortObjects_default = sortObjects;
|
|
4185
|
+
|
|
4186
|
+
// src/configs/personal/eslintPlugin.ts
|
|
4133
4187
|
function createPersonalEslintPluginConfig(plugin) {
|
|
4134
4188
|
return [
|
|
4135
4189
|
{
|
|
4190
|
+
name: "@alextheman/personal/eslint-plugin",
|
|
4136
4191
|
plugins: {
|
|
4137
4192
|
"@alextheman": plugin,
|
|
4138
4193
|
perfectionist: import_eslint_plugin_perfectionist2.default
|
|
@@ -4163,26 +4218,7 @@ function createPersonalEslintPluginConfig(plugin) {
|
|
|
4163
4218
|
// as well to make it easier to compare against the file directory.
|
|
4164
4219
|
files: ["src/rules/index.ts", "src/configs/**"],
|
|
4165
4220
|
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
|
-
]
|
|
4221
|
+
"perfectionist/sort-objects": ["error", sortObjects_default]
|
|
4186
4222
|
}
|
|
4187
4223
|
}
|
|
4188
4224
|
];
|
|
@@ -4192,6 +4228,7 @@ var eslintPlugin_default = createPersonalEslintPluginConfig;
|
|
|
4192
4228
|
// src/configs/personal/neurosongsBackEnd.ts
|
|
4193
4229
|
var neurosongsBackEndConfig = [
|
|
4194
4230
|
{
|
|
4231
|
+
name: "@alextheman/personal/neurosongs-back-end",
|
|
4195
4232
|
rules: {
|
|
4196
4233
|
"no-restricted-imports": [
|
|
4197
4234
|
"error",
|
|
@@ -4240,6 +4277,7 @@ var neurosongsBackEnd_default = neurosongsBackEndConfig;
|
|
|
4240
4277
|
// src/configs/personal/neurosongsFrontEnd.ts
|
|
4241
4278
|
var neurosongsFrontEndConfig = [
|
|
4242
4279
|
{
|
|
4280
|
+
name: "@alextheman/personal/neurosongs-front-end",
|
|
4243
4281
|
rules: {
|
|
4244
4282
|
"no-restricted-imports": [
|
|
4245
4283
|
"error",
|
|
@@ -4283,21 +4321,13 @@ var neurosongsFrontEndConfig = [
|
|
|
4283
4321
|
var neurosongsFrontEnd_default = neurosongsFrontEndConfig;
|
|
4284
4322
|
|
|
4285
4323
|
// src/configs/personal/typeScriptBase.ts
|
|
4286
|
-
var import_parser2 = __toESM(require("@typescript-eslint/parser"), 1);
|
|
4287
4324
|
var import_typescript_eslint2 = __toESM(require("typescript-eslint"), 1);
|
|
4288
4325
|
function createPersonalTypeScriptBaseConfig(plugin) {
|
|
4289
4326
|
return [
|
|
4290
4327
|
{
|
|
4291
4328
|
files: ["**/*.ts", "**/*.tsx"],
|
|
4292
|
-
languageOptions:
|
|
4293
|
-
|
|
4294
|
-
parserOptions: {
|
|
4295
|
-
ecmaVersion: "latest",
|
|
4296
|
-
projectService: true,
|
|
4297
|
-
sourceType: "module",
|
|
4298
|
-
tsconfigRootDir: process.cwd()
|
|
4299
|
-
}
|
|
4300
|
-
},
|
|
4329
|
+
languageOptions: typeScriptLanguageOptions_default,
|
|
4330
|
+
name: "@alextheman/personal/typescript",
|
|
4301
4331
|
plugins: {
|
|
4302
4332
|
"@alextheman": plugin,
|
|
4303
4333
|
"@typescript-eslint": import_typescript_eslint2.default.plugin
|
|
@@ -4321,6 +4351,7 @@ var typeScriptBase_default2 = createPersonalTypeScriptBaseConfig;
|
|
|
4321
4351
|
var import_typescript_eslint3 = __toESM(require("typescript-eslint"), 1);
|
|
4322
4352
|
var utilityConfig = [
|
|
4323
4353
|
{
|
|
4354
|
+
name: "@alextheman/personal/utility",
|
|
4324
4355
|
plugins: {
|
|
4325
4356
|
"@typescript-eslint": import_typescript_eslint3.default.plugin
|
|
4326
4357
|
},
|
|
@@ -4334,6 +4365,7 @@ var utility_default = utilityConfig;
|
|
|
4334
4365
|
// src/configs/combined/typeScriptBase.ts
|
|
4335
4366
|
function createCombinedTypeScriptBaseConfig(plugin) {
|
|
4336
4367
|
return [
|
|
4368
|
+
{ name: "@alextheman/combined/typescript" },
|
|
4337
4369
|
...javaScriptBase_default3(plugin),
|
|
4338
4370
|
...typeScriptBase_default,
|
|
4339
4371
|
...typeScriptBase_default2(plugin)
|
|
@@ -4343,10 +4375,30 @@ var typeScriptBase_default3 = createCombinedTypeScriptBaseConfig;
|
|
|
4343
4375
|
|
|
4344
4376
|
// src/configs/combined/typeScriptReactBase.ts
|
|
4345
4377
|
function createCombinedTypeScriptReactBaseConfig(plugin) {
|
|
4346
|
-
return [
|
|
4378
|
+
return [
|
|
4379
|
+
{ name: "@alextheman/combined/typescript-react" },
|
|
4380
|
+
...typeScriptBase_default3(plugin),
|
|
4381
|
+
...reactBase_default3
|
|
4382
|
+
];
|
|
4347
4383
|
}
|
|
4348
4384
|
var typeScriptReactBase_default = createCombinedTypeScriptReactBaseConfig;
|
|
4349
4385
|
|
|
4386
|
+
// src/configs/personal/alexCLine.ts
|
|
4387
|
+
var import_eslint_plugin_perfectionist3 = __toESM(require("eslint-plugin-perfectionist"), 1);
|
|
4388
|
+
var alexCLineConfig = [
|
|
4389
|
+
{
|
|
4390
|
+
files: ["src/commands/index.ts"],
|
|
4391
|
+
name: "@alextheman/personal/alex-c-line",
|
|
4392
|
+
plugins: {
|
|
4393
|
+
perfectionist: import_eslint_plugin_perfectionist3.default
|
|
4394
|
+
},
|
|
4395
|
+
rules: {
|
|
4396
|
+
"perfectionist/sort-objects": ["error", sortObjects_default]
|
|
4397
|
+
}
|
|
4398
|
+
}
|
|
4399
|
+
];
|
|
4400
|
+
var alexCLine_default = alexCLineConfig;
|
|
4401
|
+
|
|
4350
4402
|
// src/utility/camelToKebab.ts
|
|
4351
4403
|
var import_utility2 = require("@alextheman/utility");
|
|
4352
4404
|
function camelToKebab(string) {
|
|
@@ -4399,6 +4451,7 @@ function createAlexPluginConfigs(plugin) {
|
|
|
4399
4451
|
typeScript: typeScriptBase_default
|
|
4400
4452
|
},
|
|
4401
4453
|
personal: {
|
|
4454
|
+
alexCLine: alexCLine_default,
|
|
4402
4455
|
eslintPlugin: eslintPlugin_default(plugin),
|
|
4403
4456
|
javaScript: javaScriptBase_default2(plugin),
|
|
4404
4457
|
neurosongsBackEnd: neurosongsBackEnd_default,
|
|
@@ -5011,5 +5064,6 @@ var index_default = alexPlugin_default;
|
|
|
5011
5064
|
// Annotate the CommonJS export names for ESM import in node:
|
|
5012
5065
|
0 && (module.exports = {
|
|
5013
5066
|
parseTestFunction,
|
|
5014
|
-
prettierRules
|
|
5067
|
+
prettierRules,
|
|
5068
|
+
sortObjects
|
|
5015
5069
|
});
|
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.8";
|
|
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.8";
|
|
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.8";
|
|
3747
3747
|
|
|
3748
3748
|
// src/configs/index.ts
|
|
3749
3749
|
import packageJson from "eslint-plugin-package-json";
|
|
@@ -3756,6 +3756,7 @@ var personalTestsBaseConfig = [
|
|
|
3756
3756
|
languageOptions: {
|
|
3757
3757
|
globals: __spreadValues(__spreadValues(__spreadValues({}, import_globals.default.node), import_globals.default.browser), import_globals.default.vitest)
|
|
3758
3758
|
},
|
|
3759
|
+
name: "@alextheman/personal/tests",
|
|
3759
3760
|
rules: {
|
|
3760
3761
|
"no-restricted-globals": [
|
|
3761
3762
|
"error",
|
|
@@ -3792,6 +3793,7 @@ var testsBase_default = personalTestsBaseConfig;
|
|
|
3792
3793
|
function createPluginBaseConfig(plugin) {
|
|
3793
3794
|
return [
|
|
3794
3795
|
{
|
|
3796
|
+
name: "@alextheman/plugin/base",
|
|
3795
3797
|
plugins: {
|
|
3796
3798
|
"@alextheman": plugin
|
|
3797
3799
|
},
|
|
@@ -3810,6 +3812,7 @@ function createPluginTestsBaseConfig(plugin) {
|
|
|
3810
3812
|
return [
|
|
3811
3813
|
{
|
|
3812
3814
|
files: ["**/*.test.ts"],
|
|
3815
|
+
name: "@alextheman/plugin/tests",
|
|
3813
3816
|
plugins: {
|
|
3814
3817
|
"@alextheman": plugin
|
|
3815
3818
|
},
|
|
@@ -3825,25 +3828,35 @@ var testsBase_default2 = createPluginTestsBaseConfig;
|
|
|
3825
3828
|
|
|
3826
3829
|
// src/configs/combined/testsBase.ts
|
|
3827
3830
|
function createCombinedTestsBaseConfig(plugin) {
|
|
3828
|
-
return [
|
|
3831
|
+
return [
|
|
3832
|
+
{ name: "@alextheman/combined/tests" },
|
|
3833
|
+
...testsBase_default2(plugin),
|
|
3834
|
+
...testsBase_default
|
|
3835
|
+
];
|
|
3829
3836
|
}
|
|
3830
3837
|
var testsBase_default3 = createCombinedTestsBaseConfig;
|
|
3831
3838
|
|
|
3832
3839
|
// src/configs/general/javaScriptBase.ts
|
|
3833
3840
|
var import_js = __toESM(require_src(), 1);
|
|
3834
|
-
var import_globals2 = __toESM(require_globals2(), 1);
|
|
3835
3841
|
import prettierConfig from "eslint-config-prettier";
|
|
3836
3842
|
import importPlugin from "eslint-plugin-import";
|
|
3843
|
+
|
|
3844
|
+
// src/configs/miscellaneous/javaScriptLanguageOptions.ts
|
|
3845
|
+
var import_globals2 = __toESM(require_globals2(), 1);
|
|
3846
|
+
var javaScriptLanguageOptions = {
|
|
3847
|
+
globals: __spreadValues(__spreadValues(__spreadValues({}, import_globals2.default.node), import_globals2.default.browser), import_globals2.default.vitest)
|
|
3848
|
+
};
|
|
3849
|
+
var javaScriptLanguageOptions_default = javaScriptLanguageOptions;
|
|
3850
|
+
|
|
3851
|
+
// src/configs/general/javaScriptBase.ts
|
|
3837
3852
|
var javaScriptBase = [
|
|
3838
3853
|
import_js.default.configs.recommended,
|
|
3839
3854
|
prettierConfig,
|
|
3840
3855
|
{
|
|
3841
3856
|
files: ["**/*.js", "**/*.jsx", "**/*.ts", "**/*.tsx"],
|
|
3842
3857
|
ignores: ["dist"],
|
|
3843
|
-
languageOptions:
|
|
3844
|
-
|
|
3845
|
-
},
|
|
3846
|
-
name: "@alextheman/eslint-config-javascript-base",
|
|
3858
|
+
languageOptions: javaScriptLanguageOptions_default,
|
|
3859
|
+
name: "@alextheman/general/javascript",
|
|
3847
3860
|
plugins: {
|
|
3848
3861
|
import: importPlugin
|
|
3849
3862
|
},
|
|
@@ -3892,10 +3905,20 @@ var javaScriptBase_default = javaScriptBase;
|
|
|
3892
3905
|
// src/configs/personal/javaScriptBase.ts
|
|
3893
3906
|
import perfectionist from "eslint-plugin-perfectionist";
|
|
3894
3907
|
import prettierPlugin from "eslint-plugin-prettier";
|
|
3908
|
+
|
|
3909
|
+
// src/configs/miscellaneous/prettierRules.ts
|
|
3910
|
+
var prettierRules = {
|
|
3911
|
+
printWidth: 100
|
|
3912
|
+
};
|
|
3913
|
+
var prettierRules_default = prettierRules;
|
|
3914
|
+
|
|
3915
|
+
// src/configs/personal/javaScriptBase.ts
|
|
3895
3916
|
function createPersonalJavaScriptBaseConfig(plugin) {
|
|
3896
3917
|
return [
|
|
3897
3918
|
{
|
|
3898
3919
|
files: ["**/*.js", "**/*.jsx", "**/*.ts", "**/*.tsx"],
|
|
3920
|
+
languageOptions: javaScriptLanguageOptions_default,
|
|
3921
|
+
name: "@alextheman/personal/javascript",
|
|
3899
3922
|
plugins: {
|
|
3900
3923
|
"@alextheman": plugin,
|
|
3901
3924
|
perfectionist,
|
|
@@ -3952,6 +3975,9 @@ var javaScriptBase_default2 = createPersonalJavaScriptBaseConfig;
|
|
|
3952
3975
|
// src/configs/combined/javaScriptBase.ts
|
|
3953
3976
|
function createCombinedJavaScriptBaseConfig(plugin) {
|
|
3954
3977
|
return [
|
|
3978
|
+
{
|
|
3979
|
+
name: "@alextheman/combined/javascript"
|
|
3980
|
+
},
|
|
3955
3981
|
...pluginBase_default(plugin),
|
|
3956
3982
|
...javaScriptBase_default,
|
|
3957
3983
|
...javaScriptBase_default2(plugin),
|
|
@@ -3961,26 +3987,32 @@ function createCombinedJavaScriptBaseConfig(plugin) {
|
|
|
3961
3987
|
var javaScriptBase_default3 = createCombinedJavaScriptBaseConfig;
|
|
3962
3988
|
|
|
3963
3989
|
// src/configs/general/reactBase.ts
|
|
3964
|
-
var import_globals3 = __toESM(require_globals2(), 1);
|
|
3965
3990
|
import jsxA11y from "eslint-plugin-jsx-a11y";
|
|
3966
3991
|
import reactPlugin from "eslint-plugin-react";
|
|
3967
3992
|
import reactHooks from "eslint-plugin-react-hooks";
|
|
3968
3993
|
import reactRefresh from "eslint-plugin-react-refresh";
|
|
3994
|
+
|
|
3995
|
+
// src/configs/miscellaneous/reactLanguageOptions.ts
|
|
3996
|
+
var import_globals3 = __toESM(require_globals2(), 1);
|
|
3997
|
+
var reactLanguageOptions = {
|
|
3998
|
+
ecmaVersion: 2020,
|
|
3999
|
+
globals: import_globals3.default.browser,
|
|
4000
|
+
parserOptions: {
|
|
4001
|
+
ecmaFeatures: {
|
|
4002
|
+
jsx: true
|
|
4003
|
+
}
|
|
4004
|
+
}
|
|
4005
|
+
};
|
|
4006
|
+
var reactLanguageOptions_default = reactLanguageOptions;
|
|
4007
|
+
|
|
4008
|
+
// src/configs/general/reactBase.ts
|
|
3969
4009
|
var reactBase = [
|
|
3970
4010
|
reactPlugin.configs.flat.recommended,
|
|
3971
4011
|
reactPlugin.configs.flat["jsx-runtime"],
|
|
3972
4012
|
jsxA11y.flatConfigs.recommended,
|
|
3973
4013
|
{
|
|
3974
|
-
languageOptions:
|
|
3975
|
-
|
|
3976
|
-
globals: import_globals3.default.browser,
|
|
3977
|
-
parserOptions: {
|
|
3978
|
-
ecmaFeatures: {
|
|
3979
|
-
jsx: true
|
|
3980
|
-
}
|
|
3981
|
-
}
|
|
3982
|
-
},
|
|
3983
|
-
name: "@alextheman/eslint-config-react-base",
|
|
4014
|
+
languageOptions: reactLanguageOptions_default,
|
|
4015
|
+
name: "@alextheman/general/react",
|
|
3984
4016
|
plugins: {
|
|
3985
4017
|
react: reactPlugin,
|
|
3986
4018
|
"react-hooks": reactHooks,
|
|
@@ -4007,22 +4039,13 @@ var reactBase = [
|
|
|
4007
4039
|
var reactBase_default = reactBase;
|
|
4008
4040
|
|
|
4009
4041
|
// src/configs/personal/reactBase.ts
|
|
4010
|
-
var import_globals4 = __toESM(require_globals2(), 1);
|
|
4011
4042
|
import reactPlugin2 from "eslint-plugin-react";
|
|
4012
4043
|
import reactHooks2 from "eslint-plugin-react-hooks";
|
|
4013
4044
|
import reactRefresh2 from "eslint-plugin-react-refresh";
|
|
4014
4045
|
var personalReactBaseConfig = [
|
|
4015
4046
|
{
|
|
4016
|
-
languageOptions:
|
|
4017
|
-
|
|
4018
|
-
globals: import_globals4.default.browser,
|
|
4019
|
-
parserOptions: {
|
|
4020
|
-
ecmaFeatures: {
|
|
4021
|
-
jsx: true
|
|
4022
|
-
}
|
|
4023
|
-
}
|
|
4024
|
-
},
|
|
4025
|
-
name: "@alextheman/eslint-config-react-base",
|
|
4047
|
+
languageOptions: reactLanguageOptions_default,
|
|
4048
|
+
name: "@alextheman/personal/react",
|
|
4026
4049
|
plugins: {
|
|
4027
4050
|
react: reactPlugin2,
|
|
4028
4051
|
"react-hooks": reactHooks2,
|
|
@@ -4049,39 +4072,47 @@ var personalReactBaseConfig = [
|
|
|
4049
4072
|
var reactBase_default2 = personalReactBaseConfig;
|
|
4050
4073
|
|
|
4051
4074
|
// src/configs/combined/reactBase.ts
|
|
4052
|
-
var combinedReactBaseConfig = [
|
|
4075
|
+
var combinedReactBaseConfig = [
|
|
4076
|
+
{ name: "@alextheman/combined/react" },
|
|
4077
|
+
...reactBase_default,
|
|
4078
|
+
...reactBase_default2
|
|
4079
|
+
];
|
|
4053
4080
|
var reactBase_default3 = combinedReactBaseConfig;
|
|
4054
4081
|
|
|
4055
4082
|
// src/configs/combined/javaScriptReactBase.ts
|
|
4056
4083
|
function createCombinedJavaScriptReactBaseConfig(plugin) {
|
|
4057
|
-
return [
|
|
4084
|
+
return [
|
|
4085
|
+
{ name: "@alextheman/combined/javascript-react" },
|
|
4086
|
+
...javaScriptBase_default3(plugin),
|
|
4087
|
+
...reactBase_default3
|
|
4088
|
+
];
|
|
4058
4089
|
}
|
|
4059
4090
|
var javaScriptReactBase_default = createCombinedJavaScriptReactBaseConfig;
|
|
4060
4091
|
|
|
4061
|
-
// src/configs/general/
|
|
4062
|
-
|
|
4063
|
-
|
|
4092
|
+
// src/configs/general/typeScriptBase.ts
|
|
4093
|
+
import tseslint from "typescript-eslint";
|
|
4094
|
+
|
|
4095
|
+
// src/configs/miscellaneous/typeScriptLanguageOptions.ts
|
|
4096
|
+
import tsparser from "@typescript-eslint/parser";
|
|
4097
|
+
var typeScriptLanguageOptions = {
|
|
4098
|
+
parser: tsparser,
|
|
4099
|
+
parserOptions: {
|
|
4100
|
+
ecmaVersion: "latest",
|
|
4101
|
+
projectService: true,
|
|
4102
|
+
sourceType: "module",
|
|
4103
|
+
tsconfigRootDir: process.cwd()
|
|
4104
|
+
}
|
|
4064
4105
|
};
|
|
4065
|
-
var
|
|
4106
|
+
var typeScriptLanguageOptions_default = typeScriptLanguageOptions;
|
|
4066
4107
|
|
|
4067
4108
|
// src/configs/general/typeScriptBase.ts
|
|
4068
|
-
import tsparser from "@typescript-eslint/parser";
|
|
4069
|
-
import tseslint from "typescript-eslint";
|
|
4070
4109
|
var typeScriptBase = [
|
|
4071
4110
|
...tseslint.configs.recommended,
|
|
4072
4111
|
...javaScriptBase_default,
|
|
4073
4112
|
{
|
|
4074
4113
|
files: ["**/*.ts", "**/*.tsx"],
|
|
4075
|
-
languageOptions:
|
|
4076
|
-
|
|
4077
|
-
parserOptions: {
|
|
4078
|
-
ecmaVersion: "latest",
|
|
4079
|
-
projectService: true,
|
|
4080
|
-
sourceType: "module",
|
|
4081
|
-
tsconfigRootDir: process.cwd()
|
|
4082
|
-
}
|
|
4083
|
-
},
|
|
4084
|
-
name: "@alextheman/eslint-config-typescript-base",
|
|
4114
|
+
languageOptions: typeScriptLanguageOptions_default,
|
|
4115
|
+
name: "@alextheman/general/typescript",
|
|
4085
4116
|
rules: {
|
|
4086
4117
|
"@typescript-eslint/consistent-type-exports": "error",
|
|
4087
4118
|
"@typescript-eslint/consistent-type-imports": "error",
|
|
@@ -4115,9 +4146,32 @@ var typeScriptBase_default = typeScriptBase;
|
|
|
4115
4146
|
|
|
4116
4147
|
// src/configs/personal/eslintPlugin.ts
|
|
4117
4148
|
import perfectionist2 from "eslint-plugin-perfectionist";
|
|
4149
|
+
|
|
4150
|
+
// src/configs/miscellaneous/sortObjects.ts
|
|
4151
|
+
var sortObjects = {
|
|
4152
|
+
customGroups: [],
|
|
4153
|
+
destructuredObjects: true,
|
|
4154
|
+
fallbackSort: { type: "unsorted" },
|
|
4155
|
+
groups: [],
|
|
4156
|
+
ignoreCase: true,
|
|
4157
|
+
ignorePattern: [],
|
|
4158
|
+
newlinesBetween: "ignore",
|
|
4159
|
+
objectDeclarations: true,
|
|
4160
|
+
order: "asc",
|
|
4161
|
+
partitionByComment: false,
|
|
4162
|
+
partitionByNewLine: false,
|
|
4163
|
+
specialCharacters: "keep",
|
|
4164
|
+
styledComponents: true,
|
|
4165
|
+
type: "alphabetical",
|
|
4166
|
+
useConfigurationIf: {}
|
|
4167
|
+
};
|
|
4168
|
+
var sortObjects_default = sortObjects;
|
|
4169
|
+
|
|
4170
|
+
// src/configs/personal/eslintPlugin.ts
|
|
4118
4171
|
function createPersonalEslintPluginConfig(plugin) {
|
|
4119
4172
|
return [
|
|
4120
4173
|
{
|
|
4174
|
+
name: "@alextheman/personal/eslint-plugin",
|
|
4121
4175
|
plugins: {
|
|
4122
4176
|
"@alextheman": plugin,
|
|
4123
4177
|
perfectionist: perfectionist2
|
|
@@ -4148,26 +4202,7 @@ function createPersonalEslintPluginConfig(plugin) {
|
|
|
4148
4202
|
// as well to make it easier to compare against the file directory.
|
|
4149
4203
|
files: ["src/rules/index.ts", "src/configs/**"],
|
|
4150
4204
|
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
|
-
]
|
|
4205
|
+
"perfectionist/sort-objects": ["error", sortObjects_default]
|
|
4171
4206
|
}
|
|
4172
4207
|
}
|
|
4173
4208
|
];
|
|
@@ -4177,6 +4212,7 @@ var eslintPlugin_default = createPersonalEslintPluginConfig;
|
|
|
4177
4212
|
// src/configs/personal/neurosongsBackEnd.ts
|
|
4178
4213
|
var neurosongsBackEndConfig = [
|
|
4179
4214
|
{
|
|
4215
|
+
name: "@alextheman/personal/neurosongs-back-end",
|
|
4180
4216
|
rules: {
|
|
4181
4217
|
"no-restricted-imports": [
|
|
4182
4218
|
"error",
|
|
@@ -4225,6 +4261,7 @@ var neurosongsBackEnd_default = neurosongsBackEndConfig;
|
|
|
4225
4261
|
// src/configs/personal/neurosongsFrontEnd.ts
|
|
4226
4262
|
var neurosongsFrontEndConfig = [
|
|
4227
4263
|
{
|
|
4264
|
+
name: "@alextheman/personal/neurosongs-front-end",
|
|
4228
4265
|
rules: {
|
|
4229
4266
|
"no-restricted-imports": [
|
|
4230
4267
|
"error",
|
|
@@ -4268,21 +4305,13 @@ var neurosongsFrontEndConfig = [
|
|
|
4268
4305
|
var neurosongsFrontEnd_default = neurosongsFrontEndConfig;
|
|
4269
4306
|
|
|
4270
4307
|
// src/configs/personal/typeScriptBase.ts
|
|
4271
|
-
import tsparser2 from "@typescript-eslint/parser";
|
|
4272
4308
|
import tseslint2 from "typescript-eslint";
|
|
4273
4309
|
function createPersonalTypeScriptBaseConfig(plugin) {
|
|
4274
4310
|
return [
|
|
4275
4311
|
{
|
|
4276
4312
|
files: ["**/*.ts", "**/*.tsx"],
|
|
4277
|
-
languageOptions:
|
|
4278
|
-
|
|
4279
|
-
parserOptions: {
|
|
4280
|
-
ecmaVersion: "latest",
|
|
4281
|
-
projectService: true,
|
|
4282
|
-
sourceType: "module",
|
|
4283
|
-
tsconfigRootDir: process.cwd()
|
|
4284
|
-
}
|
|
4285
|
-
},
|
|
4313
|
+
languageOptions: typeScriptLanguageOptions_default,
|
|
4314
|
+
name: "@alextheman/personal/typescript",
|
|
4286
4315
|
plugins: {
|
|
4287
4316
|
"@alextheman": plugin,
|
|
4288
4317
|
"@typescript-eslint": tseslint2.plugin
|
|
@@ -4306,6 +4335,7 @@ var typeScriptBase_default2 = createPersonalTypeScriptBaseConfig;
|
|
|
4306
4335
|
import tseslint3 from "typescript-eslint";
|
|
4307
4336
|
var utilityConfig = [
|
|
4308
4337
|
{
|
|
4338
|
+
name: "@alextheman/personal/utility",
|
|
4309
4339
|
plugins: {
|
|
4310
4340
|
"@typescript-eslint": tseslint3.plugin
|
|
4311
4341
|
},
|
|
@@ -4319,6 +4349,7 @@ var utility_default = utilityConfig;
|
|
|
4319
4349
|
// src/configs/combined/typeScriptBase.ts
|
|
4320
4350
|
function createCombinedTypeScriptBaseConfig(plugin) {
|
|
4321
4351
|
return [
|
|
4352
|
+
{ name: "@alextheman/combined/typescript" },
|
|
4322
4353
|
...javaScriptBase_default3(plugin),
|
|
4323
4354
|
...typeScriptBase_default,
|
|
4324
4355
|
...typeScriptBase_default2(plugin)
|
|
@@ -4328,10 +4359,30 @@ var typeScriptBase_default3 = createCombinedTypeScriptBaseConfig;
|
|
|
4328
4359
|
|
|
4329
4360
|
// src/configs/combined/typeScriptReactBase.ts
|
|
4330
4361
|
function createCombinedTypeScriptReactBaseConfig(plugin) {
|
|
4331
|
-
return [
|
|
4362
|
+
return [
|
|
4363
|
+
{ name: "@alextheman/combined/typescript-react" },
|
|
4364
|
+
...typeScriptBase_default3(plugin),
|
|
4365
|
+
...reactBase_default3
|
|
4366
|
+
];
|
|
4332
4367
|
}
|
|
4333
4368
|
var typeScriptReactBase_default = createCombinedTypeScriptReactBaseConfig;
|
|
4334
4369
|
|
|
4370
|
+
// src/configs/personal/alexCLine.ts
|
|
4371
|
+
import perfectionist3 from "eslint-plugin-perfectionist";
|
|
4372
|
+
var alexCLineConfig = [
|
|
4373
|
+
{
|
|
4374
|
+
files: ["src/commands/index.ts"],
|
|
4375
|
+
name: "@alextheman/personal/alex-c-line",
|
|
4376
|
+
plugins: {
|
|
4377
|
+
perfectionist: perfectionist3
|
|
4378
|
+
},
|
|
4379
|
+
rules: {
|
|
4380
|
+
"perfectionist/sort-objects": ["error", sortObjects_default]
|
|
4381
|
+
}
|
|
4382
|
+
}
|
|
4383
|
+
];
|
|
4384
|
+
var alexCLine_default = alexCLineConfig;
|
|
4385
|
+
|
|
4335
4386
|
// src/utility/camelToKebab.ts
|
|
4336
4387
|
import { camelToKebab as alexCamelToKebab } from "@alextheman/utility";
|
|
4337
4388
|
function camelToKebab(string) {
|
|
@@ -4384,6 +4435,7 @@ function createAlexPluginConfigs(plugin) {
|
|
|
4384
4435
|
typeScript: typeScriptBase_default
|
|
4385
4436
|
},
|
|
4386
4437
|
personal: {
|
|
4438
|
+
alexCLine: alexCLine_default,
|
|
4387
4439
|
eslintPlugin: eslintPlugin_default(plugin),
|
|
4388
4440
|
javaScript: javaScriptBase_default2(plugin),
|
|
4389
4441
|
neurosongsBackEnd: neurosongsBackEnd_default,
|
|
@@ -4996,5 +5048,6 @@ var index_default = alexPlugin_default;
|
|
|
4996
5048
|
export {
|
|
4997
5049
|
index_default as default,
|
|
4998
5050
|
parseTestFunction,
|
|
4999
|
-
prettierRules_default as prettierRules
|
|
5051
|
+
prettierRules_default as prettierRules,
|
|
5052
|
+
sortObjects_default as sortObjects
|
|
5000
5053
|
};
|