@alextheman/eslint-plugin 5.15.0 → 5.16.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 +33 -38
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +31 -37
- package/package.json +18 -16
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,39 @@ const reactHooks = {
|
|
|
4696
4698
|
};
|
|
4697
4699
|
//#endregion
|
|
4698
4700
|
//#region src/configs/general/react.ts
|
|
4699
|
-
const generalReact = [
|
|
4700
|
-
|
|
4701
|
-
|
|
4702
|
-
|
|
4703
|
-
|
|
4704
|
-
|
|
4705
|
-
|
|
4706
|
-
|
|
4707
|
-
|
|
4708
|
-
|
|
4709
|
-
|
|
4710
|
-
|
|
4711
|
-
|
|
4712
|
-
|
|
4713
|
-
|
|
4714
|
-
|
|
4715
|
-
|
|
4716
|
-
|
|
4717
|
-
|
|
4718
|
-
|
|
4719
|
-
|
|
4720
|
-
|
|
4721
|
-
|
|
4722
|
-
|
|
4723
|
-
|
|
4724
|
-
|
|
4725
|
-
|
|
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/set-state-in-effect": "error",
|
|
4718
|
+
"@eslint-react/use-state": "error",
|
|
4719
|
+
"@stylistic/jsx-curly-brace-presence": ["error", {
|
|
4720
|
+
children: "never",
|
|
4721
|
+
propElementValues: "always",
|
|
4722
|
+
props: "never"
|
|
4723
|
+
}],
|
|
4724
|
+
"react-hooks/set-state-in-effect": "off"
|
|
4725
|
+
},
|
|
4726
|
+
settings: { react: { version: "detect" } }
|
|
4727
|
+
}];
|
|
4731
4728
|
//#endregion
|
|
4732
4729
|
//#region src/configs/internal/react.ts
|
|
4733
4730
|
const internalReact = [{
|
|
4734
4731
|
languageOptions: reactLanguageOptions,
|
|
4735
4732
|
name: "@alextheman/internal/react",
|
|
4736
4733
|
plugins: {
|
|
4737
|
-
react: eslint_plugin_react.default,
|
|
4738
4734
|
"react-hooks": reactHooks,
|
|
4739
4735
|
"react-refresh": eslint_plugin_react_refresh.default
|
|
4740
4736
|
},
|
|
@@ -4742,8 +4738,7 @@ const internalReact = [{
|
|
|
4742
4738
|
"no-restricted-imports": ["error", reactRestrictedImports],
|
|
4743
4739
|
"react-hooks/exhaustive-deps": "off",
|
|
4744
4740
|
"react-hooks/refs": "off",
|
|
4745
|
-
"react-refresh/only-export-components": "off"
|
|
4746
|
-
"react/jsx-boolean-value": "error"
|
|
4741
|
+
"react-refresh/only-export-components": "off"
|
|
4747
4742
|
}
|
|
4748
4743
|
}];
|
|
4749
4744
|
//#endregion
|
|
@@ -5520,7 +5515,7 @@ function parseUseObjectShorthandOptions(data) {
|
|
|
5520
5515
|
const alexPlugin = {
|
|
5521
5516
|
meta: {
|
|
5522
5517
|
name: "@alextheman/eslint-plugin",
|
|
5523
|
-
version: "5.
|
|
5518
|
+
version: "5.16.1",
|
|
5524
5519
|
namespace: "alextheman"
|
|
5525
5520
|
},
|
|
5526
5521
|
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,39 @@ const reactHooks = {
|
|
|
4677
4678
|
};
|
|
4678
4679
|
//#endregion
|
|
4679
4680
|
//#region src/configs/general/react.ts
|
|
4680
|
-
const generalReact = [
|
|
4681
|
-
|
|
4682
|
-
|
|
4683
|
-
|
|
4684
|
-
|
|
4685
|
-
|
|
4686
|
-
|
|
4687
|
-
|
|
4688
|
-
|
|
4689
|
-
|
|
4690
|
-
|
|
4691
|
-
|
|
4692
|
-
|
|
4693
|
-
|
|
4694
|
-
|
|
4695
|
-
|
|
4696
|
-
|
|
4697
|
-
|
|
4698
|
-
|
|
4699
|
-
|
|
4700
|
-
|
|
4701
|
-
|
|
4702
|
-
|
|
4703
|
-
|
|
4704
|
-
|
|
4705
|
-
|
|
4706
|
-
|
|
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/set-state-in-effect": "error",
|
|
4698
|
+
"@eslint-react/use-state": "error",
|
|
4699
|
+
"@stylistic/jsx-curly-brace-presence": ["error", {
|
|
4700
|
+
children: "never",
|
|
4701
|
+
propElementValues: "always",
|
|
4702
|
+
props: "never"
|
|
4703
|
+
}],
|
|
4704
|
+
"react-hooks/set-state-in-effect": "off"
|
|
4705
|
+
},
|
|
4706
|
+
settings: { react: { version: "detect" } }
|
|
4707
|
+
}];
|
|
4712
4708
|
//#endregion
|
|
4713
4709
|
//#region src/configs/internal/react.ts
|
|
4714
4710
|
const internalReact = [{
|
|
4715
4711
|
languageOptions: reactLanguageOptions,
|
|
4716
4712
|
name: "@alextheman/internal/react",
|
|
4717
4713
|
plugins: {
|
|
4718
|
-
react: reactPlugin,
|
|
4719
4714
|
"react-hooks": reactHooks,
|
|
4720
4715
|
"react-refresh": reactRefresh
|
|
4721
4716
|
},
|
|
@@ -4723,8 +4718,7 @@ const internalReact = [{
|
|
|
4723
4718
|
"no-restricted-imports": ["error", reactRestrictedImports],
|
|
4724
4719
|
"react-hooks/exhaustive-deps": "off",
|
|
4725
4720
|
"react-hooks/refs": "off",
|
|
4726
|
-
"react-refresh/only-export-components": "off"
|
|
4727
|
-
"react/jsx-boolean-value": "error"
|
|
4721
|
+
"react-refresh/only-export-components": "off"
|
|
4728
4722
|
}
|
|
4729
4723
|
}];
|
|
4730
4724
|
//#endregion
|
|
@@ -5501,7 +5495,7 @@ function parseUseObjectShorthandOptions(data) {
|
|
|
5501
5495
|
const alexPlugin = {
|
|
5502
5496
|
meta: {
|
|
5503
5497
|
name: "@alextheman/eslint-plugin",
|
|
5504
|
-
version: "5.
|
|
5498
|
+
version: "5.16.1",
|
|
5505
5499
|
namespace: "alextheman"
|
|
5506
5500
|
},
|
|
5507
5501
|
configs: {},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alextheman/eslint-plugin",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.16.1",
|
|
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.
|
|
40
|
+
"@alextheman/utility": "5.19.0",
|
|
41
41
|
"@eslint/compat": "2.1.0",
|
|
42
|
-
"@typescript-eslint/types": "8.59.
|
|
43
|
-
"@typescript-eslint/utils": "8.59.
|
|
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.
|
|
54
|
-
"@typescript-eslint/rule-tester": "8.59.
|
|
55
|
-
"alex-c-line": "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.
|
|
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": "
|
|
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": "
|
|
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.
|
|
79
|
+
"tsx": "4.22.3",
|
|
79
80
|
"typescript": "6.0.3",
|
|
80
|
-
"typescript-eslint": "8.59.
|
|
81
|
-
"vite": "8.0.
|
|
82
|
-
"vitest": "4.1.
|
|
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"
|