@alextheman/eslint-plugin 5.15.0 → 5.16.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
@@ -46,10 +46,12 @@ let eslint_plugin_prettier = require("eslint-plugin-prettier");
46
46
  eslint_plugin_prettier = __toESM(eslint_plugin_prettier, 1);
47
47
  let typescript_eslint = require("typescript-eslint");
48
48
  typescript_eslint = __toESM(typescript_eslint, 1);
49
+ let _eslint_react_eslint_plugin = require("@eslint-react/eslint-plugin");
50
+ _eslint_react_eslint_plugin = __toESM(_eslint_react_eslint_plugin, 1);
51
+ let _stylistic_eslint_plugin = require("@stylistic/eslint-plugin");
52
+ _stylistic_eslint_plugin = __toESM(_stylistic_eslint_plugin, 1);
49
53
  let eslint_plugin_jsx_a11y_x = require("eslint-plugin-jsx-a11y-x");
50
54
  eslint_plugin_jsx_a11y_x = __toESM(eslint_plugin_jsx_a11y_x, 1);
51
- let eslint_plugin_react = require("eslint-plugin-react");
52
- eslint_plugin_react = __toESM(eslint_plugin_react, 1);
53
55
  let eslint_plugin_react_refresh = require("eslint-plugin-react-refresh");
54
56
  eslint_plugin_react_refresh = __toESM(eslint_plugin_react_refresh, 1);
55
57
  let eslint_plugin_react_hooks = require("eslint-plugin-react-hooks");
@@ -4696,45 +4698,37 @@ const reactHooks = {
4696
4698
  };
4697
4699
  //#endregion
4698
4700
  //#region src/configs/general/react.ts
4699
- const generalReact = [
4700
- eslint_plugin_react.default.configs.flat.recommended,
4701
- eslint_plugin_react.default.configs.flat["jsx-runtime"],
4702
- eslint_plugin_jsx_a11y_x.default.configs.recommended,
4703
- {
4704
- languageOptions: reactLanguageOptions,
4705
- name: "@alextheman/general/react",
4706
- plugins: {
4707
- react: eslint_plugin_react.default,
4708
- "react-hooks": reactHooks,
4709
- "react-refresh": eslint_plugin_react_refresh.default
4710
- },
4711
- rules: {
4712
- ...reactHooks.configs["flat/recommended"].rules,
4713
- "react/destructuring-assignment": [
4714
- "error",
4715
- "always",
4716
- { destructureInSignature: "always" }
4717
- ],
4718
- "react/hook-use-state": "error",
4719
- "react/jsx-curly-brace-presence": ["error", {
4720
- children: "never",
4721
- propElementValues: "always",
4722
- props: "never"
4723
- }],
4724
- "react/jsx-props-no-spread-multi": "error",
4725
- "react/no-danger": "error",
4726
- "react/no-unescaped-entities": "off"
4727
- },
4728
- settings: { react: { version: "detect" } }
4729
- }
4730
- ];
4701
+ const generalReact = [eslint_plugin_jsx_a11y_x.default.configs.recommended, {
4702
+ languageOptions: reactLanguageOptions,
4703
+ name: "@alextheman/general/react",
4704
+ plugins: {
4705
+ "@eslint-react": _eslint_react_eslint_plugin.default,
4706
+ "@stylistic": _stylistic_eslint_plugin.default,
4707
+ "react-hooks": reactHooks,
4708
+ "react-refresh": eslint_plugin_react_refresh.default
4709
+ },
4710
+ rules: {
4711
+ ...reactHooks.configs["flat/recommended"].rules,
4712
+ ..._eslint_react_eslint_plugin.default.configs["recommended-typescript"].rules,
4713
+ "@eslint-react/dom-no-dangerously-set-innerhtml": "error",
4714
+ "@eslint-react/no-array-index-key": "off",
4715
+ "@eslint-react/no-context-provider": "error",
4716
+ "@eslint-react/no-use-context": "error",
4717
+ "@eslint-react/use-state": "error",
4718
+ "@stylistic/jsx-curly-brace-presence": ["error", {
4719
+ children: "never",
4720
+ propElementValues: "always",
4721
+ props: "never"
4722
+ }]
4723
+ },
4724
+ settings: { react: { version: "detect" } }
4725
+ }];
4731
4726
  //#endregion
4732
4727
  //#region src/configs/internal/react.ts
