@alextheman/eslint-plugin 2.4.0 → 2.5.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/dist/index.cjs +45 -40
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +45 -40
- package/package.json +6 -6
package/dist/index.cjs
CHANGED
|
@@ -3715,7 +3715,11 @@ module.exports = __toCommonJS(index_exports);
|
|
|
3715
3715
|
|
|
3716
3716
|
// package.json
|
|
3717
3717
|
var name = "@alextheman/eslint-plugin";
|
|
3718
|
-
var version = "2.
|
|
3718
|
+
var version = "2.5.0";
|
|
3719
|
+
|
|
3720
|
+
// src/configs/combined/javaScriptBase.ts
|
|
3721
|
+
var import_eslint_plugin_perfectionist = __toESM(require("eslint-plugin-perfectionist"), 1);
|
|
3722
|
+
var import_eslint_plugin_prettier = __toESM(require("eslint-plugin-prettier"), 1);
|
|
3719
3723
|
|
|
3720
3724
|
// src/configs/plugin/pluginBase.ts
|
|
3721
3725
|
function createPluginBaseConfig(plugin) {
|
|
@@ -3796,8 +3800,6 @@ var import_js = __toESM(require_src(), 1);
|
|
|
3796
3800
|
var import_eslint_config_prettier = __toESM(require("eslint-config-prettier"), 1);
|
|
3797
3801
|
var import_eslint_plugin_import = __toESM(require("eslint-plugin-import"), 1);
|
|
3798
3802
|
var import_eslint_plugin_package_json = __toESM(require("eslint-plugin-package-json"), 1);
|
|
3799
|
-
var import_eslint_plugin_perfectionist = __toESM(require("eslint-plugin-perfectionist"), 1);
|
|
3800
|
-
var import_eslint_plugin_prettier = __toESM(require("eslint-plugin-prettier"), 1);
|
|
3801
3803
|
var import_globals = __toESM(require_globals2(), 1);
|
|
3802
3804
|
var javaScriptBase = [
|
|
3803
3805
|
import_js.default.configs.recommended,
|
|
@@ -3811,9 +3813,7 @@ var javaScriptBase = [
|
|
|
3811
3813
|
},
|
|
3812
3814
|
name: "@alextheman/eslint-config-javascript-base",
|
|
3813
3815
|
plugins: {
|
|
3814
|
-
import: import_eslint_plugin_import.default
|
|
3815
|
-
perfectionist: import_eslint_plugin_perfectionist.default,
|
|
3816
|
-
prettier: import_eslint_plugin_prettier.default
|
|
3816
|
+
import: import_eslint_plugin_import.default
|
|
3817
3817
|
},
|
|
3818
3818
|
rules: {
|
|
3819
3819
|
eqeqeq: "error",
|
|
@@ -3846,37 +3846,7 @@ var javaScriptBase = [
|
|
|
3846
3846
|
],
|
|
3847
3847
|
"no-useless-rename": "error",
|
|
3848
3848
|
"no-useless-return": "error",
|
|
3849
|
-
"
|
|
3850
|
-
"error",
|
|
3851
|
-
{
|
|
3852
|
-
customGroups: [],
|
|
3853
|
-
fallbackSort: { type: "natural" },
|
|
3854
|
-
groups: ["value-export", "type-export"],
|
|
3855
|
-
ignoreCase: true,
|
|
3856
|
-
newlinesBetween: 1,
|
|
3857
|
-
order: "asc",
|
|
3858
|
-
partitionByComment: false,
|
|
3859
|
-
partitionByNewLine: false,
|
|
3860
|
-
specialCharacters: "keep",
|
|
3861
|
-
type: "alphabetical"
|
|
3862
|
-
}
|
|
3863
|
-
],
|
|
3864
|
-
"perfectionist/sort-imports": [
|
|
3865
|
-
"error",
|
|
3866
|
-
{
|
|
3867
|
-
groups: ["type", "builtin", "external", "internal", "object"],
|
|
3868
|
-
ignoreCase: true,
|
|
3869
|
-
internalPattern: ["^src/.*"],
|
|
3870
|
-
newlinesBetween: 1,
|
|
3871
|
-
order: "asc",
|
|
3872
|
-
partitionByComment: false,
|
|
3873
|
-
partitionByNewLine: false,
|
|
3874
|
-
specialCharacters: "keep",
|
|
3875
|
-
type: "alphabetical"
|
|
3876
|
-
}
|
|
3877
|
-
],
|
|
3878
|
-
"prefer-const": "error",
|
|
3879
|
-
"sort-vars": "error"
|
|
3849
|
+
"prefer-const": "error"
|
|
3880
3850
|
},
|
|
3881
3851
|
settings: {
|
|
3882
3852
|
"import/resolver": {
|
|
@@ -3893,6 +3863,10 @@ function createCombinedJavaScriptBaseConfig(plugin) {
|
|
|
3893
3863
|
...pluginBase_default(plugin),
|
|
3894
3864
|
...javaScriptBase_default,
|
|
3895
3865
|
{
|
|
3866
|
+
plugins: {
|
|
3867
|
+
perfectionist: import_eslint_plugin_perfectionist.default,
|
|
3868
|
+
prettier: import_eslint_plugin_prettier.default
|
|
3869
|
+
},
|
|
3896
3870
|
rules: {
|
|
3897
3871
|
"@alextheman/no-relative-imports": "error",
|
|
3898
3872
|
"arrow-body-style": ["error", "always"],
|
|
@@ -3901,10 +3875,40 @@ function createCombinedJavaScriptBaseConfig(plugin) {
|
|
|
3901
3875
|
"no-else-return": "error",
|
|
3902
3876
|
"no-implicit-coercion": ["error", { allow: ["!!"] }],
|
|
3903
3877
|
"operator-assignment": ["error", "always"],
|
|
3878
|
+
"perfectionist/sort-exports": [
|
|
3879
|
+
"error",
|
|
3880
|
+
{
|
|
3881
|
+
customGroups: [],
|
|
3882
|
+
fallbackSort: { type: "natural" },
|
|
3883
|
+
groups: ["value-export", "type-export"],
|
|
3884
|
+
ignoreCase: true,
|
|
3885
|
+
newlinesBetween: 1,
|
|
3886
|
+
order: "asc",
|
|
3887
|
+
partitionByComment: false,
|
|
3888
|
+
partitionByNewLine: false,
|
|
3889
|
+
specialCharacters: "keep",
|
|
3890
|
+
type: "alphabetical"
|
|
3891
|
+
}
|
|
3892
|
+
],
|
|
3893
|
+
"perfectionist/sort-imports": [
|
|
3894
|
+
"error",
|
|
3895
|
+
{
|
|
3896
|
+
groups: ["type", "builtin", "external", "internal", "object"],
|
|
3897
|
+
ignoreCase: true,
|
|
3898
|
+
internalPattern: ["^src/.*"],
|
|
3899
|
+
newlinesBetween: 1,
|
|
3900
|
+
order: "asc",
|
|
3901
|
+
partitionByComment: false,
|
|
3902
|
+
partitionByNewLine: false,
|
|
3903
|
+
specialCharacters: "keep",
|
|
3904
|
+
type: "alphabetical"
|
|
3905
|
+
}
|
|
3906
|
+
],
|
|
3904
3907
|
"prefer-arrow-callback": ["error", { allowNamedFunctions: false }],
|
|
3905
3908
|
"prefer-destructuring": "error",
|
|
3906
3909
|
"prefer-template": "error",
|
|
3907
|
-
"prettier/prettier": ["warn", prettierRules_default]
|
|
3910
|
+
"prettier/prettier": ["warn", prettierRules_default],
|
|
3911
|
+
"sort-vars": "error"
|
|
3908
3912
|
}
|
|
3909
3913
|
},
|
|
3910
3914
|
...testsBase_default2(plugin)
|
|
@@ -4046,6 +4050,7 @@ var typeScriptBase_default = typeScriptBase;
|
|
|
4046
4050
|
function createCombinedTypeScriptBaseConfig(plugin) {
|
|
4047
4051
|
return [
|
|
4048
4052
|
...pluginBase_default(plugin),
|
|
4053
|
+
...javaScriptBase_default2(plugin),
|
|
4049
4054
|
...typeScriptBase_default,
|
|
4050
4055
|
{
|
|
4051
4056
|
files: ["**/*.ts", "**/*.tsx", "!package.json"],
|
|
@@ -4064,13 +4069,13 @@ var typeScriptBase_default2 = createCombinedTypeScriptBaseConfig;
|
|
|
4064
4069
|
|
|
4065
4070
|
// src/configs/combined/typeScriptReactBase.ts
|
|
4066
4071
|
function createCombinedTypeScriptReactBaseConfig(plugin) {
|
|
4067
|
-
return [...typeScriptBase_default2(plugin), ...
|
|
4072
|
+
return [...typeScriptBase_default2(plugin), ...reactBase_default2(plugin)];
|
|
4068
4073
|
}
|
|
4069
4074
|
var typeScriptReactBase_default = createCombinedTypeScriptReactBaseConfig;
|
|
4070
4075
|
|
|
4071
4076
|
// src/configs/combined/javaScriptReactBase.ts
|
|
4072
4077
|
function createCombinedJavaScriptReactBaseConfig(plugin) {
|
|
4073
|
-
return [...
|
|
4078
|
+
return [...javaScriptBase_default2(plugin), ...reactBase_default2(plugin)];
|
|
4074
4079
|
}
|
|
4075
4080
|
var javaScriptReactBase_default = createCombinedJavaScriptReactBaseConfig;
|
|
4076
4081
|
|
package/dist/index.d.cts
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -3700,7 +3700,11 @@ var require_globals2 = __commonJS({
|
|
|
3700
3700
|
|
|
3701
3701
|
// package.json
|
|
3702
3702
|
var name = "@alextheman/eslint-plugin";
|
|
3703
|
-
var version = "2.
|
|
3703
|
+
var version = "2.5.0";
|
|
3704
|
+
|
|
3705
|
+
// src/configs/combined/javaScriptBase.ts
|
|
3706
|
+
import perfectionist from "eslint-plugin-perfectionist";
|
|
3707
|
+
import prettierPlugin from "eslint-plugin-prettier";
|
|
3704
3708
|
|
|
3705
3709
|
// src/configs/plugin/pluginBase.ts
|
|
3706
3710
|
function createPluginBaseConfig(plugin) {
|
|
@@ -3782,8 +3786,6 @@ var import_globals = __toESM(require_globals2(), 1);
|
|
|
3782
3786
|
import prettierConfig from "eslint-config-prettier";
|
|
3783
3787
|
import importPlugin from "eslint-plugin-import";
|
|
3784
3788
|
import packageJson from "eslint-plugin-package-json";
|
|
3785
|
-
import perfectionist from "eslint-plugin-perfectionist";
|
|
3786
|
-
import prettierPlugin from "eslint-plugin-prettier";
|
|
3787
3789
|
var javaScriptBase = [
|
|
3788
3790
|
import_js.default.configs.recommended,
|
|
3789
3791
|
prettierConfig,
|
|
@@ -3796,9 +3798,7 @@ var javaScriptBase = [
|
|
|
3796
3798
|
},
|
|
3797
3799
|
name: "@alextheman/eslint-config-javascript-base",
|
|
3798
3800
|
plugins: {
|
|
3799
|
-
import: importPlugin
|
|
3800
|
-
perfectionist,
|
|
3801
|
-
prettier: prettierPlugin
|
|
3801
|
+
import: importPlugin
|
|
3802
3802
|
},
|
|
3803
3803
|
rules: {
|
|
3804
3804
|
eqeqeq: "error",
|
|
@@ -3831,37 +3831,7 @@ var javaScriptBase = [
|
|
|
3831
3831
|
],
|
|
3832
3832
|
"no-useless-rename": "error",
|
|
3833
3833
|
"no-useless-return": "error",
|
|
3834
|
-
"
|
|
3835
|
-
"error",
|
|
3836
|
-
{
|
|
3837
|
-
customGroups: [],
|
|
3838
|
-
fallbackSort: { type: "natural" },
|
|
3839
|
-
groups: ["value-export", "type-export"],
|
|
3840
|
-
ignoreCase: true,
|
|
3841
|
-
newlinesBetween: 1,
|
|
3842
|
-
order: "asc",
|
|
3843
|
-
partitionByComment: false,
|
|
3844
|
-
partitionByNewLine: false,
|
|
3845
|
-
specialCharacters: "keep",
|
|
3846
|
-
type: "alphabetical"
|
|
3847
|
-
}
|
|
3848
|
-
],
|
|
3849
|
-
"perfectionist/sort-imports": [
|
|
3850
|
-
"error",
|
|
3851
|
-
{
|
|
3852
|
-
groups: ["type", "builtin", "external", "internal", "object"],
|
|
3853
|
-
ignoreCase: true,
|
|
3854
|
-
internalPattern: ["^src/.*"],
|
|
3855
|
-
newlinesBetween: 1,
|
|
3856
|
-
order: "asc",
|
|
3857
|
-
partitionByComment: false,
|
|
3858
|
-
partitionByNewLine: false,
|
|
3859
|
-
specialCharacters: "keep",
|
|
3860
|
-
type: "alphabetical"
|
|
3861
|
-
}
|
|
3862
|
-
],
|
|
3863
|
-
"prefer-const": "error",
|
|
3864
|
-
"sort-vars": "error"
|
|
3834
|
+
"prefer-const": "error"
|
|
3865
3835
|
},
|
|
3866
3836
|
settings: {
|
|
3867
3837
|
"import/resolver": {
|
|
@@ -3878,6 +3848,10 @@ function createCombinedJavaScriptBaseConfig(plugin) {
|
|
|
3878
3848
|
...pluginBase_default(plugin),
|
|
3879
3849
|
...javaScriptBase_default,
|
|
3880
3850
|
{
|
|
3851
|
+
plugins: {
|
|
3852
|
+
perfectionist,
|
|
3853
|
+
prettier: prettierPlugin
|
|
3854
|
+
},
|
|
3881
3855
|
rules: {
|
|
3882
3856
|
"@alextheman/no-relative-imports": "error",
|
|
3883
3857
|
"arrow-body-style": ["error", "always"],
|
|
@@ -3886,10 +3860,40 @@ function createCombinedJavaScriptBaseConfig(plugin) {
|
|
|
3886
3860
|
"no-else-return": "error",
|
|
3887
3861
|
"no-implicit-coercion": ["error", { allow: ["!!"] }],
|
|
3888
3862
|
"operator-assignment": ["error", "always"],
|
|
3863
|
+
"perfectionist/sort-exports": [
|
|
3864
|
+
"error",
|
|
3865
|
+
{
|
|
3866
|
+
customGroups: [],
|
|
3867
|
+
fallbackSort: { type: "natural" },
|
|
3868
|
+
groups: ["value-export", "type-export"],
|
|
3869
|
+
ignoreCase: true,
|
|
3870
|
+
newlinesBetween: 1,
|
|
3871
|
+
order: "asc",
|
|
3872
|
+
partitionByComment: false,
|
|
3873
|
+
partitionByNewLine: false,
|
|
3874
|
+
specialCharacters: "keep",
|
|
3875
|
+
type: "alphabetical"
|
|
3876
|
+
}
|
|
3877
|
+
],
|
|
3878
|
+
"perfectionist/sort-imports": [
|
|
3879
|
+
"error",
|
|
3880
|
+
{
|
|
3881
|
+
groups: ["type", "builtin", "external", "internal", "object"],
|
|
3882
|
+
ignoreCase: true,
|
|
3883
|
+
internalPattern: ["^src/.*"],
|
|
3884
|
+
newlinesBetween: 1,
|
|
3885
|
+
order: "asc",
|
|
3886
|
+
partitionByComment: false,
|
|
3887
|
+
partitionByNewLine: false,
|
|
3888
|
+
specialCharacters: "keep",
|
|
3889
|
+
type: "alphabetical"
|
|
3890
|
+
}
|
|
3891
|
+
],
|
|
3889
3892
|
"prefer-arrow-callback": ["error", { allowNamedFunctions: false }],
|
|
3890
3893
|
"prefer-destructuring": "error",
|
|
3891
3894
|
"prefer-template": "error",
|
|
3892
|
-
"prettier/prettier": ["warn", prettierRules_default]
|
|
3895
|
+
"prettier/prettier": ["warn", prettierRules_default],
|
|
3896
|
+
"sort-vars": "error"
|
|
3893
3897
|
}
|
|
3894
3898
|
},
|
|
3895
3899
|
...testsBase_default2(plugin)
|
|
@@ -4031,6 +4035,7 @@ var typeScriptBase_default = typeScriptBase;
|
|
|
4031
4035
|
function createCombinedTypeScriptBaseConfig(plugin) {
|
|
4032
4036
|
return [
|
|
4033
4037
|
...pluginBase_default(plugin),
|
|
4038
|
+
...javaScriptBase_default2(plugin),
|
|
4034
4039
|
...typeScriptBase_default,
|
|
4035
4040
|
{
|
|
4036
4041
|
files: ["**/*.ts", "**/*.tsx", "!package.json"],
|
|
@@ -4049,13 +4054,13 @@ var typeScriptBase_default2 = createCombinedTypeScriptBaseConfig;
|
|
|
4049
4054
|
|
|
4050
4055
|
// src/configs/combined/typeScriptReactBase.ts
|
|
4051
4056
|
function createCombinedTypeScriptReactBaseConfig(plugin) {
|
|
4052
|
-
return [...typeScriptBase_default2(plugin), ...
|
|
4057
|
+
return [...typeScriptBase_default2(plugin), ...reactBase_default2(plugin)];
|
|
4053
4058
|
}
|
|
4054
4059
|
var typeScriptReactBase_default = createCombinedTypeScriptReactBaseConfig;
|
|
4055
4060
|
|
|
4056
4061
|
// src/configs/combined/javaScriptReactBase.ts
|
|
4057
4062
|
function createCombinedJavaScriptReactBaseConfig(plugin) {
|
|
4058
|
-
return [...
|
|
4063
|
+
return [...javaScriptBase_default2(plugin), ...reactBase_default2(plugin)];
|
|
4059
4064
|
}
|
|
4060
4065
|
var javaScriptReactBase_default = createCombinedJavaScriptReactBaseConfig;
|
|
4061
4066
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alextheman/eslint-plugin",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.5.0",
|
|
4
4
|
"description": "A package to provide custom ESLint rules and configs",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"author": "alextheman",
|
|
@@ -33,19 +33,19 @@
|
|
|
33
33
|
"update-dependencies": "bash -c 'npx npm-check-updates -u \"$@\" && npm install' --"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@alextheman/utility": "^2.
|
|
36
|
+
"@alextheman/utility": "^2.5.0",
|
|
37
37
|
"common-tags": "^1.8.2",
|
|
38
|
-
"eslint-plugin-package-json": "^0.
|
|
38
|
+
"eslint-plugin-package-json": "^0.59.1",
|
|
39
39
|
"zod": "^4.1.12"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"@types/common-tags": "^1.8.4",
|
|
43
43
|
"@types/eslint": "^9.6.1",
|
|
44
44
|
"@types/eslint-plugin-jsx-a11y": "^6.10.1",
|
|
45
|
-
"@types/node": "^24.9.
|
|
45
|
+
"@types/node": "^24.9.2",
|
|
46
46
|
"@typescript-eslint/rule-tester": "^8.46.2",
|
|
47
47
|
"@typescript-eslint/utils": "^8.46.2",
|
|
48
|
-
"eslint-plugin-eslint-plugin": "^7.
|
|
48
|
+
"eslint-plugin-eslint-plugin": "^7.2.0",
|
|
49
49
|
"globals": "^16.4.0",
|
|
50
50
|
"husky": "^9.1.7",
|
|
51
51
|
"jiti": "^2.6.1",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"tsup": "^8.5.0",
|
|
54
54
|
"typescript": "^5.9.3",
|
|
55
55
|
"vite-tsconfig-paths": "^5.1.4",
|
|
56
|
-
"vitest": "^4.0.
|
|
56
|
+
"vitest": "^4.0.6"
|
|
57
57
|
},
|
|
58
58
|
"peerDependencies": {
|
|
59
59
|
"@typescript-eslint/eslint-plugin": "^8.37.0",
|