@alextheman/eslint-plugin 1.4.0 → 1.6.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 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.0";
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
- var warnOnFixButErrorOnLint = process.env.ESLINT_MODE === "fix" ? "warn" : "error";
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
- "simple-import-sort": import_eslint_plugin_simple_import_sort.default
3754
+ perfectionist: import_eslint_plugin_perfectionist.default
3746
3755
  },
3747
3756
  rules: {
3748
3757
  "import/no-unresolved": warnOnFixButErrorOnLint,
@@ -3759,27 +3768,40 @@ var esLintConfigTypeScriptBase = [
3759
3768
  ]
3760
3769
  }
3761
3770
  ],
3762
- "import/order": [
3771
+ "perfectionist/sort-imports": [
3763
3772
  warnOnFixButErrorOnLint,
3764
3773
  {
3765
- alphabetize: {
3766
- order: "asc",
3767
- caseInsensitive: true
3768
- },
3769
- groups: ["builtin", "external", "internal"],
3770
- named: true,
3771
- pathGroups: [
3772
- {
3773
- pattern: "src/**",
3774
- group: "external",
3775
- position: "after"
3776
- }
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: "ignore",
3796
+ groups: [
3797
+ { commentAbove: "Value exports" },
3798
+ "value-export",
3799
+ { newlinesBetween: 1, commentAbove: "Type exports" },
3800
+ "type-export"
3777
3801
  ],
3778
- pathGroupsExcludedImportTypes: ["builtin"],
3779
- "newlines-between": "always"
3802
+ customGroups: []
3780
3803
  }
3781
3804
  ],
3782
- "simple-import-sort/exports": warnOnFixButErrorOnLint,
3783
3805
  "@typescript-eslint/no-unused-vars": [
3784
3806
  warnOnFixButErrorOnLint,
3785
3807
  {
@@ -3792,13 +3814,14 @@ var esLintConfigTypeScriptBase = [
3792
3814
  "no-unused-vars": "off",
3793
3815
  "func-style": [warnOnFixButErrorOnLint, "declaration", { allowArrowFunctions: false }],
3794
3816
  "prefer-arrow-callback": [warnOnFixButErrorOnLint, { allowNamedFunctions: false }],
3817
+ "arrow-body-style": [warnOnFixButErrorOnLint, "always"],
3795
3818
  "no-param-reassign": warnOnFixButErrorOnLint,
3796
3819
  "no-useless-rename": warnOnFixButErrorOnLint,
3797
3820
  "sort-vars": warnOnFixButErrorOnLint,
3798
3821
  "no-cond-assign": warnOnFixButErrorOnLint,
3799
3822
  "no-undef": warnOnFixButErrorOnLint,
3800
3823
  "@typescript-eslint/consistent-type-imports": warnOnFixButErrorOnLint,
3801
- "prettier/prettier": ["warn", prettierRules]
3824
+ "prettier/prettier": ["warn", prettier_rules_default]
3802
3825
  }
3803
3826
  }
3804
3827
  ];
@@ -3860,12 +3883,6 @@ function createAlexTypeScriptReactBaseConfig(plugin2) {
3860
3883
  }
3861
3884
  var alex_typescript_react_base_default = createAlexTypeScriptReactBaseConfig;
3862
3885
 
3863
- // src/configs/prettier-rules.ts
3864
- var prettierRules2 = {
3865
- printWidth: 100
3866
- };
3867
- var prettier_rules_default = prettierRules2;
3868
-
3869
3886
  // src/create-rule.ts
3870
3887
  var import_utils = require("@typescript-eslint/utils");
3871
3888
  var createRule = import_utils.ESLintUtils.RuleCreator((ruleName) => {
@@ -4031,10 +4048,6 @@ var rules_default = {
4031
4048
  "no-plugin-configs-access-from-src-configs": no_plugin_configs_access_from_src_configs_default
4032
4049
  };
4033
4050
 
4034
- // package.json
4035
- var name = "@alextheman/eslint-plugin";
4036
- var version = "1.4.0";
4037
-
4038
4051
  // src/index.ts
4039
4052
  var plugin = {
4040
4053
  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.4.0";
6
+ var version = "1.6.0";
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.4.0";
6
+ var version = "1.6.0";
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.0";
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
- import eslintPluginSimpleImportSort from "eslint-plugin-simple-import-sort";
3702
- var warnOnFixButErrorOnLint = process.env.ESLINT_MODE === "fix" ? "warn" : "error";
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
- "simple-import-sort": eslintPluginSimpleImportSort
3740
+ perfectionist
3732
3741
  },
3733
3742
  rules: {
3734
3743
  "import/no-unresolved": warnOnFixButErrorOnLint,
@@ -3745,27 +3754,40 @@ var esLintConfigTypeScriptBase = [
3745
3754
  ]
3746
3755
  }
3747
3756
  ],
3748
- "import/order": [
3757
+ "perfectionist/sort-imports": [
3749
3758
  warnOnFixButErrorOnLint,
3750
3759
  {
3751
- alphabetize: {
3752
- order: "asc",
3753
- caseInsensitive: true
3754
- },
3755
- groups: ["builtin", "external", "internal"],
3756
- named: true,
3757
- pathGroups: [
3758
- {
3759
- pattern: "src/**",
3760
- group: "external",
3761
- position: "after"
3762
- }
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: "ignore",
3782
+ groups: [
3783
+ { commentAbove: "Value exports" },
3784
+ "value-export",
3785
+ { newlinesBetween: 1, commentAbove: "Type exports" },
3786
+ "type-export"
3763
3787
  ],
3764
- pathGroupsExcludedImportTypes: ["builtin"],
3765
- "newlines-between": "always"
3788
+ customGroups: []
3766
3789
  }
3767
3790
  ],
3768
- "simple-import-sort/exports": warnOnFixButErrorOnLint,
3769
3791
  "@typescript-eslint/no-unused-vars": [
3770
3792
  warnOnFixButErrorOnLint,
3771
3793
  {
@@ -3778,13 +3800,14 @@ var esLintConfigTypeScriptBase = [
3778
3800
  "no-unused-vars": "off",
3779
3801
  "func-style": [warnOnFixButErrorOnLint, "declaration", { allowArrowFunctions: false }],
3780
3802
  "prefer-arrow-callback": [warnOnFixButErrorOnLint, { allowNamedFunctions: false }],
3803
+ "arrow-body-style": [warnOnFixButErrorOnLint, "always"],
3781
3804
  "no-param-reassign": warnOnFixButErrorOnLint,
3782
3805
  "no-useless-rename": warnOnFixButErrorOnLint,
3783
3806
  "sort-vars": warnOnFixButErrorOnLint,
3784
3807
  "no-cond-assign": warnOnFixButErrorOnLint,
3785
3808
  "no-undef": warnOnFixButErrorOnLint,
3786
3809
  "@typescript-eslint/consistent-type-imports": warnOnFixButErrorOnLint,
3787
- "prettier/prettier": ["warn", prettierRules]
3810
+ "prettier/prettier": ["warn", prettier_rules_default]
3788
3811
  }
3789
3812
  }
3790
3813
  ];
@@ -3846,12 +3869,6 @@ function createAlexTypeScriptReactBaseConfig(plugin2) {
3846
3869
  }
3847
3870
  var alex_typescript_react_base_default = createAlexTypeScriptReactBaseConfig;
3848
3871
 
3849
- // src/configs/prettier-rules.ts
3850
- var prettierRules2 = {
3851
- printWidth: 100
3852
- };
3853
- var prettier_rules_default = prettierRules2;
3854
-
3855
3872
  // src/create-rule.ts
3856
3873
  import { ESLintUtils } from "@typescript-eslint/utils";
3857
3874
  var createRule = ESLintUtils.RuleCreator((ruleName) => {
@@ -4017,10 +4034,6 @@ var rules_default = {
4017
4034
  "no-plugin-configs-access-from-src-configs": no_plugin_configs_access_from_src_configs_default
4018
4035
  };
4019
4036
 
4020
- // package.json
4021
- var name = "@alextheman/eslint-plugin";
4022
- var version = "1.4.0";
4023
-
4024
4037
  // src/index.ts
4025
4038
  var plugin = {
4026
4039
  meta: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alextheman/eslint-plugin",
3
- "version": "1.4.0",
3
+ "version": "1.6.0",
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-simple-import-sort": "^12.1.1"
37
+ "eslint-plugin-perfectionist": "^4.15.0"
38
38
  },
39
39
  "devDependencies": {
40
40
  "@types/eslint": "^9.6.1",