oxlint-plugin-react-doctor 0.5.6-dev.5b742fa → 0.5.6-dev.6b8e756
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 +10 -12
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3085,7 +3085,7 @@ const artifactBaasAuthoritySurface = defineRule({
|
|
|
3085
3085
|
scan: scanByPattern({
|
|
3086
3086
|
shouldScan: (file) => isBrowserArtifactPath(file.relativePath, file.isGeneratedBundle),
|
|
3087
3087
|
pattern: /\b(?:collection\s*\(\s*["'](?:boosts|sessions|sessions_admin|users|orgs|candidateJobs|conversations|documents|profiles)|from\s*\(\s*["'](?:users|profiles|documents|organizations|memberships)|creatorID|creatorId|providerId|ghostOrg|ownerId|orgId|tenantId|workspaceId|role|roles|isAdmin|SuperAdmin)\b/i,
|
|
3088
|
-
requireAll: [/\b(?:initializeApp|firebase|firestore|getFirestore
|
|
3088
|
+
requireAll: [/\b(?:initializeApp|firebase|firestore|getFirestore)\b[\s\S]{0,700}\b(?:apiKey|authDomain|projectId|databaseURL|storageBucket)\b|\b(?:apiKey|authDomain|projectId|databaseURL|storageBucket)\b[\s\S]{0,700}\b(?:firebase|firestore|getFirestore|initializeApp)\b|\bcreateClient\b[\s\S]{0,700}\b(?:supabase|SUPABASE_URL)\b|\b(?:supabase|SUPABASE_URL)\b[\s\S]{0,700}\bcreateClient\b/i],
|
|
3089
3089
|
message: "A browser artifact exposes Firebase/Supabase config together with sensitive collections or authorization fields."
|
|
3090
3090
|
})
|
|
3091
3091
|
});
|
|
@@ -36072,13 +36072,7 @@ const serverNoMutableModuleState = defineRule({
|
|
|
36072
36072
|
const collectDeclaredNames = (declaration) => {
|
|
36073
36073
|
const names = /* @__PURE__ */ new Set();
|
|
36074
36074
|
if (!isNodeOfType(declaration, "VariableDeclaration")) return names;
|
|
36075
|
-
for (const declarator of declaration.declarations ?? [])
|
|
36076
|
-
else if (isNodeOfType(declarator.id, "ObjectPattern")) {
|
|
36077
|
-
for (const property of declarator.id.properties ?? []) if (isNodeOfType(property, "Property") && isNodeOfType(property.value, "Identifier")) names.add(property.value.name);
|
|
36078
|
-
else if (isNodeOfType(property, "RestElement") && isNodeOfType(property.argument, "Identifier")) names.add(property.argument.name);
|
|
36079
|
-
} else if (isNodeOfType(declarator.id, "ArrayPattern")) {
|
|
36080
|
-
for (const element of declarator.id.elements ?? []) if (isNodeOfType(element, "Identifier")) names.add(element.name);
|
|
36081
|
-
}
|
|
36075
|
+
for (const declarator of declaration.declarations ?? []) collectPatternNames(declarator.id, names);
|
|
36082
36076
|
return names;
|
|
36083
36077
|
};
|
|
36084
36078
|
const declarationStartsWithAwait = (declaration) => {
|
|
@@ -36088,11 +36082,15 @@ const declarationStartsWithAwait = (declaration) => {
|
|
|
36088
36082
|
};
|
|
36089
36083
|
const declarationReadsAnyName = (declaration, names) => {
|
|
36090
36084
|
if (names.size === 0) return false;
|
|
36085
|
+
if (!isNodeOfType(declaration, "VariableDeclaration")) return false;
|
|
36091
36086
|
let didRead = false;
|
|
36092
|
-
|
|
36093
|
-
if (
|
|
36094
|
-
|
|
36095
|
-
|
|
36087
|
+
for (const declarator of declaration.declarations ?? []) {
|
|
36088
|
+
if (!declarator.init) continue;
|
|
36089
|
+
walkAst(declarator.init, (child) => {
|
|
36090
|
+
if (didRead) return;
|
|
36091
|
+
if (isNodeOfType(child, "Identifier") && names.has(child.name)) didRead = true;
|
|
36092
|
+
});
|
|
36093
|
+
}
|
|
36096
36094
|
return didRead;
|
|
36097
36095
|
};
|
|
36098
36096
|
const serverSequentialIndependentAwait = defineRule({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "oxlint-plugin-react-doctor",
|
|
3
|
-
"version": "0.5.6-dev.
|
|
3
|
+
"version": "0.5.6-dev.6b8e756",
|
|
4
4
|
"description": "oxlint plugin for React Doctor: diagnose React codebases for security, performance, correctness, accessibility, bundle-size, and architecture issues",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"accessibility",
|