eslint-plugin-react-x 3.0.0-next.44 → 3.0.0-next.45
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.js +23 -23
- package/package.json +6 -6
package/dist/index.js
CHANGED
|
@@ -68,7 +68,7 @@ const rules$7 = {
|
|
|
68
68
|
//#endregion
|
|
69
69
|
//#region package.json
|
|
70
70
|
var name$6 = "eslint-plugin-react-x";
|
|
71
|
-
var version = "3.0.0-next.
|
|
71
|
+
var version = "3.0.0-next.45";
|
|
72
72
|
|
|
73
73
|
//#endregion
|
|
74
74
|
//#region src/utils/create-rule.ts
|
|
@@ -1406,7 +1406,7 @@ function create$60(context) {
|
|
|
1406
1406
|
const RULE_NAME$59 = "jsx-dollar";
|
|
1407
1407
|
var jsx_dollar_default = createRule({
|
|
1408
1408
|
meta: {
|
|
1409
|
-
type: "
|
|
1409
|
+
type: "suggestion",
|
|
1410
1410
|
docs: { description: "Prevents unintentional '$' sign before expression." },
|
|
1411
1411
|
fixable: "code",
|
|
1412
1412
|
hasSuggestions: true,
|
|
@@ -1571,7 +1571,7 @@ const schema$4 = [{
|
|
|
1571
1571
|
}];
|
|
1572
1572
|
var jsx_shorthand_boolean_default = createRule({
|
|
1573
1573
|
meta: {
|
|
1574
|
-
type: "
|
|
1574
|
+
type: "suggestion",
|
|
1575
1575
|
docs: { description: "Enforces shorthand syntax for boolean props." },
|
|
1576
1576
|
fixable: "code",
|
|
1577
1577
|
messages: { default: "{{message}}" },
|
|
@@ -1617,7 +1617,7 @@ const schema$3 = [{
|
|
|
1617
1617
|
}];
|
|
1618
1618
|
var jsx_shorthand_fragment_default = createRule({
|
|
1619
1619
|
meta: {
|
|
1620
|
-
type: "
|
|
1620
|
+
type: "suggestion",
|
|
1621
1621
|
docs: { description: "Enforces shorthand syntax for fragment elements." },
|
|
1622
1622
|
fixable: "code",
|
|
1623
1623
|
messages: { default: "{{message}}" },
|
|
@@ -1878,7 +1878,7 @@ function getIdentifiersFromBinaryExpression(side) {
|
|
|
1878
1878
|
}
|
|
1879
1879
|
var no_array_index_key_default = createRule({
|
|
1880
1880
|
meta: {
|
|
1881
|
-
type: "
|
|
1881
|
+
type: "suggestion",
|
|
1882
1882
|
docs: { description: "Disallows using an item's index in the array as its key." },
|
|
1883
1883
|
messages: { default: "Do not use item index in the array as its key." },
|
|
1884
1884
|
schema: []
|
|
@@ -1956,7 +1956,7 @@ function create$50(context) {
|
|
|
1956
1956
|
const RULE_NAME$49 = "no-children-count";
|
|
1957
1957
|
var no_children_count_default = createRule({
|
|
1958
1958
|
meta: {
|
|
1959
|
-
type: "
|
|
1959
|
+
type: "suggestion",
|
|
1960
1960
|
docs: { description: "Disallows the use of 'Children.count' from the 'react' package." },
|
|
1961
1961
|
messages: { default: "Using 'Children.count' is uncommon and can lead to fragile code. Use alternatives instead." },
|
|
1962
1962
|
schema: []
|
|
@@ -1979,7 +1979,7 @@ function create$49(context) {
|
|
|
1979
1979
|
const RULE_NAME$48 = "no-children-for-each";
|
|
1980
1980
|
var no_children_for_each_default = createRule({
|
|
1981
1981
|
meta: {
|
|
1982
|
-
type: "
|
|
1982
|
+
type: "suggestion",
|
|
1983
1983
|
docs: { description: "Disallows the use of 'Children.forEach' from the 'react' package." },
|
|
1984
1984
|
messages: { default: "Using 'Children.forEach' is uncommon and can lead to fragile code. Use alternatives instead." },
|
|
1985
1985
|
schema: []
|
|
@@ -2002,7 +2002,7 @@ function create$48(context) {
|
|
|
2002
2002
|
const RULE_NAME$47 = "no-children-map";
|
|
2003
2003
|
var no_children_map_default = createRule({
|
|
2004
2004
|
meta: {
|
|
2005
|
-
type: "
|
|
2005
|
+
type: "suggestion",
|
|
2006
2006
|
docs: { description: "Disallows the use of 'Children.map' from the 'react' package." },
|
|
2007
2007
|
messages: { default: "Using 'Children.map' is uncommon and can lead to fragile code. Use alternatives instead." },
|
|
2008
2008
|
schema: []
|
|
@@ -2025,7 +2025,7 @@ function create$47(context) {
|
|
|
2025
2025
|
const RULE_NAME$46 = "no-children-only";
|
|
2026
2026
|
var no_children_only_default = createRule({
|
|
2027
2027
|
meta: {
|
|
2028
|
-
type: "
|
|
2028
|
+
type: "suggestion",
|
|
2029
2029
|
docs: { description: "Disallows the use of 'Children.only' from the 'react' package." },
|
|
2030
2030
|
messages: { default: "Using 'Children.only' is uncommon and can lead to fragile code. Use alternatives instead." },
|
|
2031
2031
|
schema: []
|
|
@@ -2048,7 +2048,7 @@ function create$46(context) {
|
|
|
2048
2048
|
const RULE_NAME$45 = "no-children-prop";
|
|
2049
2049
|
var no_children_prop_default = createRule({
|
|
2050
2050
|
meta: {
|
|
2051
|
-
type: "
|
|
2051
|
+
type: "suggestion",
|
|
2052
2052
|
docs: { description: "Disallows passing 'children' as a prop." },
|
|
2053
2053
|
messages: { default: "Do not pass 'children' as props." },
|
|
2054
2054
|
schema: []
|
|
@@ -2072,7 +2072,7 @@ function create$45(context) {
|
|
|
2072
2072
|
const RULE_NAME$44 = "no-children-to-array";
|
|
2073
2073
|
var no_children_to_array_default = createRule({
|
|
2074
2074
|
meta: {
|
|
2075
|
-
type: "
|
|
2075
|
+
type: "suggestion",
|
|
2076
2076
|
docs: { description: "Disallows the use of 'Children.toArray' from the 'react' package." },
|
|
2077
2077
|
messages: { default: "Using 'Children.toArray' is uncommon and can lead to fragile code. Use alternatives instead." },
|
|
2078
2078
|
schema: []
|
|
@@ -2095,7 +2095,7 @@ function create$44(context) {
|
|
|
2095
2095
|
const RULE_NAME$43 = "no-class-component";
|
|
2096
2096
|
var no_class_component_default = createRule({
|
|
2097
2097
|
meta: {
|
|
2098
|
-
type: "
|
|
2098
|
+
type: "suggestion",
|
|
2099
2099
|
docs: { description: "Disallows class components except for error boundaries." },
|
|
2100
2100
|
messages: { default: "Avoid using class components. Use function components instead." },
|
|
2101
2101
|
schema: []
|
|
@@ -2124,7 +2124,7 @@ function create$43(context) {
|
|
|
2124
2124
|
const RULE_NAME$42 = "no-clone-element";
|
|
2125
2125
|
var no_clone_element_default = createRule({
|
|
2126
2126
|
meta: {
|
|
2127
|
-
type: "
|
|
2127
|
+
type: "suggestion",
|
|
2128
2128
|
docs: { description: "Disallows 'cloneElement'." },
|
|
2129
2129
|
messages: { default: "Using 'cloneElement' is uncommon and can lead to fragile code. Use alternatives instead." },
|
|
2130
2130
|
schema: []
|
|
@@ -2293,7 +2293,7 @@ function create$38(context) {
|
|
|
2293
2293
|
const RULE_NAME$37 = "no-create-ref";
|
|
2294
2294
|
var no_create_ref_default = createRule({
|
|
2295
2295
|
meta: {
|
|
2296
|
-
type: "
|
|
2296
|
+
type: "suggestion",
|
|
2297
2297
|
docs: { description: "Disallows 'createRef' in function components." },
|
|
2298
2298
|
messages: { default: "[Deprecated] Use 'useRef' instead." },
|
|
2299
2299
|
schema: []
|
|
@@ -2626,7 +2626,7 @@ function create$32(context) {
|
|
|
2626
2626
|
const RULE_NAME$31 = "no-missing-component-display-name";
|
|
2627
2627
|
var no_missing_component_display_name_default = createRule({
|
|
2628
2628
|
meta: {
|
|
2629
|
-
type: "
|
|
2629
|
+
type: "suggestion",
|
|
2630
2630
|
docs: { description: "Enforces that all components have a 'displayName' that can be used in DevTools." },
|
|
2631
2631
|
messages: { default: "Add missing 'displayName' for component." },
|
|
2632
2632
|
schema: []
|
|
@@ -2660,7 +2660,7 @@ function create$31(context) {
|
|
|
2660
2660
|
const RULE_NAME$30 = "no-missing-context-display-name";
|
|
2661
2661
|
var no_missing_context_display_name_default = createRule({
|
|
2662
2662
|
meta: {
|
|
2663
|
-
type: "
|
|
2663
|
+
type: "suggestion",
|
|
2664
2664
|
docs: { description: "Enforces that all contexts have a 'displayName' that can be used in DevTools." },
|
|
2665
2665
|
fixable: "code",
|
|
2666
2666
|
messages: { default: "Add missing 'displayName' for context." },
|
|
@@ -3139,7 +3139,7 @@ function create$22(context) {
|
|
|
3139
3139
|
const RULE_NAME$21 = "no-unnecessary-use-callback";
|
|
3140
3140
|
var no_unnecessary_use_callback_default = createRule({
|
|
3141
3141
|
meta: {
|
|
3142
|
-
type: "
|
|
3142
|
+
type: "suggestion",
|
|
3143
3143
|
docs: { description: "Disallows unnecessary usage of 'useCallback'." },
|
|
3144
3144
|
messages: {
|
|
3145
3145
|
default: "An 'useCallback' with empty deps and no references to the component scope may be unnecessary.",
|
|
@@ -3216,7 +3216,7 @@ function checkForUsageInsideUseEffect$1(sourceCode, node) {
|
|
|
3216
3216
|
const RULE_NAME$20 = "no-unnecessary-use-memo";
|
|
3217
3217
|
var no_unnecessary_use_memo_default = createRule({
|
|
3218
3218
|
meta: {
|
|
3219
|
-
type: "
|
|
3219
|
+
type: "suggestion",
|
|
3220
3220
|
docs: { description: "Disallows unnecessary usage of 'useMemo'." },
|
|
3221
3221
|
messages: {
|
|
3222
3222
|
default: "An 'useMemo' with empty deps and no references to the component scope may be unnecessary.",
|
|
@@ -3579,7 +3579,7 @@ function isKeyLiteral$1(node, key) {
|
|
|
3579
3579
|
}
|
|
3580
3580
|
var no_unused_class_component_members_default = createRule({
|
|
3581
3581
|
meta: {
|
|
3582
|
-
type: "
|
|
3582
|
+
type: "suggestion",
|
|
3583
3583
|
docs: { description: "Warns about unused class component methods and properties." },
|
|
3584
3584
|
messages: { default: "Unused method or property '{{methodName}}'' of class '{{className}}'." },
|
|
3585
3585
|
schema: []
|
|
@@ -3672,7 +3672,7 @@ function create$13(context) {
|
|
|
3672
3672
|
const RULE_NAME$12 = "no-unused-props";
|
|
3673
3673
|
var no_unused_props_default = createRule({
|
|
3674
3674
|
meta: {
|
|
3675
|
-
type: "
|
|
3675
|
+
type: "suggestion",
|
|
3676
3676
|
docs: { description: "Warns about component props that are defined but never used." },
|
|
3677
3677
|
messages: { default: "Prop `{{name}}` is declared but never used" },
|
|
3678
3678
|
schema: []
|
|
@@ -3790,7 +3790,7 @@ function isKeyLiteral(node, key) {
|
|
|
3790
3790
|
}
|
|
3791
3791
|
var no_unused_state_default = createRule({
|
|
3792
3792
|
meta: {
|
|
3793
|
-
type: "
|
|
3793
|
+
type: "suggestion",
|
|
3794
3794
|
docs: { description: "Warns about unused class component state." },
|
|
3795
3795
|
messages: { default: "Unused class component state in '{{className}}'" },
|
|
3796
3796
|
schema: []
|
|
@@ -3971,7 +3971,7 @@ const schema$1 = [{
|
|
|
3971
3971
|
}];
|
|
3972
3972
|
var no_useless_fragment_default = createRule({
|
|
3973
3973
|
meta: {
|
|
3974
|
-
type: "
|
|
3974
|
+
type: "suggestion",
|
|
3975
3975
|
defaultOptions: [...defaultOptions$1],
|
|
3976
3976
|
docs: { description: "Disallows useless fragment elements." },
|
|
3977
3977
|
fixable: "code",
|
|
@@ -4129,7 +4129,7 @@ function create$8(context) {
|
|
|
4129
4129
|
const RULE_NAME$7 = "prefer-namespace-import";
|
|
4130
4130
|
var prefer_namespace_import_default = createRule({
|
|
4131
4131
|
meta: {
|
|
4132
|
-
type: "
|
|
4132
|
+
type: "suggestion",
|
|
4133
4133
|
docs: { description: "Enforces importing React via a namespace import." },
|
|
4134
4134
|
fixable: "code",
|
|
4135
4135
|
messages: { default: "Prefer importing React as 'import * as React from \"{{importSource}}\"';" },
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-plugin-react-x",
|
|
3
|
-
"version": "3.0.0-next.
|
|
3
|
+
"version": "3.0.0-next.45",
|
|
4
4
|
"description": "A set of composable ESLint rules for libraries and frameworks that use React as a UI runtime.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -45,11 +45,11 @@
|
|
|
45
45
|
"string-ts": "^2.3.1",
|
|
46
46
|
"ts-api-utils": "^2.4.0",
|
|
47
47
|
"ts-pattern": "^5.9.0",
|
|
48
|
-
"@eslint-react/ast": "3.0.0-next.
|
|
49
|
-
"@eslint-react/eff": "3.0.0-next.
|
|
50
|
-
"@eslint-react/shared": "3.0.0-next.
|
|
51
|
-
"@eslint-react/var": "3.0.0-next.
|
|
52
|
-
"@eslint-react/core": "3.0.0-next.
|
|
48
|
+
"@eslint-react/ast": "3.0.0-next.45",
|
|
49
|
+
"@eslint-react/eff": "3.0.0-next.45",
|
|
50
|
+
"@eslint-react/shared": "3.0.0-next.45",
|
|
51
|
+
"@eslint-react/var": "3.0.0-next.45",
|
|
52
|
+
"@eslint-react/core": "3.0.0-next.45"
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
55
55
|
"@types/react": "^19.2.14",
|