@alextheman/eslint-plugin 1.7.0 → 1.8.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 CHANGED
@@ -3700,18 +3700,13 @@ var require_globals2 = __commonJS({
3700
3700
  var index_exports = {};
3701
3701
  __export(index_exports, {
3702
3702
  default: () => index_default,
3703
- prettierRules: () => prettierRules_default,
3704
- warnOnFixButErrorOnLint: () => warnOnFixButErrorOnLint_default
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.7.0";
3711
-
3712
- // src/configs/warnOnFixButErrorOnLint.ts
3713
- var warnOnFixButErrorOnLint = process.env.ESLINT_MODE === "fix" ? "warn" : "error";
3714
- var warnOnFixButErrorOnLint_default = warnOnFixButErrorOnLint;
3709
+ var version = "1.8.1";
3715
3710
 
3716
3711
  // src/configs/alexPluginBase.ts
3717
3712
  function createAlexPluginBaseConfig(plugin2) {
@@ -3721,8 +3716,8 @@ function createAlexPluginBaseConfig(plugin2) {
3721
3716
  "@alextheman": plugin2
3722
3717
  },
3723
3718
  rules: {
3724
- "@alextheman/no-namespace-imports": warnOnFixButErrorOnLint_default,
3725
- "@alextheman/no-relative-imports": warnOnFixButErrorOnLint_default
3719
+ "@alextheman/no-namespace-imports": "error",
3720
+ "@alextheman/no-relative-imports": "error"
3726
3721
  }
3727
3722
  }
3728
3723
  ];
@@ -3774,11 +3769,11 @@ var typeScriptBase = [
3774
3769
  perfectionist: import_eslint_plugin_perfectionist.default
3775
3770
  },
3776
3771
  rules: {
3777
- "import/no-unresolved": warnOnFixButErrorOnLint_default,
3778
- eqeqeq: warnOnFixButErrorOnLint_default,
3779
- "no-console": [warnOnFixButErrorOnLint_default, { allow: ["warn", "error"] }],
3772
+ "import/no-unresolved": "error",
3773
+ eqeqeq: "error",
3774
+ "no-console": ["error", { allow: ["warn", "error"] }],
3780
3775
  "no-restricted-imports": [
3781
- warnOnFixButErrorOnLint_default,
3776
+ "error",
3782
3777
  {
3783
3778
  patterns: [
3784
3779
  {
@@ -3789,7 +3784,7 @@ var typeScriptBase = [
3789
3784
  }
3790
3785
  ],
3791
3786
  "perfectionist/sort-imports": [
3792
- warnOnFixButErrorOnLint_default,
3787
+ "error",
3793
3788
  {
3794
3789
  type: "alphabetical",
3795
3790
  order: "asc",
@@ -3803,7 +3798,7 @@ var typeScriptBase = [
3803
3798
  }
3804
3799
  ],
3805
3800
  "perfectionist/sort-exports": [
3806
- warnOnFixButErrorOnLint_default,
3801
+ "error",
3807
3802
  {
3808
3803
  type: "alphabetical",
3809
3804
  order: "asc",
@@ -3818,7 +3813,7 @@ var typeScriptBase = [
3818
3813
  }
3819
3814
  ],
3820
3815
  "@typescript-eslint/no-unused-vars": [
3821
- warnOnFixButErrorOnLint_default,
3816
+ "error",
3822
3817
  {
3823
3818
  argsIgnorePattern: "^_",
3824
3819
  varsIgnorePattern: "^_",
@@ -3827,15 +3822,15 @@ var typeScriptBase = [
3827
3822
  ],
3828
3823
  // Disable regular no-unused-vars rule since that will flag interface declarations. Only use the TypeScript specific rule for this.
3829
3824
  "no-unused-vars": "off",
3830
- "func-style": [warnOnFixButErrorOnLint_default, "declaration", { allowArrowFunctions: false }],
3831
- "prefer-arrow-callback": [warnOnFixButErrorOnLint_default, { allowNamedFunctions: false }],
3832
- "arrow-body-style": [warnOnFixButErrorOnLint_default, "always"],
3833
- "no-param-reassign": warnOnFixButErrorOnLint_default,
3834
- "no-useless-rename": warnOnFixButErrorOnLint_default,
3835
- "sort-vars": warnOnFixButErrorOnLint_default,
3836
- "no-cond-assign": warnOnFixButErrorOnLint_default,
3837
- "no-undef": warnOnFixButErrorOnLint_default,
3838
- "@typescript-eslint/consistent-type-imports": warnOnFixButErrorOnLint_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",
3839
3834
  "prettier/prettier": ["warn", prettierRules_default]
3840
3835
  }
3841
3836
  }
@@ -3870,7 +3865,7 @@ var typeScriptReactBase = [
3870
3865
  "react-refresh/only-export-components": "off",
3871
3866
  "react-hooks/exhaustive-deps": "off",
3872
3867
  "no-restricted-imports": [
3873
- warnOnFixButErrorOnLint_default,
3868
+ "error",
3874
3869
  {
3875
3870
  paths: [
3876
3871
  {
@@ -4057,6 +4052,11 @@ var rules_default = {
4057
4052
  };
4058
4053
 
4059
4054
  // src/index.ts
4055
+ if (process.env.ESLINT_MODE) {
4056
+ console.warn(
4057
+ "ESLINT_MODE is now deprecated. Please use eslint --fix --suppress-all when running the fixer instead."
4058
+ );
4059
+ }
4060
4060
  var plugin = {
4061
4061
  meta: {
4062
4062
  name,
@@ -4082,6 +4082,5 @@ plugin.configs = {
4082
4082
  var index_default = plugin;
4083
4083
  // Annotate the CommonJS export names for ESM import in node:
4084
4084
  0 && (module.exports = {
4085
- prettierRules,
4086
- warnOnFixButErrorOnLint
4085
+ prettierRules
4087
4086
  });
package/dist/index.d.cts CHANGED
@@ -2,12 +2,10 @@ import { Linter } from 'eslint';
2
2
  import { Config } from 'prettier';
3
3
 
4
4
  var name = "@alextheman/eslint-plugin";
5
- var version = "1.7.0";
5
+ var version = "1.8.1";
6
6
 
7
7
  declare const prettierRules: Config;
8
8
 
9
- declare const warnOnFixButErrorOnLint: string;
10
-
11
9
  interface AlexPlugin {
12
10
  meta: {
13
11
  name: typeof name;
@@ -26,4 +24,4 @@ interface AlexPlugin {
26
24
 
27
25
  declare const plugin: AlexPlugin;
28
26
 
29
- export { type AlexPlugin, plugin as default, prettierRules, warnOnFixButErrorOnLint };
27
+ export { type AlexPlugin, plugin as default, prettierRules };
package/dist/index.d.ts CHANGED
@@ -2,12 +2,10 @@ import { Linter } from 'eslint';
2
2
  import { Config } from 'prettier';
3
3
 
4
4
  var name = "@alextheman/eslint-plugin";
5
- var version = "1.7.0";
5
+ var version = "1.8.1";
6
6
 
7
7
  declare const prettierRules: Config;
8
8
 
9
- declare const warnOnFixButErrorOnLint: string;
10
-
11
9
  interface AlexPlugin {
12
10
  meta: {
13
11
  name: typeof name;
@@ -26,4 +24,4 @@ interface AlexPlugin {
26
24
 
27
25
  declare const plugin: AlexPlugin;
28
26
 
29
- export { type AlexPlugin, plugin as default, prettierRules, warnOnFixButErrorOnLint };
27
+ export { type AlexPlugin, plugin as default, prettierRules };
package/dist/index.js CHANGED
@@ -3692,11 +3692,7 @@ var require_globals2 = __commonJS({
3692
3692
 
3693
3693
  // package.json
3694
3694
  var name = "@alextheman/eslint-plugin";
3695
- var version = "1.7.0";
3696
-
3697
- // src/configs/warnOnFixButErrorOnLint.ts
3698
- var warnOnFixButErrorOnLint = process.env.ESLINT_MODE === "fix" ? "warn" : "error";
3699
- var warnOnFixButErrorOnLint_default = warnOnFixButErrorOnLint;
3695
+ var version = "1.8.1";
3700
3696
 
3701
3697
  // src/configs/alexPluginBase.ts
3702
3698
  function createAlexPluginBaseConfig(plugin2) {
@@ -3706,8 +3702,8 @@ function createAlexPluginBaseConfig(plugin2) {
3706
3702
  "@alextheman": plugin2
3707
3703
  },
3708
3704
  rules: {
3709
- "@alextheman/no-namespace-imports": warnOnFixButErrorOnLint_default,
3710
- "@alextheman/no-relative-imports": warnOnFixButErrorOnLint_default
3705
+ "@alextheman/no-namespace-imports": "error",
3706
+ "@alextheman/no-relative-imports": "error"
3711
3707
  }
3712
3708
  }
3713
3709
  ];
@@ -3759,11 +3755,11 @@ var typeScriptBase = [
3759
3755
  perfectionist
3760
3756
  },
3761
3757
  rules: {
3762
- "import/no-unresolved": warnOnFixButErrorOnLint_default,
3763
- eqeqeq: warnOnFixButErrorOnLint_default,
3764
- "no-console": [warnOnFixButErrorOnLint_default, { allow: ["warn", "error"] }],
3758
+ "import/no-unresolved": "error",
3759
+ eqeqeq: "error",
3760
+ "no-console": ["error", { allow: ["warn", "error"] }],
3765
3761
  "no-restricted-imports": [
3766
- warnOnFixButErrorOnLint_default,
3762
+ "error",
3767
3763
  {
3768
3764
  patterns: [
3769
3765
  {
@@ -3774,7 +3770,7 @@ var typeScriptBase = [
3774
3770
  }
3775
3771
  ],
3776
3772
  "perfectionist/sort-imports": [
3777
- warnOnFixButErrorOnLint_default,
3773
+ "error",
3778
3774
  {
3779
3775
  type: "alphabetical",
3780
3776
  order: "asc",
@@ -3788,7 +3784,7 @@ var typeScriptBase = [
3788
3784
  }
3789
3785
  ],
3790
3786
  "perfectionist/sort-exports": [
3791
- warnOnFixButErrorOnLint_default,
3787
+ "error",
3792
3788
  {
3793
3789
  type: "alphabetical",
3794
3790
  order: "asc",
@@ -3803,7 +3799,7 @@ var typeScriptBase = [
3803
3799
  }
3804
3800
  ],
3805
3801
  "@typescript-eslint/no-unused-vars": [
3806
- warnOnFixButErrorOnLint_default,
3802
+ "error",
3807
3803
  {
3808
3804
  argsIgnorePattern: "^_",
3809
3805
  varsIgnorePattern: "^_",
@@ -3812,15 +3808,15 @@ var typeScriptBase = [
3812
3808
  ],
3813
3809
  // Disable regular no-unused-vars rule since that will flag interface declarations. Only use the TypeScript specific rule for this.
3814
3810
  "no-unused-vars": "off",
3815
- "func-style": [warnOnFixButErrorOnLint_default, "declaration", { allowArrowFunctions: false }],
3816
- "prefer-arrow-callback": [warnOnFixButErrorOnLint_default, { allowNamedFunctions: false }],
3817
- "arrow-body-style": [warnOnFixButErrorOnLint_default, "always"],
3818
- "no-param-reassign": warnOnFixButErrorOnLint_default,
3819
- "no-useless-rename": warnOnFixButErrorOnLint_default,
3820
- "sort-vars": warnOnFixButErrorOnLint_default,
3821
- "no-cond-assign": warnOnFixButErrorOnLint_default,
3822
- "no-undef": warnOnFixButErrorOnLint_default,
3823
- "@typescript-eslint/consistent-type-imports": warnOnFixButErrorOnLint_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",
3824
3820
  "prettier/prettier": ["warn", prettierRules_default]
3825
3821
  }
3826
3822
  }
@@ -3855,7 +3851,7 @@ var typeScriptReactBase = [
3855
3851
  "react-refresh/only-export-components": "off",
3856
3852
  "react-hooks/exhaustive-deps": "off",
3857
3853
  "no-restricted-imports": [
3858
- warnOnFixButErrorOnLint_default,
3854
+ "error",
3859
3855
  {
3860
3856
  paths: [
3861
3857
  {
@@ -4042,6 +4038,11 @@ var rules_default = {
4042
4038
  };
4043
4039
 
4044
4040
  // src/index.ts
4041
+ if (process.env.ESLINT_MODE) {
4042
+ console.warn(
4043
+ "ESLINT_MODE is now deprecated. Please use eslint --fix --suppress-all when running the fixer instead."
4044
+ );
4045
+ }
4045
4046
  var plugin = {
4046
4047
  meta: {
4047
4048
  name,
@@ -4067,6 +4068,5 @@ plugin.configs = {
4067
4068
  var index_default = plugin;
4068
4069
  export {
4069
4070
  index_default as default,
4070
- prettierRules_default as prettierRules,
4071
- warnOnFixButErrorOnLint_default as warnOnFixButErrorOnLint
4071
+ prettierRules_default as prettierRules
4072
4072
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alextheman/eslint-plugin",
3
- "version": "1.7.0",
3
+ "version": "1.8.1",
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 --suppress-all \"src/**/*.ts\" \"tests/**/*.ts\" && rm -f eslint-suppressions.json",
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",