@alextheman/eslint-plugin 1.13.4 → 1.13.5

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
@@ -3706,7 +3706,7 @@ module.exports = __toCommonJS(index_exports);
3706
3706
 
3707
3707
  // package.json
3708
3708
  var name = "@alextheman/eslint-plugin";
3709
- var version = "1.13.4";
3709
+ var version = "1.13.5";
3710
3710
 
3711
3711
  // src/configs/alexPluginBase.ts
3712
3712
  function createAlexPluginBaseConfig(plugin) {
@@ -3724,9 +3724,9 @@ function createAlexPluginBaseConfig(plugin) {
3724
3724
  {
3725
3725
  files: ["**/*.test.ts"],
3726
3726
  rules: {
3727
+ "@alextheman/consistent-test-function": ["error", { preference: "test" }],
3727
3728
  "@alextheman/no-isolated-tests": "error",
3728
- "@alextheman/no-skipped-tests": "warn",
3729
- "@alextheman/consistent-test-function": ["error", { preference: "test" }]
3729
+ "@alextheman/no-skipped-tests": "warn"
3730
3730
  }
3731
3731
  }
3732
3732
  ];
@@ -3756,94 +3756,94 @@ var typeScriptBase = [
3756
3756
  import_eslint_config_prettier.default,
3757
3757
  import_eslint_plugin_package_json.default.configs.recommended,
3758
3758
  {
3759
- name: "@alextheman/eslint-config-typescript-base",
3760
3759
  files: ["**/*.ts", "**/*.tsx"],
3760
+ ignores: ["dist"],
3761
3761
  languageOptions: {
3762
+ globals: __spreadValues(__spreadValues({}, import_globals.default.node), import_globals.default.browser),
3762
3763
  parser: import_parser.default,
3763
3764
  parserOptions: {
3764
3765
  ecmaVersion: "latest",
3765
3766
  sourceType: "module"
3766
- },
3767
- globals: __spreadValues(__spreadValues({}, import_globals.default.node), import_globals.default.browser)
3768
- },
3769
- settings: {
3770
- "import/resolver": {
3771
- typescript: true,
3772
- node: true
3773
3767
  }
3774
3768
  },
3775
- ignores: ["dist"],
3769
+ name: "@alextheman/eslint-config-typescript-base",
3776
3770
  plugins: {
3777
3771
  "@typescript-eslint": import_eslint_plugin.default,
3778
3772
  import: import_eslint_plugin_import.default,
3779
- prettier: import_eslint_plugin_prettier.default,
3780
- perfectionist: import_eslint_plugin_perfectionist.default
3773
+ perfectionist: import_eslint_plugin_perfectionist.default,
3774
+ prettier: import_eslint_plugin_prettier.default
3781
3775
  },
3782
3776
  rules: {
3783
- "import/no-unresolved": "error",
3777
+ "@typescript-eslint/consistent-type-imports": "error",
3778
+ "@typescript-eslint/no-unused-vars": [
3779
+ "error",
3780
+ {
3781
+ argsIgnorePattern: "^_",
3782
+ caughtErrorsIgnorePattern: "^_",
3783
+ varsIgnorePattern: "^_"
3784
+ }
3785
+ ],
3786
+ "arrow-body-style": ["error", "always"],
3787
+ curly: ["error", "all"],
3784
3788
  eqeqeq: "error",
3789
+ "func-style": ["error", "declaration", { allowArrowFunctions: false }],
3790
+ "import/no-unresolved": "error",
3791
+ "no-cond-assign": "error",
3785
3792
  "no-console": ["error", { allow: ["warn", "error"] }],
3786
- "perfectionist/sort-imports": [
3793
+ "no-param-reassign": "error",
3794
+ "no-restricted-imports": [
3787
3795
  "error",
3788
3796
  {
3789
- type: "alphabetical",
3790
- order: "asc",
3791
- ignoreCase: true,
3792
- partitionByComment: false,
3793
- partitionByNewLine: false,
3794
- specialCharacters: "keep",
3795
- groups: ["type", "builtin", "external", "internal", "object"],
3796
- newlinesBetween: 1,
3797
- internalPattern: ["^src/.*"]
3797
+ patterns: [
3798
+ {
3799
+ group: ["node_modules"],
3800
+ message: "What on Earth are you doing? Leave poor node_modules alone!"
3801
+ }
3802
+ ]
3798
3803
  }
3799
3804
  ],
3805
+ "no-undef": "error",
3806
+ // Disable regular no-unused-vars rule since that will flag interface declarations. Only use the TypeScript specific rule for this.
3807
+ "no-unused-vars": "off",
3808
+ "no-useless-rename": "error",
3800
3809
  "perfectionist/sort-exports": [
3801
3810
  "error",
3802
3811
  {
3803
- type: "alphabetical",
3804
- order: "asc",
3812
+ customGroups: [],
3805
3813
  fallbackSort: { type: "natural" },
3814
+ groups: ["value-export", "type-export"],
3806
3815
  ignoreCase: true,
3807
- specialCharacters: "keep",
3816
+ newlinesBetween: 1,
3817
+ order: "asc",
3808
3818
  partitionByComment: false,
3809
3819
  partitionByNewLine: false,
3810
- newlinesBetween: 1,
3811
- groups: ["value-export", "type-export"],
3812
- customGroups: []
3820
+ specialCharacters: "keep",
3821
+ type: "alphabetical"
3813
3822
  }
3814
3823
  ],
3815
- "@typescript-eslint/no-unused-vars": [
3824
+ "perfectionist/sort-imports": [
3816
3825
  "error",
3817
3826
  {
3818
- argsIgnorePattern: "^_",
3819
- varsIgnorePattern: "^_",
3820
- caughtErrorsIgnorePattern: "^_"
3827
+ groups: ["type", "builtin", "external", "internal", "object"],
3828
+ ignoreCase: true,
3829
+ internalPattern: ["^src/.*"],
3830
+ newlinesBetween: 1,
3831
+ order: "asc",
3832
+ partitionByComment: false,
3833
+ partitionByNewLine: false,
3834
+ specialCharacters: "keep",
3835
+ type: "alphabetical"
3821
3836
  }
3822
3837
  ],
3823
- // Disable regular no-unused-vars rule since that will flag interface declarations. Only use the TypeScript specific rule for this.
3824
- "no-unused-vars": "off",
3825
- "func-style": ["error", "declaration", { allowArrowFunctions: false }],
3826
3838
  "prefer-arrow-callback": ["error", { allowNamedFunctions: false }],
3827
- "arrow-body-style": ["error", "always"],
3828
- curly: ["error", "all"],
3829
- "no-param-reassign": "error",
3830
- "no-useless-rename": "error",
3831
- "sort-vars": "error",
3832
- "no-cond-assign": "error",
3833
- "no-undef": "error",
3834
- "@typescript-eslint/consistent-type-imports": "error",
3835
3839
  "prettier/prettier": ["warn", prettierRules_default],
3836
- "no-restricted-imports": [
3837
- "error",
3838
- {
3839
- patterns: [
3840
- {
3841
- group: ["node_modules"],
3842
- message: "What on Earth are you doing? Leave poor node_modules alone!"
3843
- }
3844
- ]
3845
- }
3846
- ]
3840
+ "sort-vars": "error"
3841
+ },
3842
+ settings: {
3843
+ "import/resolver": {
3844
+ node: true,
3845
+ typescript: true
3846
+ }
3847
3847
  }
3848
3848
  },
3849
3849
  {
@@ -3854,8 +3854,8 @@ var typeScriptBase = [
3854
3854
  {
3855
3855
  paths: [
3856
3856
  {
3857
- name: "node:test",
3858
- message: "Use test functions from vitest instead."
3857
+ message: "Use test functions from vitest instead.",
3858
+ name: "node:test"
3859
3859
  }
3860
3860
  ]
3861
3861
  }
@@ -3879,30 +3879,30 @@ var import_globals2 = __toESM(require_globals2(), 1);
3879
3879
  var typeScriptReactBase = [
3880
3880
  ...typeScriptBase_default,
3881
3881
  {
3882
- name: "@alextheman/eslint-config-typescript-react-base",
3883
3882
  languageOptions: {
3884
3883
  ecmaVersion: 2020,
3885
3884
  globals: import_globals2.default.browser
3886
3885
  },
3886
+ name: "@alextheman/eslint-config-typescript-react-base",
3887
3887
  plugins: {
3888
+ react: import_eslint_plugin_react.default,
3888
3889
  "react-hooks": import_eslint_plugin_react_hooks.default,
3889
- "react-refresh": import_eslint_plugin_react_refresh.default,
3890
- react: import_eslint_plugin_react.default
3890
+ "react-refresh": import_eslint_plugin_react_refresh.default
3891
3891
  },
3892
3892
  rules: __spreadProps(__spreadValues({}, import_eslint_plugin_react_hooks.default.configs.recommended.rules), {
3893
- "react-refresh/only-export-components": "off",
3894
- "react-hooks/exhaustive-deps": "off",
3895
3893
  "no-restricted-imports": [
3896
3894
  "error",
3897
3895
  {
3898
3896
  paths: [
3899
3897
  {
3900
- regex: "^@mui/[^/]+$",
3901
- message: 'Please use `import Component from "@mui/[package]/Component"` instead. See https://mui.com/material-ui/guides/minimizing-bundle-size/ for more information.'
3898
+ message: 'Please use `import Component from "@mui/[package]/Component"` instead. See https://mui.com/material-ui/guides/minimizing-bundle-size/ for more information.',
3899
+ regex: "^@mui/[^/]+$"
3902
3900
  }
3903
3901
  ]
3904
3902
  }
3905
- ]
3903
+ ],
3904
+ "react-hooks/exhaustive-deps": "off",
3905
+ "react-refresh/only-export-components": "off"
3906
3906
  })
3907
3907
  }
3908
3908
  ];
package/dist/index.d.cts CHANGED
@@ -3,7 +3,7 @@ import z from 'zod';
3
3
  import { Config } from 'prettier';
4
4
 
5
5
  var name = "@alextheman/eslint-plugin";
6
- var version = "1.13.4";
6
+ var version = "1.13.5";
7
7
 
8
8
  interface AlexPlugin {
9
9
  meta: {
package/dist/index.d.ts CHANGED
@@ -3,7 +3,7 @@ import z from 'zod';
3
3
  import { Config } from 'prettier';
4
4
 
5
5
  var name = "@alextheman/eslint-plugin";
6
- var version = "1.13.4";
6
+ var version = "1.13.5";
7
7
 
8
8
  interface AlexPlugin {
9
9
  meta: {
package/dist/index.js CHANGED
@@ -3692,7 +3692,7 @@ var require_globals2 = __commonJS({
3692
3692
 
3693
3693
  // package.json
3694
3694
  var name = "@alextheman/eslint-plugin";
3695
- var version = "1.13.4";
3695
+ var version = "1.13.5";
3696
3696
 
3697
3697
  // src/configs/alexPluginBase.ts
3698
3698
  function createAlexPluginBaseConfig(plugin) {
@@ -3710,9 +3710,9 @@ function createAlexPluginBaseConfig(plugin) {
3710
3710
  {
3711
3711
  files: ["**/*.test.ts"],
3712
3712
  rules: {
3713
+ "@alextheman/consistent-test-function": ["error", { preference: "test" }],
3713
3714
  "@alextheman/no-isolated-tests": "error",
3714
- "@alextheman/no-skipped-tests": "warn",
3715
- "@alextheman/consistent-test-function": ["error", { preference: "test" }]
3715
+ "@alextheman/no-skipped-tests": "warn"
3716
3716
  }
3717
3717
  }
3718
3718
  ];
@@ -3742,94 +3742,94 @@ var typeScriptBase = [
3742
3742
  prettierConfig,
3743
3743
  packageJson.configs.recommended,
3744
3744
  {
3745
- name: "@alextheman/eslint-config-typescript-base",
3746
3745
  files: ["**/*.ts", "**/*.tsx"],
3746
+ ignores: ["dist"],
3747
3747
  languageOptions: {
3748
+ globals: __spreadValues(__spreadValues({}, import_globals.default.node), import_globals.default.browser),
3748
3749
  parser: tsparser,
3749
3750
  parserOptions: {
3750
3751
  ecmaVersion: "latest",
3751
3752
  sourceType: "module"
3752
- },
3753
- globals: __spreadValues(__spreadValues({}, import_globals.default.node), import_globals.default.browser)
3754
- },
3755
- settings: {
3756
- "import/resolver": {
3757
- typescript: true,
3758
- node: true
3759
3753
  }
3760
3754
  },
3761
- ignores: ["dist"],
3755
+ name: "@alextheman/eslint-config-typescript-base",
3762
3756
  plugins: {
3763
3757
  "@typescript-eslint": eslintPlugin,
3764
3758
  import: importPlugin,
3765
- prettier: prettierPlugin,
3766
- perfectionist
3759
+ perfectionist,
3760
+ prettier: prettierPlugin
3767
3761
  },
3768
3762
  rules: {
3769
- "import/no-unresolved": "error",
3763
+ "@typescript-eslint/consistent-type-imports": "error",
3764
+ "@typescript-eslint/no-unused-vars": [
3765
+ "error",
3766
+ {
3767
+ argsIgnorePattern: "^_",
3768
+ caughtErrorsIgnorePattern: "^_",
3769
+ varsIgnorePattern: "^_"
3770
+ }
3771
+ ],
3772
+ "arrow-body-style": ["error", "always"],
3773
+ curly: ["error", "all"],
3770
3774
  eqeqeq: "error",
3775
+ "func-style": ["error", "declaration", { allowArrowFunctions: false }],
3776
+ "import/no-unresolved": "error",
3777
+ "no-cond-assign": "error",
3771
3778
  "no-console": ["error", { allow: ["warn", "error"] }],
3772
- "perfectionist/sort-imports": [
3779
+ "no-param-reassign": "error",
3780
+ "no-restricted-imports": [
3773
3781
  "error",
3774
3782
  {
3775
- type: "alphabetical",
3776
- order: "asc",
3777
- ignoreCase: true,
3778
- partitionByComment: false,
3779
- partitionByNewLine: false,
3780
- specialCharacters: "keep",
3781
- groups: ["type", "builtin", "external", "internal", "object"],
3782
- newlinesBetween: 1,
3783
- internalPattern: ["^src/.*"]
3783
+ patterns: [
3784
+ {
3785
+ group: ["node_modules"],
3786
+ message: "What on Earth are you doing? Leave poor node_modules alone!"
3787
+ }
3788
+ ]
3784
3789
  }
3785
3790
  ],
3791
+ "no-undef": "error",
3792
+ // Disable regular no-unused-vars rule since that will flag interface declarations. Only use the TypeScript specific rule for this.
3793
+ "no-unused-vars": "off",
3794
+ "no-useless-rename": "error",
3786
3795
  "perfectionist/sort-exports": [
3787
3796
  "error",
3788
3797
  {
3789
- type: "alphabetical",
3790
- order: "asc",
3798
+ customGroups: [],
3791
3799
  fallbackSort: { type: "natural" },
3800
+ groups: ["value-export", "type-export"],
3792
3801
  ignoreCase: true,
3793
- specialCharacters: "keep",
3802
+ newlinesBetween: 1,
3803
+ order: "asc",
3794
3804
  partitionByComment: false,
3795
3805
  partitionByNewLine: false,
3796
- newlinesBetween: 1,
3797
- groups: ["value-export", "type-export"],
3798
- customGroups: []
3806
+ specialCharacters: "keep",
3807
+ type: "alphabetical"
3799
3808
  }
3800
3809
  ],
3801
- "@typescript-eslint/no-unused-vars": [
3810
+ "perfectionist/sort-imports": [
3802
3811
  "error",
3803
3812
  {
3804
- argsIgnorePattern: "^_",
3805
- varsIgnorePattern: "^_",
3806
- caughtErrorsIgnorePattern: "^_"
3813
+ groups: ["type", "builtin", "external", "internal", "object"],
3814
+ ignoreCase: true,
3815
+ internalPattern: ["^src/.*"],
3816
+ newlinesBetween: 1,
3817
+ order: "asc",
3818
+ partitionByComment: false,
3819
+ partitionByNewLine: false,
3820
+ specialCharacters: "keep",
3821
+ type: "alphabetical"
3807
3822
  }
3808
3823
  ],
3809
- // Disable regular no-unused-vars rule since that will flag interface declarations. Only use the TypeScript specific rule for this.
3810
- "no-unused-vars": "off",
3811
- "func-style": ["error", "declaration", { allowArrowFunctions: false }],
3812
3824
  "prefer-arrow-callback": ["error", { allowNamedFunctions: false }],
3813
- "arrow-body-style": ["error", "always"],
3814
- curly: ["error", "all"],
3815
- "no-param-reassign": "error",
3816
- "no-useless-rename": "error",
3817
- "sort-vars": "error",
3818
- "no-cond-assign": "error",
3819
- "no-undef": "error",
3820
- "@typescript-eslint/consistent-type-imports": "error",
3821
3825
  "prettier/prettier": ["warn", prettierRules_default],
3822
- "no-restricted-imports": [
3823
- "error",
3824
- {
3825
- patterns: [
3826
- {
3827
- group: ["node_modules"],
3828
- message: "What on Earth are you doing? Leave poor node_modules alone!"
3829
- }
3830
- ]
3831
- }
3832
- ]
3826
+ "sort-vars": "error"
3827
+ },
3828
+ settings: {
3829
+ "import/resolver": {
3830
+ node: true,
3831
+ typescript: true
3832
+ }
3833
3833
  }
3834
3834
  },
3835
3835
  {
@@ -3840,8 +3840,8 @@ var typeScriptBase = [
3840
3840
  {
3841
3841
  paths: [
3842
3842
  {
3843
- name: "node:test",
3844
- message: "Use test functions from vitest instead."
3843
+ message: "Use test functions from vitest instead.",
3844
+ name: "node:test"
3845
3845
  }
3846
3846
  ]
3847
3847
  }
@@ -3865,30 +3865,30 @@ import reactRefresh from "eslint-plugin-react-refresh";
3865
3865
  var typeScriptReactBase = [
3866
3866
  ...typeScriptBase_default,
3867
3867
  {
3868
- name: "@alextheman/eslint-config-typescript-react-base",
3869
3868
  languageOptions: {
3870
3869
  ecmaVersion: 2020,
3871
3870
  globals: import_globals2.default.browser
3872
3871
  },
3872
+ name: "@alextheman/eslint-config-typescript-react-base",
3873
3873
  plugins: {
3874
+ react: reactPlugin,
3874
3875
  "react-hooks": reactHooks,
3875
- "react-refresh": reactRefresh,
3876
- react: reactPlugin
3876
+ "react-refresh": reactRefresh
3877
3877
  },
3878
3878
  rules: __spreadProps(__spreadValues({}, reactHooks.configs.recommended.rules), {
3879
- "react-refresh/only-export-components": "off",
3880
- "react-hooks/exhaustive-deps": "off",
3881
3879
  "no-restricted-imports": [
3882
3880
  "error",
3883
3881
  {
3884
3882
  paths: [
3885
3883
  {
3886
- regex: "^@mui/[^/]+$",
3887
- message: 'Please use `import Component from "@mui/[package]/Component"` instead. See https://mui.com/material-ui/guides/minimizing-bundle-size/ for more information.'
3884
+ message: 'Please use `import Component from "@mui/[package]/Component"` instead. See https://mui.com/material-ui/guides/minimizing-bundle-size/ for more information.',
3885
+ regex: "^@mui/[^/]+$"
3888
3886
  }
3889
3887
  ]
3890
3888
  }
3891
- ]
3889
+ ],
3890
+ "react-hooks/exhaustive-deps": "off",
3891
+ "react-refresh/only-export-components": "off"
3892
3892
  })
3893
3893
  }
3894
3894
  ];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alextheman/eslint-plugin",
3
- "version": "1.13.4",
3
+ "version": "1.13.5",
4
4
  "description": "A package to provide custom ESLint rules and configs",
5
5
  "license": "ISC",
6
6
  "author": "alextheman",