@alextheman/eslint-plugin 1.5.0 → 1.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 +38 -31
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +38 -31
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -3704,19 +3704,28 @@ __export(index_exports, {
|
|
|
3704
3704
|
});
|
|
3705
3705
|
module.exports = __toCommonJS(index_exports);
|
|
3706
3706
|
|
|
3707
|
+
// package.json
|
|
3708
|
+
var name = "@alextheman/eslint-plugin";
|
|
3709
|
+
var version = "1.6.1";
|
|
3710
|
+
|
|
3707
3711
|
// src/configs/eslint-config-typescript-base.ts
|
|
3708
3712
|
var import_js = __toESM(require_src(), 1);
|
|
3709
3713
|
var import_eslint_plugin = __toESM(require("@typescript-eslint/eslint-plugin"), 1);
|
|
3710
3714
|
var import_parser = __toESM(require("@typescript-eslint/parser"), 1);
|
|
3711
3715
|
var import_eslint_config_prettier = __toESM(require("eslint-config-prettier"), 1);
|
|
3712
3716
|
var import_eslint_plugin_import = __toESM(require("eslint-plugin-import"), 1);
|
|
3717
|
+
var import_eslint_plugin_perfectionist = __toESM(require("eslint-plugin-perfectionist"), 1);
|
|
3713
3718
|
var import_eslint_plugin_prettier = __toESM(require("eslint-plugin-prettier"), 1);
|
|
3714
|
-
var import_eslint_plugin_simple_import_sort = __toESM(require("eslint-plugin-simple-import-sort"), 1);
|
|
3715
3719
|
var import_globals = __toESM(require_globals2(), 1);
|
|
3716
|
-
|
|
3720
|
+
|
|
3721
|
+
// src/configs/prettier-rules.ts
|
|
3717
3722
|
var prettierRules = {
|
|
3718
3723
|
printWidth: 100
|
|
3719
3724
|
};
|
|
3725
|
+
var prettier_rules_default = prettierRules;
|
|
3726
|
+
|
|
3727
|
+
// src/configs/eslint-config-typescript-base.ts
|
|
3728
|
+
var warnOnFixButErrorOnLint = process.env.ESLINT_MODE === "fix" ? "warn" : "error";
|
|
3720
3729
|
var esLintConfigTypeScriptBase = [
|
|
3721
3730
|
import_js.default.configs.recommended,
|
|
3722
3731
|
import_eslint_config_prettier.default,
|
|
@@ -3742,7 +3751,7 @@ var esLintConfigTypeScriptBase = [
|
|
|
3742
3751
|
"@typescript-eslint": import_eslint_plugin.default,
|
|
3743
3752
|
import: import_eslint_plugin_import.default,
|
|
3744
3753
|
prettier: import_eslint_plugin_prettier.default,
|
|
3745
|
-
|
|
3754
|
+
perfectionist: import_eslint_plugin_perfectionist.default
|
|
3746
3755
|
},
|
|
3747
3756
|
rules: {
|
|
3748
3757
|
"import/no-unresolved": warnOnFixButErrorOnLint,
|
|
@@ -3759,27 +3768,35 @@ var esLintConfigTypeScriptBase = [
|
|
|
3759
3768
|
]
|
|
3760
3769
|
}
|
|
3761
3770
|
],
|
|
3762
|
-
"
|
|
3771
|
+
"perfectionist/sort-imports": [
|
|
3763
3772
|
warnOnFixButErrorOnLint,
|
|
3764
3773
|
{
|
|
3765
|
-
|
|
3766
|
-
|
|
3767
|
-
|
|
3768
|
-
|
|
3769
|
-
|
|
3770
|
-
|
|
3771
|
-
|
|
3772
|
-
|
|
3773
|
-
|
|
3774
|
-
|
|
3775
|
-
|
|
3776
|
-
|
|
3777
|
-
|
|
3778
|
-
|
|
3779
|
-
|
|
3774
|
+
type: "alphabetical",
|
|
3775
|
+
order: "asc",
|
|
3776
|
+
ignoreCase: true,
|
|
3777
|
+
partitionByComment: false,
|
|
3778
|
+
partitionByNewLine: false,
|
|
3779
|
+
specialCharacters: "keep",
|
|
3780
|
+
groups: ["type", "builtin", "external", "internal", "object"],
|
|
3781
|
+
newlinesBetween: 1,
|
|
3782
|
+
internalPattern: ["^src/.*"]
|
|
3783
|
+
}
|
|
3784
|
+
],
|
|
3785
|
+
"perfectionist/sort-exports": [
|
|
3786
|
+
warnOnFixButErrorOnLint,
|
|
3787
|
+
{
|
|
3788
|
+
type: "alphabetical",
|
|
3789
|
+
order: "asc",
|
|
3790
|
+
fallbackSort: { type: "natural" },
|
|
3791
|
+
ignoreCase: true,
|
|
3792
|
+
specialCharacters: "keep",
|
|
3793
|
+
partitionByComment: false,
|
|
3794
|
+
partitionByNewLine: false,
|
|
3795
|
+
newlinesBetween: 1,
|
|
3796
|
+
groups: ["value-export", "type-export"],
|
|
3797
|
+
customGroups: []
|
|
3780
3798
|
}
|
|
3781
3799
|
],
|
|
3782
|
-
"simple-import-sort/exports": warnOnFixButErrorOnLint,
|
|
3783
3800
|
"@typescript-eslint/no-unused-vars": [
|
|
3784
3801
|
warnOnFixButErrorOnLint,
|
|
3785
3802
|
{
|
|
@@ -3799,7 +3816,7 @@ var esLintConfigTypeScriptBase = [
|
|
|
3799
3816
|
"no-cond-assign": warnOnFixButErrorOnLint,
|
|
3800
3817
|
"no-undef": warnOnFixButErrorOnLint,
|
|
3801
3818
|
"@typescript-eslint/consistent-type-imports": warnOnFixButErrorOnLint,
|
|
3802
|
-
"prettier/prettier": ["warn",
|
|
3819
|
+
"prettier/prettier": ["warn", prettier_rules_default]
|
|
3803
3820
|
}
|
|
3804
3821
|
}
|
|
3805
3822
|
];
|
|
@@ -3861,12 +3878,6 @@ function createAlexTypeScriptReactBaseConfig(plugin2) {
|
|
|
3861
3878
|
}
|
|
3862
3879
|
var alex_typescript_react_base_default = createAlexTypeScriptReactBaseConfig;
|
|
3863
3880
|
|
|
3864
|
-
// src/configs/prettier-rules.ts
|
|
3865
|
-
var prettierRules2 = {
|
|
3866
|
-
printWidth: 100
|
|
3867
|
-
};
|
|
3868
|
-
var prettier_rules_default = prettierRules2;
|
|
3869
|
-
|
|
3870
3881
|
// src/create-rule.ts
|
|
3871
3882
|
var import_utils = require("@typescript-eslint/utils");
|
|
3872
3883
|
var createRule = import_utils.ESLintUtils.RuleCreator((ruleName) => {
|
|
@@ -4032,10 +4043,6 @@ var rules_default = {
|
|
|
4032
4043
|
"no-plugin-configs-access-from-src-configs": no_plugin_configs_access_from_src_configs_default
|
|
4033
4044
|
};
|
|
4034
4045
|
|
|
4035
|
-
// package.json
|
|
4036
|
-
var name = "@alextheman/eslint-plugin";
|
|
4037
|
-
var version = "1.5.0";
|
|
4038
|
-
|
|
4039
4046
|
// src/index.ts
|
|
4040
4047
|
var plugin = {
|
|
4041
4048
|
meta: {
|
package/dist/index.d.cts
CHANGED
|
@@ -2,10 +2,10 @@ import * as _typescript_eslint_utils_ts_eslint from '@typescript-eslint/utils/ts
|
|
|
2
2
|
import { Linter } from 'eslint';
|
|
3
3
|
import { Config } from 'prettier';
|
|
4
4
|
|
|
5
|
-
declare const prettierRules: Config;
|
|
6
|
-
|
|
7
5
|
var name = "@alextheman/eslint-plugin";
|
|
8
|
-
var version = "1.
|
|
6
|
+
var version = "1.6.1";
|
|
7
|
+
|
|
8
|
+
declare const prettierRules: Config;
|
|
9
9
|
|
|
10
10
|
interface AlexPlugin {
|
|
11
11
|
meta: {
|
package/dist/index.d.ts
CHANGED
|
@@ -2,10 +2,10 @@ import * as _typescript_eslint_utils_ts_eslint from '@typescript-eslint/utils/ts
|
|
|
2
2
|
import { Linter } from 'eslint';
|
|
3
3
|
import { Config } from 'prettier';
|
|
4
4
|
|
|
5
|
-
declare const prettierRules: Config;
|
|
6
|
-
|
|
7
5
|
var name = "@alextheman/eslint-plugin";
|
|
8
|
-
var version = "1.
|
|
6
|
+
var version = "1.6.1";
|
|
7
|
+
|
|
8
|
+
declare const prettierRules: Config;
|
|
9
9
|
|
|
10
10
|
interface AlexPlugin {
|
|
11
11
|
meta: {
|
package/dist/index.js
CHANGED
|
@@ -3690,6 +3690,10 @@ var require_globals2 = __commonJS({
|
|
|
3690
3690
|
}
|
|
3691
3691
|
});
|
|
3692
3692
|
|
|
3693
|
+
// package.json
|
|
3694
|
+
var name = "@alextheman/eslint-plugin";
|
|
3695
|
+
var version = "1.6.1";
|
|
3696
|
+
|
|
3693
3697
|
// src/configs/eslint-config-typescript-base.ts
|
|
3694
3698
|
var import_js = __toESM(require_src(), 1);
|
|
3695
3699
|
var import_globals = __toESM(require_globals2(), 1);
|
|
@@ -3697,12 +3701,17 @@ import eslintPlugin from "@typescript-eslint/eslint-plugin";
|
|
|
3697
3701
|
import tsparser from "@typescript-eslint/parser";
|
|
3698
3702
|
import prettierConfig from "eslint-config-prettier";
|
|
3699
3703
|
import importPlugin from "eslint-plugin-import";
|
|
3704
|
+
import perfectionist from "eslint-plugin-perfectionist";
|
|
3700
3705
|
import prettierPlugin from "eslint-plugin-prettier";
|
|
3701
|
-
|
|
3702
|
-
|
|
3706
|
+
|
|
3707
|
+
// src/configs/prettier-rules.ts
|
|
3703
3708
|
var prettierRules = {
|
|
3704
3709
|
printWidth: 100
|
|
3705
3710
|
};
|
|
3711
|
+
var prettier_rules_default = prettierRules;
|
|
3712
|
+
|
|
3713
|
+
// src/configs/eslint-config-typescript-base.ts
|
|
3714
|
+
var warnOnFixButErrorOnLint = process.env.ESLINT_MODE === "fix" ? "warn" : "error";
|
|
3706
3715
|
var esLintConfigTypeScriptBase = [
|
|
3707
3716
|
import_js.default.configs.recommended,
|
|
3708
3717
|
prettierConfig,
|
|
@@ -3728,7 +3737,7 @@ var esLintConfigTypeScriptBase = [
|
|
|
3728
3737
|
"@typescript-eslint": eslintPlugin,
|
|
3729
3738
|
import: importPlugin,
|
|
3730
3739
|
prettier: prettierPlugin,
|
|
3731
|
-
|
|
3740
|
+
perfectionist
|
|
3732
3741
|
},
|
|
3733
3742
|
rules: {
|
|
3734
3743
|
"import/no-unresolved": warnOnFixButErrorOnLint,
|
|
@@ -3745,27 +3754,35 @@ var esLintConfigTypeScriptBase = [
|
|
|
3745
3754
|
]
|
|
3746
3755
|
}
|
|
3747
3756
|
],
|
|
3748
|
-
"
|
|
3757
|
+
"perfectionist/sort-imports": [
|
|
3749
3758
|
warnOnFixButErrorOnLint,
|
|
3750
3759
|
{
|
|
3751
|
-
|
|
3752
|
-
|
|
3753
|
-
|
|
3754
|
-
|
|
3755
|
-
|
|
3756
|
-
|
|
3757
|
-
|
|
3758
|
-
|
|
3759
|
-
|
|
3760
|
-
|
|
3761
|
-
|
|
3762
|
-
|
|
3763
|
-
|
|
3764
|
-
|
|
3765
|
-
|
|
3760
|
+
type: "alphabetical",
|
|
3761
|
+
order: "asc",
|
|
3762
|
+
ignoreCase: true,
|
|
3763
|
+
partitionByComment: false,
|
|
3764
|
+
partitionByNewLine: false,
|
|
3765
|
+
specialCharacters: "keep",
|
|
3766
|
+
groups: ["type", "builtin", "external", "internal", "object"],
|
|
3767
|
+
newlinesBetween: 1,
|
|
3768
|
+
internalPattern: ["^src/.*"]
|
|
3769
|
+
}
|
|
3770
|
+
],
|
|
3771
|
+
"perfectionist/sort-exports": [
|
|
3772
|
+
warnOnFixButErrorOnLint,
|
|
3773
|
+
{
|
|
3774
|
+
type: "alphabetical",
|
|
3775
|
+
order: "asc",
|
|
3776
|
+
fallbackSort: { type: "natural" },
|
|
3777
|
+
ignoreCase: true,
|
|
3778
|
+
specialCharacters: "keep",
|
|
3779
|
+
partitionByComment: false,
|
|
3780
|
+
partitionByNewLine: false,
|
|
3781
|
+
newlinesBetween: 1,
|
|
3782
|
+
groups: ["value-export", "type-export"],
|
|
3783
|
+
customGroups: []
|
|
3766
3784
|
}
|
|
3767
3785
|
],
|
|
3768
|
-
"simple-import-sort/exports": warnOnFixButErrorOnLint,
|
|
3769
3786
|
"@typescript-eslint/no-unused-vars": [
|
|
3770
3787
|
warnOnFixButErrorOnLint,
|
|
3771
3788
|
{
|
|
@@ -3785,7 +3802,7 @@ var esLintConfigTypeScriptBase = [
|
|
|
3785
3802
|
"no-cond-assign": warnOnFixButErrorOnLint,
|
|
3786
3803
|
"no-undef": warnOnFixButErrorOnLint,
|
|
3787
3804
|
"@typescript-eslint/consistent-type-imports": warnOnFixButErrorOnLint,
|
|
3788
|
-
"prettier/prettier": ["warn",
|
|
3805
|
+
"prettier/prettier": ["warn", prettier_rules_default]
|
|
3789
3806
|
}
|
|
3790
3807
|
}
|
|
3791
3808
|
];
|
|
@@ -3847,12 +3864,6 @@ function createAlexTypeScriptReactBaseConfig(plugin2) {
|
|
|
3847
3864
|
}
|
|
3848
3865
|
var alex_typescript_react_base_default = createAlexTypeScriptReactBaseConfig;
|
|
3849
3866
|
|
|
3850
|
-
// src/configs/prettier-rules.ts
|
|
3851
|
-
var prettierRules2 = {
|
|
3852
|
-
printWidth: 100
|
|
3853
|
-
};
|
|
3854
|
-
var prettier_rules_default = prettierRules2;
|
|
3855
|
-
|
|
3856
3867
|
// src/create-rule.ts
|
|
3857
3868
|
import { ESLintUtils } from "@typescript-eslint/utils";
|
|
3858
3869
|
var createRule = ESLintUtils.RuleCreator((ruleName) => {
|
|
@@ -4018,10 +4029,6 @@ var rules_default = {
|
|
|
4018
4029
|
"no-plugin-configs-access-from-src-configs": no_plugin_configs_access_from_src_configs_default
|
|
4019
4030
|
};
|
|
4020
4031
|
|
|
4021
|
-
// package.json
|
|
4022
|
-
var name = "@alextheman/eslint-plugin";
|
|
4023
|
-
var version = "1.5.0";
|
|
4024
|
-
|
|
4025
4032
|
// src/index.ts
|
|
4026
4033
|
var plugin = {
|
|
4027
4034
|
meta: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alextheman/eslint-plugin",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.6.1",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"eslint-plugin-react": ">=7.37.5",
|
|
35
35
|
"eslint-plugin-react-hooks": ">=5.2.0",
|
|
36
36
|
"eslint-plugin-react-refresh": ">=0.4.20",
|
|
37
|
-
"eslint-plugin-
|
|
37
|
+
"eslint-plugin-perfectionist": "^4.15.0"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"@types/eslint": "^9.6.1",
|