4733
4728
  const internalReact = [{
4734
4729
  languageOptions: reactLanguageOptions,
4735
4730
  name: "@alextheman/internal/react",
4736
4731
  plugins: {
4737
- react: eslint_plugin_react.default,
4738
4732
  "react-hooks": reactHooks,
4739
4733
  "react-refresh": eslint_plugin_react_refresh.default
4740
4734
  },
@@ -4742,8 +4736,7 @@ const internalReact = [{
4742
4736
  "no-restricted-imports": ["error", reactRestrictedImports],
4743
4737
  "react-hooks/exhaustive-deps": "off",
4744
4738
  "react-hooks/refs": "off",
4745
- "react-refresh/only-export-components": "off",
4746
- "react/jsx-boolean-value": "error"
4739
+ "react-refresh/only-export-components": "off"
4747
4740
  }
4748
4741
  }];
4749
4742
  //#endregion
@@ -5520,7 +5513,7 @@ function parseUseObjectShorthandOptions(data) {
5520
5513
  const alexPlugin = {
5521
5514
  meta: {
5522
5515
  name: "@alextheman/eslint-plugin",
5523
- version: "5.15.0",
5516
+ version: "5.16.0",
5524
5517
  namespace: "alextheman"
5525
5518
  },
5526
5519
  configs: {},
package/dist/index.d.cts CHANGED
@@ -240,4 +240,4 @@ declare function flattenConfigs<ConfigObject extends { [K in keyof ConfigObject]
240
240
  */
241
241
  declare function getImportSpecifiersAfterRemoving<RuleOptions>(context: Readonly<RuleContext<"message", [RuleOptions]>>, specifiers: Array<TSESTree.ImportClause>, importToRemove: string): string;
242
242
  //#endregion
243
- export { AlexConfigGroupName, AlexFlattenedConfigName, type AlexPlugin, AlexPluginConfigFlattened, AlexPluginConfigObject, CombinedConfig, GeneralConfig, type GetFlattenedConfigNames, InternalConfig, type NoRestrictedImportsOptions, PluginConfig, checkCallExpression, combineRestrictedImports, createRuleSchemaFromZodSchema, alexPlugin as default, fixOnCondition, flattenConfigs, getImportSpecifiersAfterRemoving, prettierConfig };
243
+ export { type AlexConfigGroupName, type AlexFlattenedConfigName, type AlexPlugin, type AlexPluginConfigFlattened, type AlexPluginConfigObject, type CombinedConfig, type GeneralConfig, type GetFlattenedConfigNames, type InternalConfig, type NoRestrictedImportsOptions, type PluginConfig, checkCallExpression, combineRestrictedImports, createRuleSchemaFromZodSchema, alexPlugin as default, fixOnCondition, flattenConfigs, getImportSpecifiersAfterRemoving, prettierConfig };
package/dist/index.d.ts CHANGED
@@ -240,4 +240,4 @@ declare function flattenConfigs<ConfigObject extends { [K in keyof ConfigObject]
240
240
  */
241
241
  declare function getImportSpecifiersAfterRemoving<RuleOptions>(context: Readonly<RuleContext<"message", [RuleOptions]>>, specifiers: Array<TSESTree.ImportClause>, importToRemove: string): string;
242
242
  //#endregion
243
- export { AlexConfigGroupName, AlexFlattenedConfigName, type AlexPlugin, AlexPluginConfigFlattened, AlexPluginConfigObject, CombinedConfig, GeneralConfig, type GetFlattenedConfigNames, InternalConfig, type NoRestrictedImportsOptions, PluginConfig, checkCallExpression, combineRestrictedImports, createRuleSchemaFromZodSchema, alexPlugin as default, fixOnCondition, flattenConfigs, getImportSpecifiersAfterRemoving, prettierConfig };
243
+ export { type AlexConfigGroupName, type AlexFlattenedConfigName, type AlexPlugin, type AlexPluginConfigFlattened, type AlexPluginConfigObject, type CombinedConfig, type GeneralConfig, type GetFlattenedConfigNames, type InternalConfig, type NoRestrictedImportsOptions, type PluginConfig, checkCallExpression, combineRestrictedImports, createRuleSchemaFromZodSchema, alexPlugin as default, fixOnCondition, flattenConfigs, getImportSpecifiersAfterRemoving, prettierConfig };
package/dist/index.js CHANGED
@@ -10,8 +10,9 @@ import nodePlugin from "eslint-plugin-n";
10
10
  import perfectionist from "eslint-plugin-perfectionist";
11
11
  import prettierPlugin from "eslint-plugin-prettier";
12
12
  import tseslint from "typescript-eslint";
13
+ import reactPlugin from "@eslint-react/eslint-plugin";
14
+ import stylistic from "@stylistic/eslint-plugin";
13
15
  import jsxA11y from "eslint-plugin-jsx-a11y-x";
14
- import reactPlugin from "eslint-plugin-react";
15
16
  import reactRefresh from "eslint-plugin-react-refresh";
16
17
  import reactHooksPlugin from "eslint-plugin-react-hooks";
17
18
  import packageJson from "eslint-plugin-package-json";
@@ -4677,45 +4678,37 @@ const reactHooks = {
4677
4678
  };
4678
4679
  //#endregion
4679
4680
  //#region src/configs/general/react.ts
4680
- const generalReact = [
4681
- reactPlugin.configs.flat.recommended,
4682
- reactPlugin.configs.flat["jsx-runtime"],
4683
- jsxA11y.configs.recommended,
4684
- {
4685
- languageOptions: reactLanguageOptions,
4686
- name: "@alextheman/general/react",
4687
- plugins: {
4688
- react: reactPlugin,
4689
- "react-hooks": reactHooks,
4690
- "react-refresh": reactRefresh
4691
- },
4692
- rules: {
4693
- ...reactHooks.configs["flat/recommended"].rules,
4694
- "react/destructuring-assignment": [
4695
- "error",
4696
- "always",
4697
- { destructureInSignature: "always" }
4698
- ],
4699
- "react/hook-use-state": "error",
4700
- "react/jsx-curly-brace-presence": ["error", {
4701
- children: "never",
4702
- propElementValues: "always",
4703
- props: "never"
4704
- }],
4705
- "react/jsx-props-no-spread-multi": "error",
4706
- "react/no-danger": "error",
4707
- "react/no-unescaped-entities": "off"
4708
- },
4709
- settings: { react: { version: "detect" } }
4710
- }
4711
- ];
4681
+ const generalReact = [jsxA11y.configs.recommended, {
4682
+ languageOptions: reactLanguageOptions,
4683
+ name: "@alextheman/general/react",
4684
+ plugins: {
4685
+ "@eslint-react": reactPlugin,
4686
+ "@stylistic": stylistic,
4687
+ "react-hooks": reactHooks,
4688
+ "react-refresh": reactRefresh
4689
+ },
4690
+ rules: {
4691
+ ...reactHooks.configs["flat/recommended"].rules,
4692
+ ...reactPlugin.configs["recommended-typescript"].rules,
4693
+ "@eslint-react/dom-no-dangerously-set-innerhtml": "error",
4694
+ "@eslint-react/no-array-index-key": "off",
4695
+ "@eslint-react/no-context-provider": "error",
4696
+ "@eslint-react/no-use-context": "error",
4697
+ "@eslint-react/use-state": "error",
4698
+ "@stylistic/jsx-curly-brace-presence": ["error", {
4699
+ children: "never",
4700
+ propElementValues: "always",
4701
+ props: "never"
4702
+ }]
4703
+ },
4704
+ settings: { react: { version: "detect" } }
4705
+ }];
4712
4706
  //#endregion
4713
4707
  //#region src/configs/internal/react.ts
4714
4708
  const internalReact = [{
4715
4709
  languageOptions: reactLanguageOptions,
4716
4710
  name: "@alextheman/internal/react",
4717
4711
  plugins: {
4718
- react: reactPlugin,
4719
4712
  "react-hooks": reactHooks,
4720
4713
  "react-refresh": reactRefresh
4721
4714
  },
@@ -4723,8 +4716,7 @@ const internalReact = [{
4723
4716
  "no-restricted-imports": ["error", reactRestrictedImports],
4724
4717
  "react-hooks/exhaustive-deps": "off",
4725
4718
  "react-hooks/refs": "off",
4726
- "react-refresh/only-export-components": "off",
4727
- "react/jsx-boolean-value": "error"
4719
+ "react-refresh/only-export-components": "off"
4728
4720
  }
4729
4721
  }];
4730
4722
  //#endregion
@@ -5501,7 +5493,7 @@ function parseUseObjectShorthandOptions(data) {
5501
5493
  const alexPlugin = {
5502
5494
  meta: {
5503
5495
  name: "@alextheman/eslint-plugin",
5504
- version: "5.15.0",
5496
+ version: "5.16.0",
5505
5497
  namespace: "alextheman"
5506
5498
  },
5507
5499
  configs: {},
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alextheman/eslint-plugin",
3
- "version": "5.15.0",
3
+ "version": "5.16.0",
4
4
  "description": "A package to provide custom ESLint rules and configs.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -37,34 +37,35 @@
37
37
  "node": ">=22.3.0"
38
38
  },
39
39
  "dependencies": {
40
- "@alextheman/utility": "5.18.2",
40
+ "@alextheman/utility": "5.19.0",
41
41
  "@eslint/compat": "2.1.0",
42
- "@typescript-eslint/types": "8.59.3",
43
- "@typescript-eslint/utils": "8.59.3",
42
+ "@typescript-eslint/types": "8.59.4",
43
+ "@typescript-eslint/utils": "8.59.4",
44
44
  "common-tags": "1.8.2",
45
45
  "prettier": "3.8.3",
46
46
  "zod": "4.4.3"
47
47
  },
48
48
  "devDependencies": {
49
+ "@eslint-react/eslint-plugin": "5.8.4",
49
50
  "@eslint/js": "10.0.1",
51
+ "@stylistic/eslint-plugin": "5.10.0",
50
52
  "@types/common-tags": "1.8.4",
51
53
  "@types/eslint": "9.6.1",
52
54
  "@types/eslint-plugin-jsx-a11y": "6.10.1",
53
- "@types/node": "25.8.0",
54
- "@typescript-eslint/rule-tester": "8.59.3",
55
- "alex-c-line": "2.7.2",
55
+ "@types/node": "25.9.1",
56
+ "@typescript-eslint/rule-tester": "8.59.4",
57
+ "alex-c-line": "2.8.1",
56
58
  "dotenv-cli": "11.0.0",
57
- "eslint": "10.3.0",
59
+ "eslint": "10.4.0",
58
60
  "eslint-config-prettier": "10.1.8",
59
61
  "eslint-import-resolver-typescript": "4.4.4",
60
62
  "eslint-plugin-import-x": "4.16.2",
61
- "eslint-plugin-jsdoc": "62.9.0",
63
+ "eslint-plugin-jsdoc": "63.0.0",
62
64
  "eslint-plugin-jsx-a11y-x": "0.2.0",
63
65
  "eslint-plugin-n": "18.0.1",
64
- "eslint-plugin-package-json": "0.91.2",
66
+ "eslint-plugin-package-json": "1.1.0",
65
67
  "eslint-plugin-perfectionist": "5.9.0",
66
68
  "eslint-plugin-prettier": "5.5.5",
67
- "eslint-plugin-react": "7.37.5",
68
69
  "eslint-plugin-react-hooks": "7.1.1",
69
70
  "eslint-plugin-react-refresh": "0.5.2",
70
71
  "eslint-vitest-rule-tester": "3.1.0",
@@ -75,14 +76,16 @@
75
76
  "markdownlint-cli2": "0.22.1",
76
77
  "tempy": "3.2.0",
77
78
  "tsdown": "0.22.0",
78
- "tsx": "4.22.0",
79
+ "tsx": "4.22.3",
79
80
  "typescript": "6.0.3",
80
- "typescript-eslint": "8.59.3",
81
- "vite": "8.0.13",
82
- "vitest": "4.1.6"
81
+ "typescript-eslint": "8.59.4",
82
+ "vite": "8.0.14",
83
+ "vitest": "4.1.7"
83
84
  },
84
85
  "peerDependencies": {
86
+ "@eslint-react/eslint-plugin": ">=5.8.4",
85
87
  "@eslint/js": ">=9.0.0",
88
+ "@stylistic/eslint-plugin": ">=5.10.0",
86
89
  "eslint": ">=9.0.0",
87
90
  "eslint-config-prettier": ">=10.0.0",
88
91
  "eslint-import-resolver-typescript": ">=4.4.4",
@@ -93,7 +96,6 @@
93
96
  "eslint-plugin-package-json": ">=0.85.0",
94
97
  "eslint-plugin-perfectionist": ">=5.0.0",
95
98
  "eslint-plugin-prettier": ">=5.0.0",
96
- "eslint-plugin-react": ">=7.0.0",
97
99
  "eslint-plugin-react-hooks": ">=7.0.0",
98
100
  "eslint-plugin-react-refresh": ">=0.4.0",
99
101
  "typescript-eslint": ">=8.0.0"