@alextheman/eslint-plugin 1.6.8 → 1.8.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
@@ -3700,16 +3700,31 @@ var require_globals2 = __commonJS({
3700
3700
  var index_exports = {};
3701
3701
  __export(index_exports, {
3702
3702
  default: () => index_default,
3703
- prettierRules: () => prettier_rules_default,
3704
- warnOnFixButErrorOnLint: () => warnOnFixButErrorOnLint
3703
+ prettierRules: () => prettierRules_default
3705
3704
  });
3706
3705
  module.exports = __toCommonJS(index_exports);
3707
3706
 
3708
3707
  // package.json
3709
3708
  var name = "@alextheman/eslint-plugin";
3710
- var version = "1.6.8";
3709
+ var version = "1.8.0";
3711
3710
 
3712
- // src/configs/eslint-config-typescript-base.ts
3711
+ // src/configs/alexPluginBase.ts
3712
+ function createAlexPluginBaseConfig(plugin2) {
3713
+ return [
3714
+ {
3715
+ plugins: {
3716
+ "@alextheman": plugin2
3717
+ },
3718
+ rules: {
3719
+ "@alextheman/no-namespace-imports": "error",
3720
+ "@alextheman/no-relative-imports": "error"
3721
+ }
3722
+ }
3723
+ ];
3724
+ }
3725
+ var alexPluginBase_default = createAlexPluginBaseConfig;
3726
+
3727
+ // src/configs/typeScriptBase.ts
3713
3728
  var import_js = __toESM(require_src(), 1);
3714
3729
  var import_eslint_plugin = __toESM(require("@typescript-eslint/eslint-plugin"), 1);
3715
3730
  var import_parser = __toESM(require("@typescript-eslint/parser"), 1);
@@ -3719,15 +3734,14 @@ var import_eslint_plugin_perfectionist = __toESM(require("eslint-plugin-perfecti
3719
3734
  var import_eslint_plugin_prettier = __toESM(require("eslint-plugin-prettier"), 1);
3720
3735
  var import_globals = __toESM(require_globals2(), 1);
3721
3736
 
3722
- // src/configs/prettier-rules.ts
3737
+ // src/configs/prettierRules.ts
3723
3738
  var prettierRules = {
3724
3739
  printWidth: 100
3725
3740
  };
3726
- var prettier_rules_default = prettierRules;
3741
+ var prettierRules_default = prettierRules;
3727
3742
 
3728
- // src/configs/eslint-config-typescript-base.ts
3729
- var warnOnFixButErrorOnLint = process.env.ESLINT_MODE === "fix" ? "warn" : "error";
3730
- var esLintConfigTypeScriptBase = [
3743
+ // src/configs/typeScriptBase.ts
3744
+ var typeScriptBase = [
3731
3745
  import_js.default.configs.recommended,
3732
3746
  import_eslint_config_prettier.default,
3733
3747
  {
@@ -3755,11 +3769,11 @@ var esLintConfigTypeScriptBase = [
3755
3769
  perfectionist: import_eslint_plugin_perfectionist.default
3756
3770
  },
3757
3771
  rules: {
3758
- "import/no-unresolved": warnOnFixButErrorOnLint,
3759
- eqeqeq: warnOnFixButErrorOnLint,
3760
- "no-console": [warnOnFixButErrorOnLint, { allow: ["warn", "error"] }],
3772
+ "import/no-unresolved": "error",
3773
+ eqeqeq: "error",
3774
+ "no-console": ["error", { allow: ["warn", "error"] }],
3761
3775
  "no-restricted-imports": [
3762
- warnOnFixButErrorOnLint,
3776
+ "error",
3763
3777
  {
3764
3778
  patterns: [
3765
3779
  {
@@ -3770,7 +3784,7 @@ var esLintConfigTypeScriptBase = [
3770
3784
  }
3771
3785
  ],
3772
3786
  "perfectionist/sort-imports": [
3773
- warnOnFixButErrorOnLint,
3787
+ "error",
3774
3788
  {
3775
3789
  type: "alphabetical",
3776
3790
  order: "asc",
@@ -3784,7 +3798,7 @@ var esLintConfigTypeScriptBase = [
3784
3798
  }
3785
3799
  ],
3786
3800
  "perfectionist/sort-exports": [
3787
- warnOnFixButErrorOnLint,
3801
+ "error",
3788
3802
  {
3789
3803
  type: "alphabetical",
3790
3804
  order: "asc",
@@ -3799,7 +3813,7 @@ var esLintConfigTypeScriptBase = [
3799
3813
  }
3800
3814
  ],
3801
3815
  "@typescript-eslint/no-unused-vars": [
3802
- warnOnFixButErrorOnLint,
3816
+ "error",
3803
3817
  {
3804
3818
  argsIgnorePattern: "^_",
3805
3819
  varsIgnorePattern: "^_",
@@ -3808,76 +3822,69 @@ var esLintConfigTypeScriptBase = [
3808
3822
  ],
3809
3823
  // Disable regular no-unused-vars rule since that will flag interface declarations. Only use the TypeScript specific rule for this.
3810
3824
  "no-unused-vars": "off",
3811
- "func-style": [warnOnFixButErrorOnLint, "declaration", { allowArrowFunctions: false }],
3812
- "prefer-arrow-callback": [warnOnFixButErrorOnLint, { allowNamedFunctions: false }],
3813
- "arrow-body-style": [warnOnFixButErrorOnLint, "always"],
3814
- "no-param-reassign": warnOnFixButErrorOnLint,
3815
- "no-useless-rename": warnOnFixButErrorOnLint,
3816
- "sort-vars": warnOnFixButErrorOnLint,
3817
- "no-cond-assign": warnOnFixButErrorOnLint,
3818
- "no-undef": warnOnFixButErrorOnLint,
3819
- "@typescript-eslint/consistent-type-imports": warnOnFixButErrorOnLint,
3820
- "prettier/prettier": ["warn", prettier_rules_default]
3825
+ "func-style": ["error", "declaration", { allowArrowFunctions: false }],
3826
+ "prefer-arrow-callback": ["error", { allowNamedFunctions: false }],
3827
+ "arrow-body-style": ["error", "always"],
3828
+ "no-param-reassign": "error",
3829
+ "no-useless-rename": "error",
3830
+ "sort-vars": "error",
3831
+ "no-cond-assign": "error",
3832
+ "no-undef": "error",
3833
+ "@typescript-eslint/consistent-type-imports": "error",
3834
+ "prettier/prettier": ["warn", prettierRules_default]
3821
3835
  }
3822
3836
  }
3823
3837
  ];
3824
- var eslint_config_typescript_base_default = esLintConfigTypeScriptBase;
3838
+ var typeScriptBase_default = typeScriptBase;
3825
3839
 
3826
- // src/configs/alex-typescript-base.ts
3840
+ // src/configs/alexTypeScriptBase.ts
3827
3841
  function createAlexTypeScriptBaseConfig(plugin2) {
3828
- return [
3829
- ...eslint_config_typescript_base_default,
3830
- {
3831
- plugins: {
3832
- "@alextheman": plugin2
3833
- },
3834
- rules: {
3835
- "@alextheman/no-namespace-imports": warnOnFixButErrorOnLint,
3836
- "@alextheman/no-relative-imports": warnOnFixButErrorOnLint
3837
- }
3838
- }
3839
- ];
3842
+ return [...alexPluginBase_default(plugin2), ...typeScriptBase_default];
3840
3843
  }
3841
- var alex_typescript_base_default = createAlexTypeScriptBaseConfig;
3844
+ var alexTypeScriptBase_default = createAlexTypeScriptBaseConfig;
3842
3845
 
3843
- // src/configs/alex-typescript-react-base.ts
3846
+ // src/configs/typeScriptReactBase.ts
3844
3847
  var import_eslint_plugin_react = __toESM(require("eslint-plugin-react"), 1);
3845
3848
  var import_eslint_plugin_react_hooks = __toESM(require("eslint-plugin-react-hooks"), 1);
3846
3849
  var import_eslint_plugin_react_refresh = __toESM(require("eslint-plugin-react-refresh"), 1);
3847
3850
  var import_globals2 = __toESM(require_globals2(), 1);
3851
+ var typeScriptReactBase = [
3852
+ ...typeScriptBase_default,
3853
+ {
3854
+ name: "@alextheman/eslint-config-typescript-react-base",
3855
+ languageOptions: {
3856
+ ecmaVersion: 2020,
3857
+ globals: import_globals2.default.browser
3858
+ },
3859
+ plugins: {
3860
+ "react-hooks": import_eslint_plugin_react_hooks.default,
3861
+ "react-refresh": import_eslint_plugin_react_refresh.default,
3862
+ react: import_eslint_plugin_react.default
3863
+ },
3864
+ rules: __spreadProps(__spreadValues({}, import_eslint_plugin_react_hooks.default.configs.recommended.rules), {
3865
+ "react-refresh/only-export-components": "off",
3866
+ "react-hooks/exhaustive-deps": "off",
3867
+ "no-restricted-imports": [
3868
+ "error",
3869
+ {
3870
+ paths: [
3871
+ {
3872
+ name: "@mui/material",
3873
+ message: 'Please use `import Component from "@mui/material/Component"` instead. See https://mui.com/material-ui/guides/minimizing-bundle-size/ for more information.'
3874
+ }
3875
+ ]
3876
+ }
3877
+ ]
3878
+ })
3879
+ }
3880
+ ];
3881
+ var typeScriptReactBase_default = typeScriptReactBase;
3882
+
3883
+ // src/configs/alexTypeScriptReactBase.ts
3848
3884
  function createAlexTypeScriptReactBaseConfig(plugin2) {
3849
- return [
3850
- ...alex_typescript_base_default(plugin2),
3851
- {
3852
- name: "@alextheman/eslint-config-typescript-react-base",
3853
- languageOptions: {
3854
- ecmaVersion: 2020,
3855
- globals: import_globals2.default.browser
3856
- },
3857
- plugins: {
3858
- "react-hooks": import_eslint_plugin_react_hooks.default,
3859
- "react-refresh": import_eslint_plugin_react_refresh.default,
3860
- react: import_eslint_plugin_react.default
3861
- },
3862
- rules: __spreadProps(__spreadValues({}, import_eslint_plugin_react_hooks.default.configs.recommended.rules), {
3863
- "react-refresh/only-export-components": "off",
3864
- "react-hooks/exhaustive-deps": "off",
3865
- "no-restricted-imports": [
3866
- warnOnFixButErrorOnLint,
3867
- {
3868
- paths: [
3869
- {
3870
- name: "@mui/material",
3871
- message: 'Please use `import Component from "@mui/material/Component"` instead. See https://mui.com/material-ui/guides/minimizing-bundle-size/ for more information.'
3872
- }
3873
- ]
3874
- }
3875
- ]
3876
- })
3877
- }
3878
- ];
3885
+ return [...alexTypeScriptBase_default(plugin2), ...typeScriptReactBase_default];
3879
3886
  }
3880
- var alex_typescript_react_base_default = createAlexTypeScriptReactBaseConfig;
3887
+ var alexTypeScriptReactBase_default = createAlexTypeScriptReactBaseConfig;
3881
3888
 
3882
3889
  // src/create-rule.ts
3883
3890
  var import_utils = require("@typescript-eslint/utils");
@@ -4045,6 +4052,11 @@ var rules_default = {
4045
4052
  };
4046
4053
 
4047
4054
  // src/index.ts
4055
+ if (process.env.ESLINT_MODE) {
4056
+ console.warn(
4057
+ "ESLINT_MODE is now deprecated. Please use eslint --fix --quiet when running the fixer instead."
4058
+ );
4059
+ }
4048
4060
  var plugin = {
4049
4061
  meta: {
4050
4062
  name,
@@ -4052,18 +4064,23 @@ var plugin = {
4052
4064
  namespace: "alextheman"
4053
4065
  },
4054
4066
  configs: {
4067
+ alexPluginBase: [],
4055
4068
  alexTypeScriptBase: [],
4056
- alexTypeScriptReactBase: []
4069
+ alexTypeScriptReactBase: [],
4070
+ typeScriptBase: [],
4071
+ typeScriptReactBase: []
4057
4072
  },
4058
4073
  rules: rules_default
4059
4074
  };
4060
4075
  plugin.configs = {
4061
- alexTypeScriptBase: alex_typescript_base_default(plugin),
4062
- alexTypeScriptReactBase: alex_typescript_react_base_default(plugin)
4076
+ alexPluginBase: alexPluginBase_default(plugin),
4077
+ alexTypeScriptBase: alexTypeScriptBase_default(plugin),
4078
+ alexTypeScriptReactBase: alexTypeScriptReactBase_default(plugin),
4079
+ typeScriptBase: typeScriptBase_default,
4080
+ typeScriptReactBase: typeScriptReactBase_default
4063
4081
  };
4064
4082
  var index_default = plugin;
4065
4083
  // Annotate the CommonJS export names for ESM import in node:
4066
4084
  0 && (module.exports = {
4067
- prettierRules,
4068
- warnOnFixButErrorOnLint
4085
+ prettierRules
4069
4086
  });
package/dist/index.d.cts CHANGED
@@ -2,9 +2,7 @@ import { Linter } from 'eslint';
2
2
  import { Config } from 'prettier';
3
3
 
4
4
  var name = "@alextheman/eslint-plugin";
5
- var version = "1.6.8";
6
-
7
- declare const warnOnFixButErrorOnLint: string;
5
+ var version = "1.8.0";
8
6
 
9
7
  declare const prettierRules: Config;
10
8
 
@@ -15,12 +13,15 @@ interface AlexPlugin {
15
13
  namespace: "alextheman";
16
14
  };
17
15
  configs: {
16
+ alexPluginBase: Linter.Config[];
18
17
  alexTypeScriptBase: Linter.Config[];
19
18
  alexTypeScriptReactBase: Linter.Config[];
19
+ typeScriptBase: Linter.Config[];
20
+ typeScriptReactBase: Linter.Config[];
20
21
  };
21
22
  rules: Record<string, any>;
22
23
  }
23
24
 
24
25
  declare const plugin: AlexPlugin;
25
26
 
26
- export { type AlexPlugin, plugin as default, prettierRules, warnOnFixButErrorOnLint };
27
+ export { type AlexPlugin, plugin as default, prettierRules };
package/dist/index.d.ts CHANGED
@@ -2,9 +2,7 @@ import { Linter } from 'eslint';
2
2
  import { Config } from 'prettier';
3
3
 
4
4
  var name = "@alextheman/eslint-plugin";
5
- var version = "1.6.8";
6
-
7
- declare const warnOnFixButErrorOnLint: string;
5
+ var version = "1.8.0";
8
6
 
9
7
  declare const prettierRules: Config;
10
8
 
@@ -15,12 +13,15 @@ interface AlexPlugin {
15
13
  namespace: "alextheman";
16
14
  };
17
15
  configs: {
16
+ alexPluginBase: Linter.Config[];
18
17
  alexTypeScriptBase: Linter.Config[];
19
18
  alexTypeScriptReactBase: Linter.Config[];
19
+ typeScriptBase: Linter.Config[];
20
+ typeScriptReactBase: Linter.Config[];
20
21
  };
21
22
  rules: Record<string, any>;
22
23
  }
23
24
 
24
25
  declare const plugin: AlexPlugin;
25
26
 
26
- export { type AlexPlugin, plugin as default, prettierRules, warnOnFixButErrorOnLint };
27
+ export { type AlexPlugin, plugin as default, prettierRules };
package/dist/index.js CHANGED
@@ -3692,9 +3692,25 @@ var require_globals2 = __commonJS({
3692
3692
 
3693
3693
  // package.json
3694
3694
  var name = "@alextheman/eslint-plugin";
3695
- var version = "1.6.8";
3695
+ var version = "1.8.0";
3696
3696
 
3697
- // src/configs/eslint-config-typescript-base.ts
3697
+ // src/configs/alexPluginBase.ts
3698
+ function createAlexPluginBaseConfig(plugin2) {
3699
+ return [
3700
+ {
3701
+ plugins: {
3702
+ "@alextheman": plugin2
3703
+ },
3704
+ rules: {
3705
+ "@alextheman/no-namespace-imports": "error",
3706
+ "@alextheman/no-relative-imports": "error"
3707
+ }
3708
+ }
3709
+ ];
3710
+ }
3711
+ var alexPluginBase_default = createAlexPluginBaseConfig;
3712
+
3713
+ // src/configs/typeScriptBase.ts
3698
3714
  var import_js = __toESM(require_src(), 1);
3699
3715
  var import_globals = __toESM(require_globals2(), 1);
3700
3716
  import eslintPlugin from "@typescript-eslint/eslint-plugin";
@@ -3704,15 +3720,14 @@ import importPlugin from "eslint-plugin-import";
3704
3720
  import perfectionist from "eslint-plugin-perfectionist";
3705
3721
  import prettierPlugin from "eslint-plugin-prettier";
3706
3722
 
3707
- // src/configs/prettier-rules.ts
3723
+ // src/configs/prettierRules.ts
3708
3724
  var prettierRules = {
3709
3725
  printWidth: 100
3710
3726
  };
3711
- var prettier_rules_default = prettierRules;
3727
+ var prettierRules_default = prettierRules;
3712
3728
 
3713
- // src/configs/eslint-config-typescript-base.ts
3714
- var warnOnFixButErrorOnLint = process.env.ESLINT_MODE === "fix" ? "warn" : "error";
3715
- var esLintConfigTypeScriptBase = [
3729
+ // src/configs/typeScriptBase.ts
3730
+ var typeScriptBase = [
3716
3731
  import_js.default.configs.recommended,
3717
3732
  prettierConfig,
3718
3733
  {
@@ -3740,11 +3755,11 @@ var esLintConfigTypeScriptBase = [
3740
3755
  perfectionist
3741
3756
  },
3742
3757
  rules: {
3743
- "import/no-unresolved": warnOnFixButErrorOnLint,
3744
- eqeqeq: warnOnFixButErrorOnLint,
3745
- "no-console": [warnOnFixButErrorOnLint, { allow: ["warn", "error"] }],
3758
+ "import/no-unresolved": "error",
3759
+ eqeqeq: "error",
3760
+ "no-console": ["error", { allow: ["warn", "error"] }],
3746
3761
  "no-restricted-imports": [
3747
- warnOnFixButErrorOnLint,
3762
+ "error",
3748
3763
  {
3749
3764
  patterns: [
3750
3765
  {
@@ -3755,7 +3770,7 @@ var esLintConfigTypeScriptBase = [
3755
3770
  }
3756
3771
  ],
3757
3772
  "perfectionist/sort-imports": [
3758
- warnOnFixButErrorOnLint,
3773
+ "error",
3759
3774
  {
3760
3775
  type: "alphabetical",
3761
3776
  order: "asc",
@@ -3769,7 +3784,7 @@ var esLintConfigTypeScriptBase = [
3769
3784
  }
3770
3785
  ],
3771
3786
  "perfectionist/sort-exports": [
3772
- warnOnFixButErrorOnLint,
3787
+ "error",
3773
3788
  {
3774
3789
  type: "alphabetical",
3775
3790
  order: "asc",
@@ -3784,7 +3799,7 @@ var esLintConfigTypeScriptBase = [
3784
3799
  }
3785
3800
  ],
3786
3801
  "@typescript-eslint/no-unused-vars": [
3787
- warnOnFixButErrorOnLint,
3802
+ "error",
3788
3803
  {
3789
3804
  argsIgnorePattern: "^_",
3790
3805
  varsIgnorePattern: "^_",
@@ -3793,76 +3808,69 @@ var esLintConfigTypeScriptBase = [
3793
3808
  ],
3794
3809
  // Disable regular no-unused-vars rule since that will flag interface declarations. Only use the TypeScript specific rule for this.
3795
3810
  "no-unused-vars": "off",
3796
- "func-style": [warnOnFixButErrorOnLint, "declaration", { allowArrowFunctions: false }],
3797
- "prefer-arrow-callback": [warnOnFixButErrorOnLint, { allowNamedFunctions: false }],
3798
- "arrow-body-style": [warnOnFixButErrorOnLint, "always"],
3799
- "no-param-reassign": warnOnFixButErrorOnLint,
3800
- "no-useless-rename": warnOnFixButErrorOnLint,
3801
- "sort-vars": warnOnFixButErrorOnLint,
3802
- "no-cond-assign": warnOnFixButErrorOnLint,
3803
- "no-undef": warnOnFixButErrorOnLint,
3804
- "@typescript-eslint/consistent-type-imports": warnOnFixButErrorOnLint,
3805
- "prettier/prettier": ["warn", prettier_rules_default]
3811
+ "func-style": ["error", "declaration", { allowArrowFunctions: false }],
3812
+ "prefer-arrow-callback": ["error", { allowNamedFunctions: false }],
3813
+ "arrow-body-style": ["error", "always"],
3814
+ "no-param-reassign": "error",
3815
+ "no-useless-rename": "error",
3816
+ "sort-vars": "error",
3817
+ "no-cond-assign": "error",
3818
+ "no-undef": "error",
3819
+ "@typescript-eslint/consistent-type-imports": "error",
3820
+ "prettier/prettier": ["warn", prettierRules_default]
3806
3821
  }
3807
3822
  }
3808
3823
  ];
3809
- var eslint_config_typescript_base_default = esLintConfigTypeScriptBase;
3824
+ var typeScriptBase_default = typeScriptBase;
3810
3825
 
3811
- // src/configs/alex-typescript-base.ts
3826
+ // src/configs/alexTypeScriptBase.ts
3812
3827
  function createAlexTypeScriptBaseConfig(plugin2) {
3813
- return [
3814
- ...eslint_config_typescript_base_default,
3815
- {
3816
- plugins: {
3817
- "@alextheman": plugin2
3818
- },
3819
- rules: {
3820
- "@alextheman/no-namespace-imports": warnOnFixButErrorOnLint,
3821
- "@alextheman/no-relative-imports": warnOnFixButErrorOnLint
3822
- }
3823
- }
3824
- ];
3828
+ return [...alexPluginBase_default(plugin2), ...typeScriptBase_default];
3825
3829
  }
3826
- var alex_typescript_base_default = createAlexTypeScriptBaseConfig;
3830
+ var alexTypeScriptBase_default = createAlexTypeScriptBaseConfig;
3827
3831
 
3828
- // src/configs/alex-typescript-react-base.ts
3832
+ // src/configs/typeScriptReactBase.ts
3829
3833
  var import_globals2 = __toESM(require_globals2(), 1);
3830
3834
  import reactPlugin from "eslint-plugin-react";
3831
3835
  import reactHooks from "eslint-plugin-react-hooks";
3832
3836
  import reactRefresh from "eslint-plugin-react-refresh";
3837
+ var typeScriptReactBase = [
3838
+ ...typeScriptBase_default,
3839
+ {
3840
+ name: "@alextheman/eslint-config-typescript-react-base",
3841
+ languageOptions: {
3842
+ ecmaVersion: 2020,
3843
+ globals: import_globals2.default.browser
3844
+ },
3845
+ plugins: {
3846
+ "react-hooks": reactHooks,
3847
+ "react-refresh": reactRefresh,
3848
+ react: reactPlugin
3849
+ },
3850
+ rules: __spreadProps(__spreadValues({}, reactHooks.configs.recommended.rules), {
3851
+ "react-refresh/only-export-components": "off",
3852
+ "react-hooks/exhaustive-deps": "off",
3853
+ "no-restricted-imports": [
3854
+ "error",
3855
+ {
3856
+ paths: [
3857
+ {
3858
+ name: "@mui/material",
3859
+ message: 'Please use `import Component from "@mui/material/Component"` instead. See https://mui.com/material-ui/guides/minimizing-bundle-size/ for more information.'
3860
+ }
3861
+ ]
3862
+ }
3863
+ ]
3864
+ })
3865
+ }
3866
+ ];
3867
+ var typeScriptReactBase_default = typeScriptReactBase;
3868
+
3869
+ // src/configs/alexTypeScriptReactBase.ts
3833
3870
  function createAlexTypeScriptReactBaseConfig(plugin2) {
3834
- return [
3835
- ...alex_typescript_base_default(plugin2),
3836
- {
3837
- name: "@alextheman/eslint-config-typescript-react-base",
3838
- languageOptions: {
3839
- ecmaVersion: 2020,
3840
- globals: import_globals2.default.browser
3841
- },
3842
- plugins: {
3843
- "react-hooks": reactHooks,
3844
- "react-refresh": reactRefresh,
3845
- react: reactPlugin
3846
- },
3847
- rules: __spreadProps(__spreadValues({}, reactHooks.configs.recommended.rules), {
3848
- "react-refresh/only-export-components": "off",
3849
- "react-hooks/exhaustive-deps": "off",
3850
- "no-restricted-imports": [
3851
- warnOnFixButErrorOnLint,
3852
- {
3853
- paths: [
3854
- {
3855
- name: "@mui/material",
3856
- message: 'Please use `import Component from "@mui/material/Component"` instead. See https://mui.com/material-ui/guides/minimizing-bundle-size/ for more information.'
3857
- }
3858
- ]
3859
- }
3860
- ]
3861
- })
3862
- }
3863
- ];
3871
+ return [...alexTypeScriptBase_default(plugin2), ...typeScriptReactBase_default];
3864
3872
  }
3865
- var alex_typescript_react_base_default = createAlexTypeScriptReactBaseConfig;
3873
+ var alexTypeScriptReactBase_default = createAlexTypeScriptReactBaseConfig;
3866
3874
 
3867
3875
  // src/create-rule.ts
3868
3876
  import { ESLintUtils } from "@typescript-eslint/utils";
@@ -4030,6 +4038,11 @@ var rules_default = {
4030
4038
  };
4031
4039
 
4032
4040
  // src/index.ts
4041
+ if (process.env.ESLINT_MODE) {
4042
+ console.warn(
4043
+ "ESLINT_MODE is now deprecated. Please use eslint --fix --quiet when running the fixer instead."
4044
+ );
4045
+ }
4033
4046
  var plugin = {
4034
4047
  meta: {
4035
4048
  name,
@@ -4037,18 +4050,23 @@ var plugin = {
4037
4050
  namespace: "alextheman"
4038
4051
  },
4039
4052
  configs: {
4053
+ alexPluginBase: [],
4040
4054
  alexTypeScriptBase: [],
4041
- alexTypeScriptReactBase: []
4055
+ alexTypeScriptReactBase: [],
4056
+ typeScriptBase: [],
4057
+ typeScriptReactBase: []
4042
4058
  },
4043
4059
  rules: rules_default
4044
4060
  };
4045
4061
  plugin.configs = {
4046
- alexTypeScriptBase: alex_typescript_base_default(plugin),
4047
- alexTypeScriptReactBase: alex_typescript_react_base_default(plugin)
4062
+ alexPluginBase: alexPluginBase_default(plugin),
4063
+ alexTypeScriptBase: alexTypeScriptBase_default(plugin),
4064
+ alexTypeScriptReactBase: alexTypeScriptReactBase_default(plugin),
4065
+ typeScriptBase: typeScriptBase_default,
4066
+ typeScriptReactBase: typeScriptReactBase_default
4048
4067
  };
4049
4068
  var index_default = plugin;
4050
4069
  export {
4051
4070
  index_default as default,
4052
- prettier_rules_default as prettierRules,
4053
- warnOnFixButErrorOnLint
4071
+ prettierRules_default as prettierRules
4054
4072
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alextheman/eslint-plugin",
3
- "version": "1.6.8",
3
+ "version": "1.8.0",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -10,8 +10,8 @@
10
10
  "scripts": {
11
11
  "test": "vitest run",
12
12
  "test-watch": "vitest",
13
- "format": "npm run build && prettier --write --parser typescript 'src/**/*.ts' 'tests/**/*.ts' && ESLINT_MODE=fix eslint --fix 'src/**/*.ts' 'tests/**/*.ts'",
14
- "lint": "npm run build && ESLINT_MODE=lint eslint 'src/**/*.ts' 'tests/**/*.ts' && prettier --check --parser typescript 'src/**/*.ts' 'tests/**/*.ts'",
13
+ "format": "npm run build && prettier --write --parser typescript \"src/**/*.ts\" \"tests/**/*.ts\" && eslint --fix --quiet \"src/**/*.ts\" \"tests/**/*.ts\"",
14
+ "lint": "npm run build && eslint \"src/**/*.ts\" \"tests/**/*.ts\" && prettier --check --parser typescript \"src/**/*.ts\" \"tests/**/*.ts\"",
15
15
  "update-dependencies": "npx npm-check-updates -u && npm install",
16
16
  "prepare": "husky",
17
17
  "build": "tsup",