@alextheman/eslint-plugin 1.14.1 → 1.15.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
@@ -549,6 +549,9 @@ var require_globals = __commonJS({
549
549
  CSSFontFaceRule: false,
550
550
  CSSFontFeatureValuesRule: false,
551
551
  CSSFontPaletteValuesRule: false,
552
+ CSSFunctionDeclarations: false,
553
+ CSSFunctionDescriptors: false,
554
+ CSSFunctionRule: false,
552
555
  CSSGroupingRule: false,
553
556
  CSSImageValue: false,
554
557
  CSSImportRule: false,
@@ -1285,6 +1288,11 @@ var require_globals = __commonJS({
1285
1288
  SnapEvent: false,
1286
1289
  SourceBuffer: false,
1287
1290
  SourceBufferList: false,
1291
+ SpeechGrammar: false,
1292
+ SpeechGrammarList: false,
1293
+ SpeechRecognition: false,
1294
+ SpeechRecognitionErrorEvent: false,
1295
+ SpeechRecognitionEvent: false,
1288
1296
  speechSynthesis: false,
1289
1297
  SpeechSynthesis: false,
1290
1298
  SpeechSynthesisErrorEvent: false,
@@ -3707,7 +3715,7 @@ module.exports = __toCommonJS(index_exports);
3707
3715
 
3708
3716
  // package.json
3709
3717
  var name = "@alextheman/eslint-plugin";
3710
- var version = "1.14.1";
3718
+ var version = "1.15.0";
3711
3719
 
3712
3720
  // src/configs/alexPluginBase.ts
3713
3721
  function createAlexPluginBaseConfig(plugin) {
@@ -3734,16 +3742,14 @@ function createAlexPluginBaseConfig(plugin) {
3734
3742
  }
3735
3743
  var alexPluginBase_default = createAlexPluginBaseConfig;
3736
3744
 
3737
- // src/configs/typeScriptBase.ts
3745
+ // src/configs/javaScriptBase.ts
3738
3746
  var import_js = __toESM(require_src(), 1);
3739
- var import_parser = __toESM(require("@typescript-eslint/parser"), 1);
3740
3747
  var import_eslint_config_prettier = __toESM(require("eslint-config-prettier"), 1);
3741
3748
  var import_eslint_plugin_import = __toESM(require("eslint-plugin-import"), 1);
3742
3749
  var import_eslint_plugin_package_json = __toESM(require("eslint-plugin-package-json"), 1);
3743
3750
  var import_eslint_plugin_perfectionist = __toESM(require("eslint-plugin-perfectionist"), 1);
3744
3751
  var import_eslint_plugin_prettier = __toESM(require("eslint-plugin-prettier"), 1);
3745
3752
  var import_globals = __toESM(require_globals2(), 1);
3746
- var import_typescript_eslint = __toESM(require("typescript-eslint"), 1);
3747
3753
 
3748
3754
  // src/configs/prettierRules.ts
3749
3755
  var prettierRules = {
@@ -3751,52 +3757,24 @@ var prettierRules = {
3751
3757
  };
3752
3758
  var prettierRules_default = prettierRules;
3753
3759
 
3754
- // src/configs/typeScriptBase.ts
3755
- var typeScriptBase = [
3756
- ...import_typescript_eslint.default.configs.recommended,
3760
+ // src/configs/javaScriptBase.ts
3761
+ var javaScriptBase = [
3757
3762
  import_js.default.configs.recommended,
3758
3763
  import_eslint_config_prettier.default,
3759
3764
  import_eslint_plugin_package_json.default.configs.recommended,
3760
3765
  {
3761
- files: ["**/*.ts", "**/*.tsx"],
3766
+ files: ["**/*.js", "**/*.jsx", "**/*.ts", "**/*.tsx", "!package.json"],
3762
3767
  ignores: ["dist"],
3763
3768
  languageOptions: {
3764
- globals: __spreadValues(__spreadValues({}, import_globals.default.node), import_globals.default.browser),
3765
- parser: import_parser.default,
3766
- parserOptions: {
3767
- ecmaVersion: "latest",
3768
- projectService: true,
3769
- sourceType: "module",
3770
- tsconfigRootDir: process.cwd()
3771
- }
3769
+ globals: __spreadValues(__spreadValues({}, import_globals.default.node), import_globals.default.browser)
3772
3770
  },
3773
- name: "@alextheman/eslint-config-typescript-base",
3771
+ name: "@alextheman/eslint-config-javascript-base",
3774
3772
  plugins: {
3775
3773
  import: import_eslint_plugin_import.default,
3776
3774
  perfectionist: import_eslint_plugin_perfectionist.default,
3777
3775
  prettier: import_eslint_plugin_prettier.default
3778
3776
  },
3779
3777
  rules: {
3780
- "@typescript-eslint/array-type": ["error", { default: "array" }],
3781
- "@typescript-eslint/consistent-type-assertions": ["error", { assertionStyle: "as" }],
3782
- "@typescript-eslint/consistent-type-definitions": "error",
3783
- "@typescript-eslint/consistent-type-exports": "error",
3784
- "@typescript-eslint/consistent-type-imports": "error",
3785
- "@typescript-eslint/dot-notation": "error",
3786
- "@typescript-eslint/explicit-member-accessibility": "error",
3787
- "@typescript-eslint/method-signature-style": ["error", "property"],
3788
- "@typescript-eslint/no-deprecated": "error",
3789
- // Explicit any can be helpful sometimes, so it's not worth erroring on every single one.
3790
- "@typescript-eslint/no-explicit-any": "off",
3791
- "@typescript-eslint/no-redeclare": ["error", { ignoreDeclarationMerge: true }],
3792
- "@typescript-eslint/no-unused-vars": [
3793
- "error",
3794
- {
3795
- argsIgnorePattern: "^_",
3796
- caughtErrorsIgnorePattern: "^_",
3797
- varsIgnorePattern: "^_"
3798
- }
3799
- ],
3800
3778
  "arrow-body-style": ["error", "always"],
3801
3779
  curly: ["error", "all"],
3802
3780
  eqeqeq: "error",
@@ -3810,8 +3788,6 @@ var typeScriptBase = [
3810
3788
  "no-lonely-if": "error",
3811
3789
  "no-new-wrappers": "error",
3812
3790
  "no-param-reassign": "error",
3813
- // Disable regular no-redeclare in favour of TypeScript-specific version since that will flag type redeclarations when we do const MyType = {}; export type MyType = ...
3814
- "no-redeclare": "off",
3815
3791
  "no-restricted-imports": [
3816
3792
  "error",
3817
3793
  {
@@ -3824,8 +3800,14 @@ var typeScriptBase = [
3824
3800
  }
3825
3801
  ],
3826
3802
  "no-undef": "error",
3827
- // Disable regular no-unused-vars rule since that will flag interface declarations. Only use the TypeScript specific rule for this.
3828
- "no-unused-vars": "off",
3803
+ "no-unused-vars": [
3804
+ "error",
3805
+ {
3806
+ argsIgnorePattern: "^_",
3807
+ caughtErrorsIgnorePattern: "^_",
3808
+ varsIgnorePattern: "^_"
3809
+ }
3810
+ ],
3829
3811
  "no-useless-rename": "error",
3830
3812
  "no-useless-return": "error",
3831
3813
  "operator-assignment": ["error", "always"],
@@ -3867,13 +3849,12 @@ var typeScriptBase = [
3867
3849
  },
3868
3850
  settings: {
3869
3851
  "import/resolver": {
3870
- node: true,
3871
- typescript: true
3852
+ node: true
3872
3853
  }
3873
3854
  }
3874
3855
  },
3875
3856
  {
3876
- files: ["**/*.test.ts"],
3857
+ files: ["**/*.test.{js,ts}"],
3877
3858
  rules: {
3878
3859
  "no-restricted-globals": [
3879
3860
  "error",
@@ -3904,21 +3885,20 @@ var typeScriptBase = [
3904
3885
  }
3905
3886
  }
3906
3887
  ];
3907
- var typeScriptBase_default = typeScriptBase;
3888
+ var javaScriptBase_default = javaScriptBase;
3908
3889
 
3909
- // src/configs/alexTypeScriptBase.ts
3910
- function createAlexTypeScriptBaseConfig(plugin) {
3911
- return [...alexPluginBase_default(plugin), ...typeScriptBase_default];
3890
+ // src/configs/alexJavaScriptBase.ts
3891
+ function createAlexJavaScriptBaseConfig(plugin) {
3892
+ return [...alexPluginBase_default(plugin), ...javaScriptBase_default];
3912
3893
  }
3913
- var alexTypeScriptBase_default = createAlexTypeScriptBaseConfig;
3894
+ var alexJavaScriptBase_default = createAlexJavaScriptBaseConfig;
3914
3895
 
3915
- // src/configs/typeScriptReactBase.ts
3896
+ // src/configs/reactBase.ts
3916
3897
  var import_eslint_plugin_react = __toESM(require("eslint-plugin-react"), 1);
3917
3898
  var import_eslint_plugin_react_hooks = __toESM(require("eslint-plugin-react-hooks"), 1);
3918
3899
  var import_eslint_plugin_react_refresh = __toESM(require("eslint-plugin-react-refresh"), 1);
3919
3900
  var import_globals2 = __toESM(require_globals2(), 1);
3920
- var typeScriptReactBase = [
3921
- ...typeScriptBase_default,
3901
+ var reactBase = [
3922
3902
  {
3923
3903
  languageOptions: {
3924
3904
  ecmaVersion: 2020,
@@ -3947,14 +3927,119 @@ var typeScriptReactBase = [
3947
3927
  })
3948
3928
  }
3949
3929
  ];
3950
- var typeScriptReactBase_default = typeScriptReactBase;
3930
+ var reactBase_default = reactBase;
3931
+
3932
+ // src/configs/alexReactBase.ts
3933
+ function createAlexReactBaseConfig(plugin) {
3934
+ return [...alexPluginBase_default(plugin), ...reactBase_default];
3935
+ }
3936
+ var alexReactBase_default = createAlexReactBaseConfig;
3937
+
3938
+ // src/configs/typeScriptBase.ts
3939
+ var import_parser = __toESM(require("@typescript-eslint/parser"), 1);
3940
+ var import_typescript_eslint = __toESM(require("typescript-eslint"), 1);
3941
+ var typeScriptBase = [
3942
+ ...import_typescript_eslint.default.configs.recommended,
3943
+ ...javaScriptBase_default,
3944
+ {
3945
+ files: ["**/*.ts", "**/*.tsx"],
3946
+ languageOptions: {
3947
+ parser: import_parser.default,
3948
+ parserOptions: {
3949
+ ecmaVersion: "latest",
3950
+ projectService: true,
3951
+ sourceType: "module",
3952
+ tsconfigRootDir: process.cwd()
3953
+ }
3954
+ },
3955
+ name: "@alextheman/eslint-config-typescript-base",
3956
+ rules: {
3957
+ "@typescript-eslint/array-type": ["error", { default: "array" }],
3958
+ "@typescript-eslint/consistent-type-assertions": ["error", { assertionStyle: "as" }],
3959
+ "@typescript-eslint/consistent-type-definitions": "error",
3960
+ "@typescript-eslint/consistent-type-exports": "error",
3961
+ "@typescript-eslint/consistent-type-imports": "error",
3962
+ "@typescript-eslint/dot-notation": "error",
3963
+ "@typescript-eslint/explicit-member-accessibility": "error",
3964
+ "@typescript-eslint/method-signature-style": ["error", "property"],
3965
+ "@typescript-eslint/no-deprecated": "warn",
3966
+ // Explicit any can be helpful sometimes, so it's not worth erroring on every single one.
3967
+ "@typescript-eslint/no-explicit-any": "off",
3968
+ "@typescript-eslint/no-redeclare": ["error", { ignoreDeclarationMerge: true }],
3969
+ "@typescript-eslint/no-unused-vars": [
3970
+ "error",
3971
+ {
3972
+ argsIgnorePattern: "^_",
3973
+ caughtErrorsIgnorePattern: "^_",
3974
+ varsIgnorePattern: "^_"
3975
+ }
3976
+ ],
3977
+ // Disable regular no-redeclare in favour of TypeScript-specific version since that will flag type redeclarations when we do const MyType = {}; export type MyType = ...
3978
+ "no-redeclare": "off",
3979
+ // Disable no-undef because undefined variables tend to be better caught by the TypeScript compiler.
3980
+ "no-undef": "off",
3981
+ // Disable regular no-unused-vars rule since that will flag interface declarations. Only use the TypeScript specific rule for this.
3982
+ "no-unused-vars": "off"
3983
+ },
3984
+ settings: {
3985
+ "import/resolver": {
3986
+ node: true,
3987
+ typescript: true
3988
+ }
3989
+ }
3990
+ }
3991
+ ];
3992
+ var typeScriptBase_default = typeScriptBase;
3993
+
3994
+ // src/configs/alexTypeScriptBase.ts
3995
+ function createAlexTypeScriptBaseConfig(plugin) {
3996
+ return [...alexPluginBase_default(plugin), ...typeScriptBase_default];
3997
+ }
3998
+ var alexTypeScriptBase_default = createAlexTypeScriptBaseConfig;
3951
3999
 
3952
4000
  // src/configs/alexTypeScriptReactBase.ts
3953
4001
  function createAlexTypeScriptReactBaseConfig(plugin) {
3954
- return [...alexTypeScriptBase_default(plugin), ...typeScriptReactBase_default];
4002
+ return [...alexTypeScriptBase_default(plugin), ...reactBase_default];
3955
4003
  }
3956
4004
  var alexTypeScriptReactBase_default = createAlexTypeScriptReactBaseConfig;
3957
4005
 
4006
+ // src/configs/typeScriptReactBase.ts
4007
+ var import_eslint_plugin_react2 = __toESM(require("eslint-plugin-react"), 1);
4008
+ var import_eslint_plugin_react_hooks2 = __toESM(require("eslint-plugin-react-hooks"), 1);
4009
+ var import_eslint_plugin_react_refresh2 = __toESM(require("eslint-plugin-react-refresh"), 1);
4010
+ var import_globals3 = __toESM(require_globals2(), 1);
4011
+ var typeScriptReactBase = [
4012
+ ...typeScriptBase_default,
4013
+ {
4014
+ languageOptions: {
4015
+ ecmaVersion: 2020,
4016
+ globals: import_globals3.default.browser
4017
+ },
4018
+ name: "@alextheman/eslint-config-typescript-react-base",
4019
+ plugins: {
4020
+ react: import_eslint_plugin_react2.default,
4021
+ "react-hooks": import_eslint_plugin_react_hooks2.default,
4022
+ "react-refresh": import_eslint_plugin_react_refresh2.default
4023
+ },
4024
+ rules: __spreadProps(__spreadValues({}, import_eslint_plugin_react_hooks2.default.configs.recommended.rules), {
4025
+ "no-restricted-imports": [
4026
+ "error",
4027
+ {
4028
+ patterns: [
4029
+ {
4030
+ message: 'Please use `import Component from "@mui/[package]/Component"` instead. See https://mui.com/material-ui/guides/minimizing-bundle-size/ for more information.',
4031
+ regex: "^@mui/[^/]+$"
4032
+ }
4033
+ ]
4034
+ }
4035
+ ],
4036
+ "react-hooks/exhaustive-deps": "off",
4037
+ "react-refresh/only-export-components": "off"
4038
+ })
4039
+ }
4040
+ ];
4041
+ var typeScriptReactBase_default = typeScriptReactBase;
4042
+
3958
4043
  // src/rules/consistent-test-function.ts
3959
4044
  var import_utils2 = require("@typescript-eslint/utils");
3960
4045
  var import_zod = __toESM(require("zod"), 1);
@@ -4433,19 +4518,28 @@ var alexPlugin = {
4433
4518
  },
4434
4519
  configs: {
4435
4520
  alexPluginBase: [],
4521
+ alexJavaScriptBase: [],
4436
4522
  alexTypeScriptBase: [],
4437
4523
  alexTypeScriptReactBase: [],
4524
+ alexReactBase: [],
4525
+ javaScriptBase: [],
4438
4526
  typeScriptBase: [],
4439
- typeScriptReactBase: []
4527
+ typeScriptReactBase: [],
4528
+ reactBase: []
4440
4529
  },
4441
4530
  rules: rules_default
4442
4531
  };
4443
4532
  alexPlugin.configs = {
4444
4533
  alexPluginBase: alexPluginBase_default(alexPlugin),
4534
+ alexJavaScriptBase: alexJavaScriptBase_default(alexPlugin),
4445
4535
  alexTypeScriptBase: alexTypeScriptBase_default(alexPlugin),
4536
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
4446
4537
  alexTypeScriptReactBase: alexTypeScriptReactBase_default(alexPlugin),
4538
+ alexReactBase: alexReactBase_default(alexPlugin),
4539
+ javaScriptBase: javaScriptBase_default,
4447
4540
  typeScriptBase: typeScriptBase_default,
4448
- typeScriptReactBase: typeScriptReactBase_default
4541
+ typeScriptReactBase: typeScriptReactBase_default,
4542
+ reactBase: reactBase_default
4449
4543
  };
4450
4544
  var alexPlugin_default = alexPlugin;
4451
4545
 
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.14.1";
6
+ var version = "1.15.0";
7
7
 
8
8
  interface AlexPlugin {
9
9
  meta: {
@@ -13,10 +13,14 @@ interface AlexPlugin {
13
13
  };
14
14
  configs: {
15
15
  alexPluginBase: Linter.Config[];
16
+ alexJavaScriptBase: Linter.Config[];
16
17
  alexTypeScriptBase: Linter.Config[];
17
18
  alexTypeScriptReactBase: Linter.Config[];
19
+ alexReactBase: Linter.Config[];
20
+ javaScriptBase: Linter.Config[];
18
21
  typeScriptBase: Linter.Config[];
19
22
  typeScriptReactBase: Linter.Config[];
23
+ reactBase: Linter.Config[];
20
24
  };
21
25
  rules: Record<string, any>;
22
26
  }
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.14.1";
6
+ var version = "1.15.0";
7
7
 
8
8
  interface AlexPlugin {
9
9
  meta: {
@@ -13,10 +13,14 @@ interface AlexPlugin {
13
13
  };
14
14
  configs: {
15
15
  alexPluginBase: Linter.Config[];
16
+ alexJavaScriptBase: Linter.Config[];
16
17
  alexTypeScriptBase: Linter.Config[];
17
18
  alexTypeScriptReactBase: Linter.Config[];
19
+ alexReactBase: Linter.Config[];
20
+ javaScriptBase: Linter.Config[];
18
21
  typeScriptBase: Linter.Config[];
19
22
  typeScriptReactBase: Linter.Config[];
23
+ reactBase: Linter.Config[];
20
24
  };
21
25
  rules: Record<string, any>;
22
26
  }
package/dist/index.js CHANGED
@@ -543,6 +543,9 @@ var require_globals = __commonJS({
543
543
  CSSFontFaceRule: false,
544
544
  CSSFontFeatureValuesRule: false,
545
545
  CSSFontPaletteValuesRule: false,
546
+ CSSFunctionDeclarations: false,
547
+ CSSFunctionDescriptors: false,
548
+ CSSFunctionRule: false,
546
549
  CSSGroupingRule: false,
547
550
  CSSImageValue: false,
548
551
  CSSImportRule: false,
@@ -1279,6 +1282,11 @@ var require_globals = __commonJS({
1279
1282
  SnapEvent: false,
1280
1283
  SourceBuffer: false,
1281
1284
  SourceBufferList: false,
1285
+ SpeechGrammar: false,
1286
+ SpeechGrammarList: false,
1287
+ SpeechRecognition: false,
1288
+ SpeechRecognitionErrorEvent: false,
1289
+ SpeechRecognitionEvent: false,
1282
1290
  speechSynthesis: false,
1283
1291
  SpeechSynthesis: false,
1284
1292
  SpeechSynthesisErrorEvent: false,
@@ -3692,7 +3700,7 @@ var require_globals2 = __commonJS({
3692
3700
 
3693
3701
  // package.json
3694
3702
  var name = "@alextheman/eslint-plugin";
3695
- var version = "1.14.1";
3703
+ var version = "1.15.0";
3696
3704
 
3697
3705
  // src/configs/alexPluginBase.ts
3698
3706
  function createAlexPluginBaseConfig(plugin) {
@@ -3719,16 +3727,14 @@ function createAlexPluginBaseConfig(plugin) {
3719
3727
  }
3720
3728
  var alexPluginBase_default = createAlexPluginBaseConfig;
3721
3729
 
3722
- // src/configs/typeScriptBase.ts
3730
+ // src/configs/javaScriptBase.ts
3723
3731
  var import_js = __toESM(require_src(), 1);
3724
3732
  var import_globals = __toESM(require_globals2(), 1);
3725
- import tsparser from "@typescript-eslint/parser";
3726
3733
  import prettierConfig from "eslint-config-prettier";
3727
3734
  import importPlugin from "eslint-plugin-import";
3728
3735
  import packageJson from "eslint-plugin-package-json";
3729
3736
  import perfectionist from "eslint-plugin-perfectionist";
3730
3737
  import prettierPlugin from "eslint-plugin-prettier";
3731
- import tseslint from "typescript-eslint";
3732
3738
 
3733
3739
  // src/configs/prettierRules.ts
3734
3740
  var prettierRules = {
@@ -3736,52 +3742,24 @@ var prettierRules = {
3736
3742
  };
3737
3743
  var prettierRules_default = prettierRules;
3738
3744
 
3739
- // src/configs/typeScriptBase.ts
3740
- var typeScriptBase = [
3741
- ...tseslint.configs.recommended,
3745
+ // src/configs/javaScriptBase.ts
3746
+ var javaScriptBase = [
3742
3747
  import_js.default.configs.recommended,
3743
3748
  prettierConfig,
3744
3749
  packageJson.configs.recommended,
3745
3750
  {
3746
- files: ["**/*.ts", "**/*.tsx"],
3751
+ files: ["**/*.js", "**/*.jsx", "**/*.ts", "**/*.tsx", "!package.json"],
3747
3752
  ignores: ["dist"],
3748
3753
  languageOptions: {
3749
- globals: __spreadValues(__spreadValues({}, import_globals.default.node), import_globals.default.browser),
3750
- parser: tsparser,
3751
- parserOptions: {
3752
- ecmaVersion: "latest",
3753
- projectService: true,
3754
- sourceType: "module",
3755
- tsconfigRootDir: process.cwd()
3756
- }
3754
+ globals: __spreadValues(__spreadValues({}, import_globals.default.node), import_globals.default.browser)
3757
3755
  },
3758
- name: "@alextheman/eslint-config-typescript-base",
3756
+ name: "@alextheman/eslint-config-javascript-base",
3759
3757
  plugins: {
3760
3758
  import: importPlugin,
3761
3759
  perfectionist,
3762
3760
  prettier: prettierPlugin
3763
3761
  },
3764
3762
  rules: {
3765
- "@typescript-eslint/array-type": ["error", { default: "array" }],
3766
- "@typescript-eslint/consistent-type-assertions": ["error", { assertionStyle: "as" }],
3767
- "@typescript-eslint/consistent-type-definitions": "error",
3768
- "@typescript-eslint/consistent-type-exports": "error",
3769
- "@typescript-eslint/consistent-type-imports": "error",
3770
- "@typescript-eslint/dot-notation": "error",
3771
- "@typescript-eslint/explicit-member-accessibility": "error",
3772
- "@typescript-eslint/method-signature-style": ["error", "property"],
3773
- "@typescript-eslint/no-deprecated": "error",
3774
- // Explicit any can be helpful sometimes, so it's not worth erroring on every single one.
3775
- "@typescript-eslint/no-explicit-any": "off",
3776
- "@typescript-eslint/no-redeclare": ["error", { ignoreDeclarationMerge: true }],
3777
- "@typescript-eslint/no-unused-vars": [
3778
- "error",
3779
- {
3780
- argsIgnorePattern: "^_",
3781
- caughtErrorsIgnorePattern: "^_",
3782
- varsIgnorePattern: "^_"
3783
- }
3784
- ],
3785
3763
  "arrow-body-style": ["error", "always"],
3786
3764
  curly: ["error", "all"],
3787
3765
  eqeqeq: "error",
@@ -3795,8 +3773,6 @@ var typeScriptBase = [
3795
3773
  "no-lonely-if": "error",
3796
3774
  "no-new-wrappers": "error",
3797
3775
  "no-param-reassign": "error",
3798
- // Disable regular no-redeclare in favour of TypeScript-specific version since that will flag type redeclarations when we do const MyType = {}; export type MyType = ...
3799
- "no-redeclare": "off",
3800
3776
  "no-restricted-imports": [
3801
3777
  "error",
3802
3778
  {
@@ -3809,8 +3785,14 @@ var typeScriptBase = [
3809
3785
  }
3810
3786
  ],
3811
3787
  "no-undef": "error",
3812
- // Disable regular no-unused-vars rule since that will flag interface declarations. Only use the TypeScript specific rule for this.
3813
- "no-unused-vars": "off",
3788
+ "no-unused-vars": [
3789
+ "error",
3790
+ {
3791
+ argsIgnorePattern: "^_",
3792
+ caughtErrorsIgnorePattern: "^_",
3793
+ varsIgnorePattern: "^_"
3794
+ }
3795
+ ],
3814
3796
  "no-useless-rename": "error",
3815
3797
  "no-useless-return": "error",
3816
3798
  "operator-assignment": ["error", "always"],
@@ -3852,13 +3834,12 @@ var typeScriptBase = [
3852
3834
  },
3853
3835
  settings: {
3854
3836
  "import/resolver": {
3855
- node: true,
3856
- typescript: true
3837
+ node: true
3857
3838
  }
3858
3839
  }
3859
3840
  },
3860
3841
  {
3861
- files: ["**/*.test.ts"],
3842
+ files: ["**/*.test.{js,ts}"],
3862
3843
  rules: {
3863
3844
  "no-restricted-globals": [
3864
3845
  "error",
@@ -3889,21 +3870,20 @@ var typeScriptBase = [
3889
3870
  }
3890
3871
  }
3891
3872
  ];
3892
- var typeScriptBase_default = typeScriptBase;
3873
+ var javaScriptBase_default = javaScriptBase;
3893
3874
 
3894
- // src/configs/alexTypeScriptBase.ts
3895
- function createAlexTypeScriptBaseConfig(plugin) {
3896
- return [...alexPluginBase_default(plugin), ...typeScriptBase_default];
3875
+ // src/configs/alexJavaScriptBase.ts
3876
+ function createAlexJavaScriptBaseConfig(plugin) {
3877
+ return [...alexPluginBase_default(plugin), ...javaScriptBase_default];
3897
3878
  }
3898
- var alexTypeScriptBase_default = createAlexTypeScriptBaseConfig;
3879
+ var alexJavaScriptBase_default = createAlexJavaScriptBaseConfig;
3899
3880
 
3900
- // src/configs/typeScriptReactBase.ts
3881
+ // src/configs/reactBase.ts
3901
3882
  var import_globals2 = __toESM(require_globals2(), 1);
3902
3883
  import reactPlugin from "eslint-plugin-react";
3903
3884
  import reactHooks from "eslint-plugin-react-hooks";
3904
3885
  import reactRefresh from "eslint-plugin-react-refresh";
3905
- var typeScriptReactBase = [
3906
- ...typeScriptBase_default,
3886
+ var reactBase = [
3907
3887
  {
3908
3888
  languageOptions: {
3909
3889
  ecmaVersion: 2020,
@@ -3932,14 +3912,119 @@ var typeScriptReactBase = [
3932
3912
  })
3933
3913
  }
3934
3914
  ];
3935
- var typeScriptReactBase_default = typeScriptReactBase;
3915
+ var reactBase_default = reactBase;
3916
+
3917
+ // src/configs/alexReactBase.ts
3918
+ function createAlexReactBaseConfig(plugin) {
3919
+ return [...alexPluginBase_default(plugin), ...reactBase_default];
3920
+ }
3921
+ var alexReactBase_default = createAlexReactBaseConfig;
3922
+
3923
+ // src/configs/typeScriptBase.ts
3924
+ import tsparser from "@typescript-eslint/parser";
3925
+ import tseslint from "typescript-eslint";
3926
+ var typeScriptBase = [
3927
+ ...tseslint.configs.recommended,
3928
+ ...javaScriptBase_default,
3929
+ {
3930
+ files: ["**/*.ts", "**/*.tsx"],
3931
+ languageOptions: {
3932
+ parser: tsparser,
3933
+ parserOptions: {
3934
+ ecmaVersion: "latest",
3935
+ projectService: true,
3936
+ sourceType: "module",
3937
+ tsconfigRootDir: process.cwd()
3938
+ }
3939
+ },
3940
+ name: "@alextheman/eslint-config-typescript-base",
3941
+ rules: {
3942
+ "@typescript-eslint/array-type": ["error", { default: "array" }],
3943
+ "@typescript-eslint/consistent-type-assertions": ["error", { assertionStyle: "as" }],
3944
+ "@typescript-eslint/consistent-type-definitions": "error",
3945
+ "@typescript-eslint/consistent-type-exports": "error",
3946
+ "@typescript-eslint/consistent-type-imports": "error",
3947
+ "@typescript-eslint/dot-notation": "error",
3948
+ "@typescript-eslint/explicit-member-accessibility": "error",
3949
+ "@typescript-eslint/method-signature-style": ["error", "property"],
3950
+ "@typescript-eslint/no-deprecated": "warn",
3951
+ // Explicit any can be helpful sometimes, so it's not worth erroring on every single one.
3952
+ "@typescript-eslint/no-explicit-any": "off",
3953
+ "@typescript-eslint/no-redeclare": ["error", { ignoreDeclarationMerge: true }],
3954
+ "@typescript-eslint/no-unused-vars": [
3955
+ "error",
3956
+ {
3957
+ argsIgnorePattern: "^_",
3958
+ caughtErrorsIgnorePattern: "^_",
3959
+ varsIgnorePattern: "^_"
3960
+ }
3961
+ ],
3962
+ // Disable regular no-redeclare in favour of TypeScript-specific version since that will flag type redeclarations when we do const MyType = {}; export type MyType = ...
3963
+ "no-redeclare": "off",
3964
+ // Disable no-undef because undefined variables tend to be better caught by the TypeScript compiler.
3965
+ "no-undef": "off",
3966
+ // Disable regular no-unused-vars rule since that will flag interface declarations. Only use the TypeScript specific rule for this.
3967
+ "no-unused-vars": "off"
3968
+ },
3969
+ settings: {
3970
+ "import/resolver": {
3971
+ node: true,
3972
+ typescript: true
3973
+ }
3974
+ }
3975
+ }
3976
+ ];
3977
+ var typeScriptBase_default = typeScriptBase;
3978
+
3979
+ // src/configs/alexTypeScriptBase.ts
3980
+ function createAlexTypeScriptBaseConfig(plugin) {
3981
+ return [...alexPluginBase_default(plugin), ...typeScriptBase_default];
3982
+ }
3983
+ var alexTypeScriptBase_default = createAlexTypeScriptBaseConfig;
3936
3984
 
3937
3985
  // src/configs/alexTypeScriptReactBase.ts
3938
3986
  function createAlexTypeScriptReactBaseConfig(plugin) {
3939
- return [...alexTypeScriptBase_default(plugin), ...typeScriptReactBase_default];
3987
+ return [...alexTypeScriptBase_default(plugin), ...reactBase_default];
3940
3988
  }
3941
3989
  var alexTypeScriptReactBase_default = createAlexTypeScriptReactBaseConfig;
3942
3990
 
3991
+ // src/configs/typeScriptReactBase.ts
3992
+ var import_globals3 = __toESM(require_globals2(), 1);
3993
+ import reactPlugin2 from "eslint-plugin-react";
3994
+ import reactHooks2 from "eslint-plugin-react-hooks";
3995
+ import reactRefresh2 from "eslint-plugin-react-refresh";
3996
+ var typeScriptReactBase = [
3997
+ ...typeScriptBase_default,
3998
+ {
3999
+ languageOptions: {
4000
+ ecmaVersion: 2020,
4001
+ globals: import_globals3.default.browser
4002
+ },
4003
+ name: "@alextheman/eslint-config-typescript-react-base",
4004
+ plugins: {
4005
+ react: reactPlugin2,
4006
+ "react-hooks": reactHooks2,
4007
+ "react-refresh": reactRefresh2
4008
+ },
4009
+ rules: __spreadProps(__spreadValues({}, reactHooks2.configs.recommended.rules), {
4010
+ "no-restricted-imports": [
4011
+ "error",
4012
+ {
4013
+ patterns: [
4014
+ {
4015
+ message: 'Please use `import Component from "@mui/[package]/Component"` instead. See https://mui.com/material-ui/guides/minimizing-bundle-size/ for more information.',
4016
+ regex: "^@mui/[^/]+$"
4017
+ }
4018
+ ]
4019
+ }
4020
+ ],
4021
+ "react-hooks/exhaustive-deps": "off",
4022
+ "react-refresh/only-export-components": "off"
4023
+ })
4024
+ }
4025
+ ];
4026
+ var typeScriptReactBase_default = typeScriptReactBase;
4027
+
3943
4028
  // src/rules/consistent-test-function.ts
3944
4029
  import { AST_NODE_TYPES } from "@typescript-eslint/utils";
3945
4030
  import z from "zod";
@@ -4418,19 +4503,28 @@ var alexPlugin = {
4418
4503
  },
4419
4504
  configs: {
4420
4505
  alexPluginBase: [],
4506
+ alexJavaScriptBase: [],
4421
4507
  alexTypeScriptBase: [],
4422
4508
  alexTypeScriptReactBase: [],
4509
+ alexReactBase: [],
4510
+ javaScriptBase: [],
4423
4511
  typeScriptBase: [],
4424
- typeScriptReactBase: []
4512
+ typeScriptReactBase: [],
4513
+ reactBase: []
4425
4514
  },
4426
4515
  rules: rules_default
4427
4516
  };
4428
4517
  alexPlugin.configs = {
4429
4518
  alexPluginBase: alexPluginBase_default(alexPlugin),
4519
+ alexJavaScriptBase: alexJavaScriptBase_default(alexPlugin),
4430
4520
  alexTypeScriptBase: alexTypeScriptBase_default(alexPlugin),
4521
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
4431
4522
  alexTypeScriptReactBase: alexTypeScriptReactBase_default(alexPlugin),
4523
+ alexReactBase: alexReactBase_default(alexPlugin),
4524
+ javaScriptBase: javaScriptBase_default,
4432
4525
  typeScriptBase: typeScriptBase_default,
4433
- typeScriptReactBase: typeScriptReactBase_default
4526
+ typeScriptReactBase: typeScriptReactBase_default,
4527
+ reactBase: reactBase_default
4434
4528
  };
4435
4529
  var alexPlugin_default = alexPlugin;
4436
4530
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alextheman/eslint-plugin",
3
- "version": "1.14.1",
3
+ "version": "1.15.0",
4
4
  "description": "A package to provide custom ESLint rules and configs",
5
5
  "license": "ISC",
6
6
  "author": "alextheman",
@@ -16,8 +16,17 @@
16
16
  "change-minor": "npm version minor -m \"Change version number to v%s\"",
17
17
  "change-patch": "npm version patch -m \"Change version number to v%s\"",
18
18
  "create-local-package": "npm run build && rm -f alextheman-eslint-plugin-*.tgz && npm pack",
19
- "format": "npm run build && prettier --write --parser typescript \"src/**/*.ts\" \"tests/**/*.ts\" && eslint --fix --suppress-all \"src/**/*.ts\" \"tests/**/*.ts\" \"package.json\" && rm -f eslint-suppressions.json",
20
- "lint": "npm run build && tsc --noEmit && eslint \"src/**/*.ts\" \"tests/**/*.ts\" \"package.json\" && prettier --check --parser typescript \"src/**/*.ts\" \"tests/**/*.ts\"",
19
+ "format": "npm run build && npm run format-prettier && npm run format-eslint",
20
+ "format-eslint": "eslint --fix --suppress-all \"src/**/*.ts\" \"tests/**/*.ts\" \"package.json\" && rm -f eslint-suppressions.json",
21
+ "format-prettier": "npm run format-prettier-typescript && npm run format-prettier-javascript",
22
+ "format-prettier-javascript": "prettier --write \"./**/*.js\"",
23
+ "format-prettier-typescript": "prettier --write --parser typescript \"./**/*.ts\"",
24
+ "lint": "npm run build && npm run lint-tsc && npm run lint-eslint && npm run lint-prettier",
25
+ "lint-eslint": "eslint \"src/**/*.ts\" \"tests/**/*.ts\" \"package.json\"",
26
+ "lint-prettier": "npm run lint-prettier-typescript && npm run lint-prettier-javascript",
27
+ "lint-prettier-javascript": "prettier --check \"./**/*.js\"",
28
+ "lint-prettier-typescript": "prettier --check --parser typescript \"./**/*.ts\"",
29
+ "lint-tsc": "tsc --noEmit",
21
30
  "prepare": "husky",
22
31
  "test": "vitest run",
23
32
  "test-watch": "vitest",
@@ -25,22 +34,22 @@
25
34
  },
26
35
  "dependencies": {
27
36
  "common-tags": "^1.8.2",
28
- "eslint-plugin-package-json": "^0.56.2",
29
- "zod": "^4.1.5"
37
+ "eslint-plugin-package-json": "^0.57.0",
38
+ "zod": "^4.1.12"
30
39
  },
31
40
  "devDependencies": {
32
41
  "@types/common-tags": "^1.8.4",
33
42
  "@types/eslint": "^9.6.1",
34
- "@types/node": "^24.3.1",
35
- "@typescript-eslint/rule-tester": "^8.42.0",
36
- "@typescript-eslint/utils": "^8.42.0",
43
+ "@types/node": "^24.8.1",
44
+ "@typescript-eslint/rule-tester": "^8.46.1",
45
+ "@typescript-eslint/utils": "^8.46.1",
37
46
  "eslint-plugin-eslint-plugin": "^7.0.0",
38
- "globals": "^16.3.0",
47
+ "globals": "^16.4.0",
39
48
  "husky": "^9.1.7",
40
- "jiti": "^2.5.1",
49
+ "jiti": "^2.6.1",
41
50
  "prettier": "^3.6.2",
42
51
  "tsup": "^8.5.0",
43
- "typescript": "^5.9.2",
52
+ "typescript": "^5.9.3",
44
53
  "vite-tsconfig-paths": "^5.1.4",
45
54
  "vitest": "^3.2.4"
46
55
  },