oxlint-plugin-react-doctor 0.6.2-dev.b4faf74 → 0.6.2
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 +3 -10
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3458,7 +3458,7 @@ const SECRET_UNAMBIGUOUS_PLACEHOLDER_VALUE_PATTERNS = [
|
|
|
3458
3458
|
];
|
|
3459
3459
|
const SECRET_CONTEXTUAL_PLACEHOLDER_VALUE_PATTERNS = [/(?:^|[_\-\s])(?:example|sample|dummy)(?:$|[_\-\s])/i];
|
|
3460
3460
|
const SECRET_PLACEHOLDER_CONTEXT_PATTERN = /(?:placeholder|example|sample|dummy|masked|redacted|mask)/i;
|
|
3461
|
-
const SECRET_VARIABLE_PATTERN = /(?:api_?key|secret|token|password|credential|auth
|
|
3461
|
+
const SECRET_VARIABLE_PATTERN = /(?:api_?key|secret|token|password|credential|auth)/i;
|
|
3462
3462
|
const SECRET_TOOLING_FILE_PATTERN = /(?:^|\/)[^/]+\.config\.[cm]?[jt]s$/;
|
|
3463
3463
|
const SECRET_TOOLING_RC_FILE_PATTERN = /(?:^|\/)(?:\.[a-z-]+rc|[a-z-]+\.rc)\.[cm]?[jt]s$/;
|
|
3464
3464
|
const SECRET_TEST_FILE_PATTERN = /(?:^|\/)[^/]+\.(?:test|spec|stories|story|fixture|fixtures)\.[cm]?[jt]sx?$/;
|
|
@@ -12529,7 +12529,6 @@ const KNOWN_SLOT_PROP_NAMES = new Set([
|
|
|
12529
12529
|
"bottomContent",
|
|
12530
12530
|
"leftContent",
|
|
12531
12531
|
"rightContent",
|
|
12532
|
-
"config",
|
|
12533
12532
|
"value",
|
|
12534
12533
|
"currentValue",
|
|
12535
12534
|
"form",
|
|
@@ -12668,10 +12667,6 @@ const SLOT_PROP_SUFFIXES = [
|
|
|
12668
12667
|
"Panel",
|
|
12669
12668
|
"Overlay",
|
|
12670
12669
|
"Shape",
|
|
12671
|
-
"Avatar",
|
|
12672
|
-
"Text",
|
|
12673
|
-
"State",
|
|
12674
|
-
"Zone",
|
|
12675
12670
|
"Override",
|
|
12676
12671
|
"Overrides",
|
|
12677
12672
|
"Items",
|
|
@@ -12688,8 +12683,6 @@ const SLOT_PROP_SUFFIXES = [
|
|
|
12688
12683
|
];
|
|
12689
12684
|
const isSlotPropName = (propName) => {
|
|
12690
12685
|
if (KNOWN_SLOT_PROP_NAMES.has(propName)) return true;
|
|
12691
|
-
const decapitalized = propName.charAt(0).toLowerCase() + propName.slice(1);
|
|
12692
|
-
if (decapitalized !== propName && KNOWN_SLOT_PROP_NAMES.has(decapitalized)) return true;
|
|
12693
12686
|
for (const suffix of SLOT_PROP_SUFFIXES) if (propName.length > suffix.length && propName.endsWith(suffix)) return true;
|
|
12694
12687
|
return false;
|
|
12695
12688
|
};
|
|
@@ -29735,10 +29728,10 @@ const onlyExportComponents = defineRule({
|
|
|
29735
29728
|
};
|
|
29736
29729
|
for (const child of componentCandidates) {
|
|
29737
29730
|
if (isNodeOfType(child, "FunctionDeclaration") && child.id) {
|
|
29738
|
-
if (isReactComponentName(child.id.name) && !isInsideExport(child)
|
|
29731
|
+
if (isReactComponentName(child.id.name) && !isInsideExport(child)) localComponents.push(child.id);
|
|
29739
29732
|
}
|
|
29740
29733
|
if (isNodeOfType(child, "VariableDeclarator") && isNodeOfType(child.id, "Identifier")) {
|
|
29741
|
-
if (isReactComponentName(child.id.name) && canBeReactFunctionComponent(child.init, state) && !isInsideExport(child)
|
|
29734
|
+
if (isReactComponentName(child.id.name) && canBeReactFunctionComponent(child.init, state) && !isInsideExport(child)) localComponents.push(child.id);
|
|
29742
29735
|
}
|
|
29743
29736
|
}
|
|
29744
29737
|
if (hasAnyExports && hasReactExport) for (const entry of exports) {
|