eslint-plugin-react-features 1.1.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/CHANGELOG.md +70 -0
- package/LICENSE +23 -0
- package/README.md +155 -0
- package/package.json +65 -0
- package/src/index.d.ts +1093 -0
- package/src/index.js +212 -0
- package/src/rules/migration/react-class-to-hooks.d.ts +22 -0
- package/src/rules/migration/react-class-to-hooks.js +178 -0
- package/src/rules/performance/no-unnecessary-rerenders.d.ts +26 -0
- package/src/rules/performance/no-unnecessary-rerenders.js +212 -0
- package/src/rules/performance/react-no-inline-functions.d.ts +24 -0
- package/src/rules/performance/react-no-inline-functions.js +211 -0
- package/src/rules/performance/react-render-optimization.d.ts +31 -0
- package/src/rules/performance/react-render-optimization.js +294 -0
- package/src/rules/react/checked-requires-onchange-or-readonly.d.ts +16 -0
- package/src/rules/react/checked-requires-onchange-or-readonly.js +74 -0
- package/src/rules/react/default-props-match-prop-types.d.ts +13 -0
- package/src/rules/react/default-props-match-prop-types.js +119 -0
- package/src/rules/react/display-name.d.ts +13 -0
- package/src/rules/react/display-name.js +164 -0
- package/src/rules/react/hooks-exhaustive-deps.d.ts +25 -0
- package/src/rules/react/hooks-exhaustive-deps.js +466 -0
- package/src/rules/react/jsx-handler-names.d.ts +13 -0
- package/src/rules/react/jsx-handler-names.js +57 -0
- package/src/rules/react/jsx-key.d.ts +20 -0
- package/src/rules/react/jsx-key.js +421 -0
- package/src/rules/react/jsx-max-depth.d.ts +19 -0
- package/src/rules/react/jsx-max-depth.js +80 -0
- package/src/rules/react/jsx-no-bind.d.ts +13 -0
- package/src/rules/react/jsx-no-bind.js +64 -0
- package/src/rules/react/jsx-no-duplicate-props.d.ts +21 -0
- package/src/rules/react/jsx-no-duplicate-props.js +70 -0
- package/src/rules/react/jsx-no-literals.d.ts +20 -0
- package/src/rules/react/jsx-no-literals.js +83 -0
- package/src/rules/react/jsx-no-script-url.d.ts +25 -0
- package/src/rules/react/jsx-no-script-url.js +131 -0
- package/src/rules/react/jsx-no-target-blank.d.ts +26 -0
- package/src/rules/react/jsx-no-target-blank.js +176 -0
- package/src/rules/react/no-access-state-in-setstate.d.ts +13 -0
- package/src/rules/react/no-access-state-in-setstate.js +92 -0
- package/src/rules/react/no-adjacent-inline-elements.d.ts +13 -0
- package/src/rules/react/no-adjacent-inline-elements.js +81 -0
- package/src/rules/react/no-arrow-function-lifecycle.d.ts +13 -0
- package/src/rules/react/no-arrow-function-lifecycle.js +63 -0
- package/src/rules/react/no-children-prop.d.ts +13 -0
- package/src/rules/react/no-children-prop.js +60 -0
- package/src/rules/react/no-danger-with-children.d.ts +16 -0
- package/src/rules/react/no-danger-with-children.js +110 -0
- package/src/rules/react/no-danger.d.ts +13 -0
- package/src/rules/react/no-danger.js +45 -0
- package/src/rules/react/no-deprecated.d.ts +16 -0
- package/src/rules/react/no-deprecated.js +140 -0
- package/src/rules/react/no-did-mount-set-state.d.ts +13 -0
- package/src/rules/react/no-did-mount-set-state.js +55 -0
- package/src/rules/react/no-did-update-set-state.d.ts +19 -0
- package/src/rules/react/no-did-update-set-state.js +80 -0
- package/src/rules/react/no-direct-mutation-state.d.ts +20 -0
- package/src/rules/react/no-direct-mutation-state.js +277 -0
- package/src/rules/react/no-find-dom-node.d.ts +15 -0
- package/src/rules/react/no-find-dom-node.js +56 -0
- package/src/rules/react/no-invalid-html-attribute.d.ts +13 -0
- package/src/rules/react/no-invalid-html-attribute.js +84 -0
- package/src/rules/react/no-is-mounted.d.ts +13 -0
- package/src/rules/react/no-is-mounted.js +52 -0
- package/src/rules/react/no-multi-comp.d.ts +18 -0
- package/src/rules/react/no-multi-comp.js +160 -0
- package/src/rules/react/no-namespace.d.ts +13 -0
- package/src/rules/react/no-namespace.js +41 -0
- package/src/rules/react/no-object-type-as-default-prop.d.ts +13 -0
- package/src/rules/react/no-object-type-as-default-prop.js +61 -0
- package/src/rules/react/no-redundant-should-component-update.d.ts +13 -0
- package/src/rules/react/no-redundant-should-component-update.js +55 -0
- package/src/rules/react/no-render-return-value.d.ts +13 -0
- package/src/rules/react/no-render-return-value.js +74 -0
- package/src/rules/react/no-set-state.d.ts +13 -0
- package/src/rules/react/no-set-state.js +50 -0
- package/src/rules/react/no-string-refs.d.ts +13 -0
- package/src/rules/react/no-string-refs.js +68 -0
- package/src/rules/react/no-this-in-sfc.d.ts +13 -0
- package/src/rules/react/no-this-in-sfc.js +65 -0
- package/src/rules/react/no-typos.d.ts +13 -0
- package/src/rules/react/no-typos.js +97 -0
- package/src/rules/react/no-unescaped-entities.d.ts +13 -0
- package/src/rules/react/no-unescaped-entities.js +50 -0
- package/src/rules/react/no-unknown-property.d.ts +13 -0
- package/src/rules/react/no-unknown-property.js +130 -0
- package/src/rules/react/no-unsafe.d.ts +20 -0
- package/src/rules/react/no-unsafe.js +112 -0
- package/src/rules/react/prefer-es6-class.d.ts +13 -0
- package/src/rules/react/prefer-es6-class.js +56 -0
- package/src/rules/react/prefer-stateless-function.d.ts +16 -0
- package/src/rules/react/prefer-stateless-function.js +134 -0
- package/src/rules/react/prop-types.d.ts +18 -0
- package/src/rules/react/prop-types.js +153 -0
- package/src/rules/react/react-in-jsx-scope.d.ts +13 -0
- package/src/rules/react/react-in-jsx-scope.js +94 -0
- package/src/rules/react/require-default-props.d.ts +16 -0
- package/src/rules/react/require-default-props.js +146 -0
- package/src/rules/react/require-optimization.d.ts +26 -0
- package/src/rules/react/require-optimization.js +436 -0
- package/src/rules/react/require-render-return.d.ts +13 -0
- package/src/rules/react/require-render-return.js +87 -0
- package/src/rules/react/required-attributes.d.ts +28 -0
- package/src/rules/react/required-attributes.js +212 -0
- package/src/rules/react/sort-comp.d.ts +17 -0
- package/src/rules/react/sort-comp.js +160 -0
- package/src/rules/react/state-in-constructor.d.ts +13 -0
- package/src/rules/react/state-in-constructor.js +103 -0
- package/src/rules/react/static-property-placement.d.ts +20 -0
- package/src/rules/react/static-property-placement.js +166 -0
- package/src/rules/react/void-dom-elements-no-children.d.ts +15 -0
- package/src/rules/react/void-dom-elements-no-children.js +94 -0
- package/src/types/index.d.ts +54 -0
- package/src/types/index.js +7 -0
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Copyright (c) 2025 Ofri Peretz
|
|
4
|
+
* Licensed under the MIT License. Use of this source code is governed by the
|
|
5
|
+
* MIT license that can be found in the LICENSE file.
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.staticPropertyPlacement = void 0;
|
|
9
|
+
const eslint_devkit_1 = require("@interlace/eslint-devkit");
|
|
10
|
+
const eslint_devkit_2 = require("@interlace/eslint-devkit");
|
|
11
|
+
const DEFAULT_GROUPS = [
|
|
12
|
+
{
|
|
13
|
+
name: 'propTypes',
|
|
14
|
+
properties: ['propTypes', 'defaultProps', 'childContextTypes', 'contextTypes', 'contextType'],
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
name: 'lifecycle',
|
|
18
|
+
properties: ['getDerivedStateFromProps', 'getDerivedStateFromError'],
|
|
19
|
+
},
|
|
20
|
+
];
|
|
21
|
+
exports.staticPropertyPlacement = (0, eslint_devkit_1.createRule)({
|
|
22
|
+
name: 'static-property-placement',
|
|
23
|
+
meta: {
|
|
24
|
+
type: 'problem',
|
|
25
|
+
docs: {
|
|
26
|
+
description: 'Enforce static property placement',
|
|
27
|
+
},
|
|
28
|
+
schema: [
|
|
29
|
+
{
|
|
30
|
+
type: 'object',
|
|
31
|
+
properties: {
|
|
32
|
+
propertyGroups: {
|
|
33
|
+
type: 'array',
|
|
34
|
+
items: {
|
|
35
|
+
type: 'object',
|
|
36
|
+
properties: {
|
|
37
|
+
name: { type: 'string' },
|
|
38
|
+
properties: { type: 'array', items: { type: 'string' } },
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
childClass: {
|
|
43
|
+
type: 'string',
|
|
44
|
+
enum: ['first', 'last'],
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
additionalProperties: false,
|
|
48
|
+
},
|
|
49
|
+
],
|
|
50
|
+
messages: {
|
|
51
|
+
staticPropertyPlacement: (0, eslint_devkit_2.formatLLMMessage)({
|
|
52
|
+
icon: eslint_devkit_2.MessageIcons.WARNING,
|
|
53
|
+
issueName: 'Static Property Placement',
|
|
54
|
+
description: 'Static properties should be grouped together',
|
|
55
|
+
severity: 'LOW',
|
|
56
|
+
fix: 'Group static properties together by category',
|
|
57
|
+
documentationLink: 'https://react.dev/reference/react/Component#static-properties',
|
|
58
|
+
}),
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
defaultOptions: [{ propertyGroups: DEFAULT_GROUPS, childClass: 'first' }],
|
|
62
|
+
create(context) {
|
|
63
|
+
const [options] = context.options;
|
|
64
|
+
const propertyGroups = options?.propertyGroups ?? DEFAULT_GROUPS;
|
|
65
|
+
return {
|
|
66
|
+
ClassDeclaration(node) {
|
|
67
|
+
if (isReactComponent(node)) {
|
|
68
|
+
checkStaticPropertyPlacement(node, propertyGroups);
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
};
|
|
72
|
+
function isReactComponent(node) {
|
|
73
|
+
if (!node.superClass)
|
|
74
|
+
return false;
|
|
75
|
+
if (node.superClass.type === 'Identifier') {
|
|
76
|
+
return node.superClass.name === 'Component' || node.superClass.name === 'PureComponent';
|
|
77
|
+
}
|
|
78
|
+
if (node.superClass.type === 'MemberExpression') {
|
|
79
|
+
return (node.superClass.object.type === 'Identifier' &&
|
|
80
|
+
node.superClass.object.name === 'React' &&
|
|
81
|
+
node.superClass.property.type === 'Identifier' &&
|
|
82
|
+
(node.superClass.property.name === 'Component' || node.superClass.property.name === 'PureComponent'));
|
|
83
|
+
}
|
|
84
|
+
return false;
|
|
85
|
+
}
|
|
86
|
+
function checkStaticPropertyPlacement(node, groups) {
|
|
87
|
+
const members = node.body.body;
|
|
88
|
+
const staticProperties = [];
|
|
89
|
+
// Collect static properties
|
|
90
|
+
for (let i = 0; i < members.length; i++) {
|
|
91
|
+
const member = members[i];
|
|
92
|
+
if (isStaticProperty(member)) {
|
|
93
|
+
const name = getPropertyName(member);
|
|
94
|
+
if (name) {
|
|
95
|
+
staticProperties.push({ name, index: i, node: member });
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
if (staticProperties.length < 2)
|
|
100
|
+
return;
|
|
101
|
+
// Check if properties are properly grouped
|
|
102
|
+
for (let i = 1; i < staticProperties.length; i++) {
|
|
103
|
+
const current = staticProperties[i];
|
|
104
|
+
const previous = staticProperties[i - 1];
|
|
105
|
+
if (!areInSameGroup(current.name, previous.name, groups)) {
|
|
106
|
+
// Check if there's a gap that should be filled
|
|
107
|
+
// Note: This code path is rarely reachable because staticProperties already
|
|
108
|
+
// contains all static properties with valid names in member order.
|
|
109
|
+
for (let j = previous.index + 1; j < current.index; j++) {
|
|
110
|
+
const member = members[j];
|
|
111
|
+
/* v8 ignore start */
|
|
112
|
+
if (isStaticProperty(member)) {
|
|
113
|
+
const name = getPropertyName(member);
|
|
114
|
+
if (name && shouldBeBetween(name, previous.name, current.name, groups)) {
|
|
115
|
+
context.report({
|
|
116
|
+
node: getPropertyKeyNode(current.node),
|
|
117
|
+
messageId: 'staticPropertyPlacement',
|
|
118
|
+
});
|
|
119
|
+
return;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
/* v8 ignore stop */
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
function isStaticProperty(member) {
|
|
128
|
+
return (
|
|
129
|
+
// Handle PropertyDefinition and MethodDefinition
|
|
130
|
+
(member.type === 'PropertyDefinition' || member.type === 'MethodDefinition') &&
|
|
131
|
+
member.static);
|
|
132
|
+
}
|
|
133
|
+
function getPropertyName(member) {
|
|
134
|
+
if (member.key.type === 'Identifier') {
|
|
135
|
+
return member.key.name;
|
|
136
|
+
}
|
|
137
|
+
return null;
|
|
138
|
+
}
|
|
139
|
+
/* v8 ignore start - only used in unreachable code path above */
|
|
140
|
+
function getPropertyKeyNode(member) {
|
|
141
|
+
return member.key;
|
|
142
|
+
}
|
|
143
|
+
/* v8 ignore stop */
|
|
144
|
+
function areInSameGroup(name1, name2, groups) {
|
|
145
|
+
for (const group of groups) {
|
|
146
|
+
if (group.properties.includes(name1) && group.properties.includes(name2)) {
|
|
147
|
+
return true;
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
return false;
|
|
151
|
+
}
|
|
152
|
+
/* v8 ignore start - only used in unreachable code path above */
|
|
153
|
+
function shouldBeBetween(name, before, after, groups) {
|
|
154
|
+
for (const group of groups) {
|
|
155
|
+
const beforeIndex = group.properties.indexOf(before);
|
|
156
|
+
const afterIndex = group.properties.indexOf(after);
|
|
157
|
+
const nameIndex = group.properties.indexOf(name);
|
|
158
|
+
if (beforeIndex !== -1 && afterIndex !== -1 && nameIndex !== -1) {
|
|
159
|
+
return nameIndex > beforeIndex && nameIndex < afterIndex;
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
return false;
|
|
163
|
+
}
|
|
164
|
+
/* v8 ignore stop */
|
|
165
|
+
},
|
|
166
|
+
});
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2025 Ofri Peretz
|
|
3
|
+
* Licensed under the MIT License. Use of this source code is governed by the
|
|
4
|
+
* MIT license that can be found in the LICENSE file.
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* ESLint Rule: void-dom-elements-no-children
|
|
8
|
+
* Prevent void DOM elements (like <img>, <br>, <input>) from having children
|
|
9
|
+
*
|
|
10
|
+
* @see https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/void-dom-elements-no-children.md
|
|
11
|
+
*/
|
|
12
|
+
import type { TSESLint } from '@interlace/eslint-devkit';
|
|
13
|
+
export declare const voidDomElementsNoChildren: TSESLint.RuleModule<"voidNoChildren", [], unknown, TSESLint.RuleListener> & {
|
|
14
|
+
name: string;
|
|
15
|
+
};
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Copyright (c) 2025 Ofri Peretz
|
|
4
|
+
* Licensed under the MIT License. Use of this source code is governed by the
|
|
5
|
+
* MIT license that can be found in the LICENSE file.
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.voidDomElementsNoChildren = void 0;
|
|
9
|
+
const eslint_devkit_1 = require("@interlace/eslint-devkit");
|
|
10
|
+
const eslint_devkit_2 = require("@interlace/eslint-devkit");
|
|
11
|
+
// HTML void elements that cannot have children
|
|
12
|
+
const VOID_ELEMENTS = new Set([
|
|
13
|
+
'area',
|
|
14
|
+
'base',
|
|
15
|
+
'br',
|
|
16
|
+
'col',
|
|
17
|
+
'embed',
|
|
18
|
+
'hr',
|
|
19
|
+
'img',
|
|
20
|
+
'input',
|
|
21
|
+
'keygen',
|
|
22
|
+
'link',
|
|
23
|
+
'meta',
|
|
24
|
+
'param',
|
|
25
|
+
'source',
|
|
26
|
+
'track',
|
|
27
|
+
'wbr',
|
|
28
|
+
]);
|
|
29
|
+
exports.voidDomElementsNoChildren = (0, eslint_devkit_2.createRule)({
|
|
30
|
+
name: 'void-dom-elements-no-children',
|
|
31
|
+
meta: {
|
|
32
|
+
type: 'problem',
|
|
33
|
+
docs: {
|
|
34
|
+
description: 'Prevent void DOM elements from having children',
|
|
35
|
+
},
|
|
36
|
+
messages: {
|
|
37
|
+
voidNoChildren: (0, eslint_devkit_1.formatLLMMessage)({
|
|
38
|
+
icon: eslint_devkit_1.MessageIcons.WARNING,
|
|
39
|
+
issueName: 'Void Element with Children',
|
|
40
|
+
description: '<{{element}}> is a void element and cannot have children or dangerouslySetInnerHTML',
|
|
41
|
+
severity: 'HIGH',
|
|
42
|
+
fix: 'Remove children from the void element or use a different element',
|
|
43
|
+
documentationLink: 'https://developer.mozilla.org/en-US/docs/Glossary/Void_element',
|
|
44
|
+
}),
|
|
45
|
+
},
|
|
46
|
+
schema: [],
|
|
47
|
+
},
|
|
48
|
+
defaultOptions: [],
|
|
49
|
+
create(context) {
|
|
50
|
+
function hasChildrenProp(node) {
|
|
51
|
+
return node.attributes.some((attr) => attr.type === 'JSXAttribute' &&
|
|
52
|
+
attr.name.type === 'JSXIdentifier' &&
|
|
53
|
+
attr.name.name === 'children');
|
|
54
|
+
}
|
|
55
|
+
function hasDangerouslySetInnerHTML(node) {
|
|
56
|
+
return node.attributes.some((attr) => attr.type === 'JSXAttribute' &&
|
|
57
|
+
attr.name.type === 'JSXIdentifier' &&
|
|
58
|
+
attr.name.name === 'dangerouslySetInnerHTML');
|
|
59
|
+
}
|
|
60
|
+
function hasJSXChildren(node) {
|
|
61
|
+
return node.children.some(child => {
|
|
62
|
+
if (child.type === 'JSXText') {
|
|
63
|
+
return !/^\s*$/.test(child.value);
|
|
64
|
+
}
|
|
65
|
+
if (child.type === 'JSXExpressionContainer') {
|
|
66
|
+
return child.expression.type !== 'JSXEmptyExpression';
|
|
67
|
+
}
|
|
68
|
+
return true;
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
return {
|
|
72
|
+
JSXElement(node) {
|
|
73
|
+
const openingElement = node.openingElement;
|
|
74
|
+
if (openingElement.name.type !== 'JSXIdentifier')
|
|
75
|
+
return;
|
|
76
|
+
const elementName = openingElement.name.name.toLowerCase();
|
|
77
|
+
if (!VOID_ELEMENTS.has(elementName))
|
|
78
|
+
return;
|
|
79
|
+
const hasChildren = hasChildrenProp(openingElement) ||
|
|
80
|
+
hasDangerouslySetInnerHTML(openingElement) ||
|
|
81
|
+
hasJSXChildren(node);
|
|
82
|
+
if (hasChildren) {
|
|
83
|
+
context.report({
|
|
84
|
+
node: openingElement,
|
|
85
|
+
messageId: 'voidNoChildren',
|
|
86
|
+
data: {
|
|
87
|
+
element: elementName,
|
|
88
|
+
},
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
};
|
|
93
|
+
},
|
|
94
|
+
});
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2025 Ofri Peretz
|
|
3
|
+
* Licensed under the MIT License. Use of this source code is governed by the
|
|
4
|
+
* MIT license that can be found in the LICENSE file.
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Simplified type barrel for eslint-plugin-react-features.
|
|
8
|
+
* Many legacy/moved rules previously referenced here were removed or relocated.
|
|
9
|
+
* To keep the package compiling and avoid broken imports, we provide placeholder
|
|
10
|
+
* option types for consumers. Update with concrete rule option types as needed.
|
|
11
|
+
*/
|
|
12
|
+
type GenericRuleOptions = Record<string, unknown>;
|
|
13
|
+
export type NoExternalApiCallsInUtilsOptions = GenericRuleOptions;
|
|
14
|
+
export type ConsistentExistenceIndexCheckOptions = GenericRuleOptions;
|
|
15
|
+
export type PreferEventTargetOptions = GenericRuleOptions;
|
|
16
|
+
export type PreferAtOptions = GenericRuleOptions;
|
|
17
|
+
export type NoUnreadableIifeOptions = GenericRuleOptions;
|
|
18
|
+
export type NoAwaitInLoopOptions = GenericRuleOptions;
|
|
19
|
+
export type CognitiveComplexityOptions = GenericRuleOptions;
|
|
20
|
+
export type NestedComplexityHotspotsOptions = GenericRuleOptions;
|
|
21
|
+
export type NoDeprecatedApiOptions = GenericRuleOptions;
|
|
22
|
+
export type NoConsoleLogOptions = GenericRuleOptions;
|
|
23
|
+
export type PreferDependencyVersionStrategyOptions = GenericRuleOptions;
|
|
24
|
+
export type EnforceNamingOptions = GenericRuleOptions;
|
|
25
|
+
export type DddAnemicDomainModelOptions = GenericRuleOptions;
|
|
26
|
+
export type DddValueObjectImmutabilityOptions = GenericRuleOptions;
|
|
27
|
+
export type IdenticalFunctionsOptions = GenericRuleOptions;
|
|
28
|
+
export type ReactClassToHooksOptions = GenericRuleOptions;
|
|
29
|
+
export type ReactNoInlineFunctionsOptions = GenericRuleOptions;
|
|
30
|
+
export type NoBlockingOperationsOptions = GenericRuleOptions;
|
|
31
|
+
export type NoMemoryLeakListenersOptions = GenericRuleOptions;
|
|
32
|
+
export type NoUnboundedCacheOptions = GenericRuleOptions;
|
|
33
|
+
export type NoUnnecessaryRerendersOptions = GenericRuleOptions;
|
|
34
|
+
export type DetectNPlusOneQueriesOptions = GenericRuleOptions;
|
|
35
|
+
export type ReactRenderOptimizationOptions = GenericRuleOptions;
|
|
36
|
+
export type EnforceRestConventionsOptions = GenericRuleOptions;
|
|
37
|
+
export type RequiredAttributesOptions = GenericRuleOptions;
|
|
38
|
+
export type JsxKeyOptions = GenericRuleOptions;
|
|
39
|
+
export type NoDirectMutationStateOptions = GenericRuleOptions;
|
|
40
|
+
export type RequireOptimizationOptions = GenericRuleOptions;
|
|
41
|
+
export type CheckedRequiresOnchangeOrReadonlyOptions = GenericRuleOptions;
|
|
42
|
+
export type NoCommentedCodeOptions = GenericRuleOptions;
|
|
43
|
+
export type MaxParametersOptions = GenericRuleOptions;
|
|
44
|
+
export type NoMissingNullChecksOptions = GenericRuleOptions;
|
|
45
|
+
export type NoUnsafeTypeNarrowingOptions = GenericRuleOptions;
|
|
46
|
+
export type NoUnhandledPromiseOptions = GenericRuleOptions;
|
|
47
|
+
export type NoSilentErrorsOptions = GenericRuleOptions;
|
|
48
|
+
export type NoMissingErrorContextOptions = GenericRuleOptions;
|
|
49
|
+
/**
|
|
50
|
+
* Combined type for all rule options (placeholder).
|
|
51
|
+
* Extend with concrete rule option shapes as rules are added.
|
|
52
|
+
*/
|
|
53
|
+
export type AllRulesOptions = Record<string, GenericRuleOptions>;
|
|
54
|
+
export {};
|