eslint-plugin-firebase-ai-logic 1.4.0 → 1.5.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/dist/index.js +1 -1
- package/dist/rules/prefer-count-tokens.d.ts +4 -0
- package/dist/rules/prefer-count-tokens.d.ts.map +1 -1
- package/dist/rules/prefer-count-tokens.js +42 -4
- package/dist/rules/prefer-count-tokens.js.map +1 -1
- package/dist/rules/require-error-handling.d.ts +6 -0
- package/dist/rules/require-error-handling.d.ts.map +1 -1
- package/dist/rules/require-error-handling.js +107 -1
- package/dist/rules/require-error-handling.js.map +1 -1
- package/dist/rules/validate-schema-structure.d.ts +8 -3
- package/dist/rules/validate-schema-structure.d.ts.map +1 -1
- package/dist/rules/validate-schema-structure.js +12 -6
- package/dist/rules/validate-schema-structure.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -20,6 +20,10 @@ import type { Rule } from 'eslint';
|
|
|
20
20
|
* 2. Risk exceeding context window limits
|
|
21
21
|
* 3. Benefit from cost estimation before sending
|
|
22
22
|
*
|
|
23
|
+
* IGNORED PATTERNS:
|
|
24
|
+
* - Arrays containing functionResponse (these are function call responses)
|
|
25
|
+
* - System instructions (static, known at dev time)
|
|
26
|
+
*
|
|
23
27
|
* @see https://ai.google.dev/gemini-api/docs/tokens
|
|
24
28
|
* @see https://ai.google.dev/gemini-api/docs/pricing
|
|
25
29
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prefer-count-tokens.d.ts","sourceRoot":"","sources":["../../src/rules/prefer-count-tokens.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAGnC
|
|
1
|
+
{"version":3,"file":"prefer-count-tokens.d.ts","sourceRoot":"","sources":["../../src/rules/prefer-count-tokens.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAGnC;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,UA8JhB,CAAC;AAEF,eAAe,IAAI,CAAC"}
|
|
@@ -22,6 +22,10 @@ const ast_helpers_js_1 = require("../utils/ast-helpers.js");
|
|
|
22
22
|
* 2. Risk exceeding context window limits
|
|
23
23
|
* 3. Benefit from cost estimation before sending
|
|
24
24
|
*
|
|
25
|
+
* IGNORED PATTERNS:
|
|
26
|
+
* - Arrays containing functionResponse (these are function call responses)
|
|
27
|
+
* - System instructions (static, known at dev time)
|
|
28
|
+
*
|
|
25
29
|
* @see https://ai.google.dev/gemini-api/docs/tokens
|
|
26
30
|
* @see https://ai.google.dev/gemini-api/docs/pricing
|
|
27
31
|
*/
|
|
@@ -42,6 +46,16 @@ const rule = {
|
|
|
42
46
|
default: 2000,
|
|
43
47
|
description: 'Character length threshold to suggest token counting (default: 2000 chars ≈ 500 tokens)',
|
|
44
48
|
},
|
|
49
|
+
ignoreArraysWithFunctionResponse: {
|
|
50
|
+
type: 'boolean',
|
|
51
|
+
default: true,
|
|
52
|
+
description: 'Ignore arrays that contain functionResponse (these are function call responses, not user prompts)',
|
|
53
|
+
},
|
|
54
|
+
warnOnMultimodalArrays: {
|
|
55
|
+
type: 'boolean',
|
|
56
|
+
default: true,
|
|
57
|
+
description: 'Warn when arrays are passed (may contain images that consume many tokens)',
|
|
58
|
+
},
|
|
45
59
|
},
|
|
46
60
|
additionalProperties: false,
|
|
47
61
|
},
|
|
@@ -56,6 +70,8 @@ const rule = {
|
|
|
56
70
|
// Default threshold: 2000 chars ≈ 500 tokens
|
|
57
71
|
// This is a reasonable threshold where token counting becomes useful
|
|
58
72
|
const promptLengthThreshold = options.promptLengthThreshold ?? 2000;
|
|
73
|
+
const ignoreArraysWithFunctionResponse = options.ignoreArraysWithFunctionResponse !== false;
|
|
74
|
+
const warnOnMultimodalArrays = options.warnOnMultimodalArrays !== false;
|
|
59
75
|
// Track if countTokens was called in the same scope
|
|
60
76
|
const scopesWithCountTokens = new Set();
|
|
61
77
|
function getScopeKey(node) {
|
|
@@ -108,11 +124,33 @@ const rule = {
|
|
|
108
124
|
// Add estimated expression length (rough estimate)
|
|
109
125
|
promptLength += promptArg.expressions.length * 50;
|
|
110
126
|
}
|
|
111
|
-
// Array of parts (multimodal)
|
|
127
|
+
// Array of parts (multimodal or function responses)
|
|
112
128
|
if (promptArg.type === 'ArrayExpression') {
|
|
113
|
-
//
|
|
114
|
-
//
|
|
115
|
-
|
|
129
|
+
// Check if array contains functionResponse
|
|
130
|
+
// Pattern: [{ functionResponse: { ... } }]
|
|
131
|
+
if (ignoreArraysWithFunctionResponse) {
|
|
132
|
+
const hasFunctionResponse = promptArg.elements.some((el) => {
|
|
133
|
+
if (!el || el.type !== 'ObjectExpression')
|
|
134
|
+
return false;
|
|
135
|
+
return el.properties.some((prop) => {
|
|
136
|
+
if (prop.type !== 'Property')
|
|
137
|
+
return false;
|
|
138
|
+
if (prop.key.type === 'Identifier' && prop.key.name === 'functionResponse') {
|
|
139
|
+
return true;
|
|
140
|
+
}
|
|
141
|
+
return false;
|
|
142
|
+
});
|
|
143
|
+
});
|
|
144
|
+
if (hasFunctionResponse) {
|
|
145
|
+
// This is a function call response, not a user prompt
|
|
146
|
+
// Skip - these are controlled responses, not user input
|
|
147
|
+
return;
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
// For other arrays (multimodal with images), suggest counting tokens
|
|
151
|
+
if (warnOnMultimodalArrays) {
|
|
152
|
+
promptLength = promptLengthThreshold + 1; // Force suggestion
|
|
153
|
+
}
|
|
116
154
|
}
|
|
117
155
|
if (promptLength > promptLengthThreshold) {
|
|
118
156
|
context.report({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prefer-count-tokens.js","sourceRoot":"","sources":["../../src/rules/prefer-count-tokens.ts"],"names":[],"mappings":";;AACA,4DAAwE;AAExE
|
|
1
|
+
{"version":3,"file":"prefer-count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,OAAO,KAAK,CAAC;gCACf,CAAC,CAAC,CAAC;4BACL,CAAC,CAAC,CAAC;4BAEH,IAAI,mBAAmB,EAAE,CAAC;gCACxB,sDAAsD;gCACtD,wDAAwD;gCACxD,OAAO;4BACT,CAAC;wBACH,CAAC;wBAED,qEAAqE;wBACrE,IAAI,sBAAsB,EAAE,CAAC;4BAC3B,YAAY,GAAG,qBAAqB,GAAG,CAAC,CAAC,CAAC,mBAAmB;wBAC/D,CAAC;oBACH,CAAC;oBAED,IAAI,YAAY,GAAG,qBAAqB,EAAE,CAAC;wBACzC,OAAO,CAAC,MAAM,CAAC;4BACb,IAAI;4BACJ,SAAS,EAAE,yBAAyB;4BACpC,IAAI,EAAE;gCACJ,MAAM,EAAE,YAAY,CAAC,QAAQ,EAAE;6BAChC;yBACF,CAAC,CAAC;oBACL,CAAC;gBACH,CAAC;YACH,CAAC;SACF,CAAC;IACJ,CAAC;CACF,CAAC;AAEF,kBAAe,IAAI,CAAC"}
|
|
@@ -16,12 +16,18 @@ import type { Rule } from 'eslint';
|
|
|
16
16
|
* - executeWithRetry
|
|
17
17
|
* 5. Async generators (errors propagate to consumer's try/catch)
|
|
18
18
|
* 6. Class methods that are async generators
|
|
19
|
+
* 7. Calls prefixed with "void" operator (fire-and-forget pattern)
|
|
19
20
|
*
|
|
20
21
|
* The rule checks if the API call is:
|
|
21
22
|
* - Inside a try/catch block
|
|
22
23
|
* - Chained with .catch()
|
|
23
24
|
* - Wrapped in a known error-handling function
|
|
24
25
|
* - Inside an async generator (errors propagate to consumer)
|
|
26
|
+
* - Called with "void" operator (assumes internal error handling)
|
|
27
|
+
*
|
|
28
|
+
* OPTIONS:
|
|
29
|
+
* - ignoreVoidCalls (boolean, default: true): Ignore calls with "void" operator
|
|
30
|
+
* - ignoreCallers (string[], default: []): Function names to ignore
|
|
25
31
|
*/
|
|
26
32
|
declare const rule: Rule.RuleModule;
|
|
27
33
|
export default rule;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"require-error-handling.d.ts","sourceRoot":"","sources":["../../src/rules/require-error-handling.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAGnC
|
|
1
|
+
{"version":3,"file":"require-error-handling.d.ts","sourceRoot":"","sources":["../../src/rules/require-error-handling.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAGnC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,UAiUhB,CAAC;AAEF,eAAe,IAAI,CAAC"}
|
|
@@ -18,12 +18,18 @@ const ast_helpers_js_1 = require("../utils/ast-helpers.js");
|
|
|
18
18
|
* - executeWithRetry
|
|
19
19
|
* 5. Async generators (errors propagate to consumer's try/catch)
|
|
20
20
|
* 6. Class methods that are async generators
|
|
21
|
+
* 7. Calls prefixed with "void" operator (fire-and-forget pattern)
|
|
21
22
|
*
|
|
22
23
|
* The rule checks if the API call is:
|
|
23
24
|
* - Inside a try/catch block
|
|
24
25
|
* - Chained with .catch()
|
|
25
26
|
* - Wrapped in a known error-handling function
|
|
26
27
|
* - Inside an async generator (errors propagate to consumer)
|
|
28
|
+
* - Called with "void" operator (assumes internal error handling)
|
|
29
|
+
*
|
|
30
|
+
* OPTIONS:
|
|
31
|
+
* - ignoreVoidCalls (boolean, default: true): Ignore calls with "void" operator
|
|
32
|
+
* - ignoreCallers (string[], default: []): Function names to ignore
|
|
27
33
|
*/
|
|
28
34
|
const rule = {
|
|
29
35
|
meta: {
|
|
@@ -33,7 +39,25 @@ const rule = {
|
|
|
33
39
|
recommended: true,
|
|
34
40
|
url: 'https://github.com/Just-mpm/eslint-plugin-firebase-ai-logic#require-error-handling',
|
|
35
41
|
},
|
|
36
|
-
schema: [
|
|
42
|
+
schema: [
|
|
43
|
+
{
|
|
44
|
+
type: 'object',
|
|
45
|
+
properties: {
|
|
46
|
+
ignoreVoidCalls: {
|
|
47
|
+
type: 'boolean',
|
|
48
|
+
default: true,
|
|
49
|
+
description: 'Ignore calls prefixed with "void" operator. These typically call functions that handle errors internally.',
|
|
50
|
+
},
|
|
51
|
+
ignoreCallers: {
|
|
52
|
+
type: 'array',
|
|
53
|
+
items: { type: 'string' },
|
|
54
|
+
default: [],
|
|
55
|
+
description: 'Function names to ignore when they call API methods (e.g., ["sendMessage", "handleSubmit"]). Useful for wrapper functions with internal error handling.',
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
additionalProperties: false,
|
|
59
|
+
},
|
|
60
|
+
],
|
|
37
61
|
messages: {
|
|
38
62
|
missingErrorHandling: "Firebase AI Logic API call '{{ method }}' should be wrapped in try/catch to handle errors, especially 429 rate limit errors.",
|
|
39
63
|
suggest429Handling: 'Implement exponential backoff with jitter for 429 errors: delay = Math.pow(2, attempt) * 1000 + Math.random() * 1000',
|
|
@@ -41,6 +65,9 @@ const rule = {
|
|
|
41
65
|
},
|
|
42
66
|
},
|
|
43
67
|
create(context) {
|
|
68
|
+
const options = context.options[0] ?? {};
|
|
69
|
+
const ignoreVoidCalls = options.ignoreVoidCalls !== false; // Default true
|
|
70
|
+
const ignoreCallers = options.ignoreCallers ?? [];
|
|
44
71
|
// Methods that make API calls and should have error handling
|
|
45
72
|
const apiMethods = [
|
|
46
73
|
'generateContent',
|
|
@@ -156,6 +183,77 @@ const rule = {
|
|
|
156
183
|
}
|
|
157
184
|
return false;
|
|
158
185
|
}
|
|
186
|
+
/**
|
|
187
|
+
* Check if the call is wrapped with the "void" operator.
|
|
188
|
+
* Pattern: void sendMessage(msg)
|
|
189
|
+
*
|
|
190
|
+
* When using "void", developers intentionally fire-and-forget,
|
|
191
|
+
* meaning error handling is expected to be inside the called function.
|
|
192
|
+
*/
|
|
193
|
+
function isVoidCall(node) {
|
|
194
|
+
const parent = node.parent;
|
|
195
|
+
if (!parent)
|
|
196
|
+
return false;
|
|
197
|
+
// Direct void: void sendMessage()
|
|
198
|
+
if (parent.type === 'UnaryExpression') {
|
|
199
|
+
const unary = parent;
|
|
200
|
+
if (unary.operator === 'void') {
|
|
201
|
+
return true;
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
// void wrapper(): void wrapperFn() where wrapperFn calls sendMessage
|
|
205
|
+
// Check if we're inside a function that's called with void
|
|
206
|
+
let current = parent;
|
|
207
|
+
while (current) {
|
|
208
|
+
if (current.type === 'ArrowFunctionExpression' ||
|
|
209
|
+
current.type === 'FunctionExpression') {
|
|
210
|
+
const funcParent = current.parent;
|
|
211
|
+
if (funcParent?.type === 'CallExpression') {
|
|
212
|
+
const callParent = funcParent.parent;
|
|
213
|
+
if (callParent?.type === 'UnaryExpression') {
|
|
214
|
+
const unary = callParent;
|
|
215
|
+
if (unary.operator === 'void') {
|
|
216
|
+
return true;
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
current = current.parent ?? null;
|
|
222
|
+
}
|
|
223
|
+
return false;
|
|
224
|
+
}
|
|
225
|
+
/**
|
|
226
|
+
* Check if the API call is inside a caller function that should be ignored.
|
|
227
|
+
* This handles the pattern where a wrapper function (e.g., sendMessage in a hook)
|
|
228
|
+
* has internal error handling, and is called from elsewhere.
|
|
229
|
+
*/
|
|
230
|
+
function isInsideIgnoredCaller(node) {
|
|
231
|
+
if (ignoreCallers.length === 0)
|
|
232
|
+
return false;
|
|
233
|
+
let current = node.parent ?? null;
|
|
234
|
+
while (current) {
|
|
235
|
+
// Check for function declaration with matching name
|
|
236
|
+
if (current.type === 'FunctionDeclaration') {
|
|
237
|
+
const funcDecl = current;
|
|
238
|
+
if (funcDecl.id && ignoreCallers.includes(funcDecl.id.name)) {
|
|
239
|
+
return true;
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
// Check for variable declaration: const sendMessage = async () => { ... }
|
|
243
|
+
if (current.type === 'ArrowFunctionExpression' ||
|
|
244
|
+
current.type === 'FunctionExpression') {
|
|
245
|
+
const funcParent = current.parent;
|
|
246
|
+
if (funcParent?.type === 'VariableDeclarator') {
|
|
247
|
+
const varDecl = funcParent;
|
|
248
|
+
if (varDecl.id && ignoreCallers.includes(varDecl.id.name)) {
|
|
249
|
+
return true;
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
current = current.parent ?? null;
|
|
254
|
+
}
|
|
255
|
+
return false;
|
|
256
|
+
}
|
|
159
257
|
return {
|
|
160
258
|
CallExpression(node) {
|
|
161
259
|
const calleeName = (0, ast_helpers_js_1.getCalleeName)(node);
|
|
@@ -164,6 +262,14 @@ const rule = {
|
|
|
164
262
|
}
|
|
165
263
|
// Check if this is an awaited call
|
|
166
264
|
const isAwaited = node.parent?.type === 'AwaitExpression';
|
|
265
|
+
// Check for void operator (fire-and-forget pattern)
|
|
266
|
+
if (ignoreVoidCalls && isVoidCall(node)) {
|
|
267
|
+
return;
|
|
268
|
+
}
|
|
269
|
+
// Check if inside an ignored caller function
|
|
270
|
+
if (isInsideIgnoredCaller(node)) {
|
|
271
|
+
return;
|
|
272
|
+
}
|
|
167
273
|
// Check if inside try/catch, has .catch(), inside error handling wrapper,
|
|
168
274
|
// or inside an async generator (which propagates errors to consumer)
|
|
169
275
|
const hasErrorHandling = isInsideTryCatch(node) ||
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"require-error-handling.js","sourceRoot":"","sources":["../../src/rules/require-error-handling.ts"],"names":[],"mappings":";;AACA,4DAAwD;AAExD
|
|
1
|
+
{"version":3,"file":"require-error-handling.js","sourceRoot":"","sources":["../../src/rules/require-error-handling.ts"],"names":[],"mappings":";;AACA,4DAAwD;AAExD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,MAAM,IAAI,GAAoB;IAC5B,IAAI,EAAE;QACJ,IAAI,EAAE,YAAY;QAClB,IAAI,EAAE;YACJ,WAAW,EACT,gGAAgG;YAClG,WAAW,EAAE,IAAI;YACjB,GAAG,E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;gBAED,OAAO,GAAK,OAAkC,CAAC,MAAgC,IAAI,IAAI,CAAC;YAC1F,CAAC;YAED,OAAO,KAAK,CAAC;QACf,CAAC;QAED,OAAO;YACL,cAAc,CAAC,IAAI;gBACjB,MAAM,UAAU,GAAG,IAAA,8BAAa,EAAC,IAAI,CAAC,CAAC;gBAEvC,IAAI,CAAC,UAAU,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,UAAU,CAAC,EAAE,CAAC;oBACpD,OAAO;gBACT,CAAC;gBAED,mCAAmC;gBACnC,MAAM,SAAS,GAAG,IAAI,CAAC,MAAM,EAAE,IAAI,KAAK,iBAAiB,CAAC;gBAE1D,oDAAoD;gBACpD,IAAI,eAAe,IAAI,UAAU,CAAC,IAAiB,CAAC,EAAE,CAAC;oBACrD,OAAO;gBACT,CAAC;gBAED,6CAA6C;gBAC7C,IAAI,qBAAqB,CAAC,IAAiB,CAAC,EAAE,CAAC;oBAC7C,OAAO;gBACT,CAAC;gBAED,0EAA0E;gBAC1E,qEAAqE;gBACrE,MAAM,gBAAgB,GACpB,gBAAgB,CAAC,IAAiB,CAAC;oBACnC,0BAA0B,CAAC,IAAiB,CAAC;oBAC7C,4BAA4B,CAAC,IAAiB,CAAC;oBAC/C,sBAAsB,CAAC,IAAiB,CAAC,CAAC;gBAE5C,IAAI,CAAC,gBAAgB,EAAE,CAAC;oBACtB,OAAO,CAAC,MAAM,CAAC;wBACb,IAAI;wBACJ,SAAS,EAAE,SAAS,CAAC,CAAC,CAAC,sBAAsB,CAAC,CAAC,CAAC,sBAAsB;wBACtE,IAAI,EAAE;4BACJ,MAAM,EAAE,UAAU;yBACnB;qBACF,CAAC,CAAC;gBACL,CAAC;YACH,CAAC;SACF,CAAC;IACJ,CAAC;CACF,CAAC;AAEF,kBAAe,IAAI,CAAC"}
|
|
@@ -12,11 +12,16 @@ import type { Rule } from 'eslint';
|
|
|
12
12
|
* This rule should NOT report errors for using "required" in Schema.object()
|
|
13
13
|
* because it's a valid and common pattern for function calling parameters.
|
|
14
14
|
*
|
|
15
|
-
* The rule
|
|
15
|
+
* The rule only suggests (not warns) when using BOTH "required" AND
|
|
16
16
|
* "optionalProperties" in the same schema - which while redundant, is
|
|
17
|
-
* technically valid and can improve code clarity.
|
|
17
|
+
* technically valid and can improve code clarity/documentation.
|
|
18
18
|
*
|
|
19
|
-
*
|
|
19
|
+
* DEFAULT BEHAVIOR: Allows both "required" and "optionalProperties" because:
|
|
20
|
+
* 1. It's a valid pattern in Firebase AI SDK
|
|
21
|
+
* 2. It improves readability by being explicit
|
|
22
|
+
* 3. Many codebases use this pattern deliberately
|
|
23
|
+
*
|
|
24
|
+
* CONFIGURABLE: Set 'allowBothRequiredAndOptional' to false to enable warnings.
|
|
20
25
|
*/
|
|
21
26
|
declare const rule: Rule.RuleModule;
|
|
22
27
|
export default rule;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validate-schema-structure.d.ts","sourceRoot":"","sources":["../../src/rules/validate-schema-structure.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAGnC
|
|
1
|
+
{"version":3,"file":"validate-schema-structure.d.ts","sourceRoot":"","sources":["../../src/rules/validate-schema-structure.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAGnC;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,UA8DhB,CAAC;AAEF,eAAe,IAAI,CAAC"}
|
|
@@ -14,11 +14,16 @@ const ast_helpers_js_1 = require("../utils/ast-helpers.js");
|
|
|
14
14
|
* This rule should NOT report errors for using "required" in Schema.object()
|
|
15
15
|
* because it's a valid and common pattern for function calling parameters.
|
|
16
16
|
*
|
|
17
|
-
* The rule
|
|
17
|
+
* The rule only suggests (not warns) when using BOTH "required" AND
|
|
18
18
|
* "optionalProperties" in the same schema - which while redundant, is
|
|
19
|
-
* technically valid and can improve code clarity.
|
|
19
|
+
* technically valid and can improve code clarity/documentation.
|
|
20
20
|
*
|
|
21
|
-
*
|
|
21
|
+
* DEFAULT BEHAVIOR: Allows both "required" and "optionalProperties" because:
|
|
22
|
+
* 1. It's a valid pattern in Firebase AI SDK
|
|
23
|
+
* 2. It improves readability by being explicit
|
|
24
|
+
* 3. Many codebases use this pattern deliberately
|
|
25
|
+
*
|
|
26
|
+
* CONFIGURABLE: Set 'allowBothRequiredAndOptional' to false to enable warnings.
|
|
22
27
|
*/
|
|
23
28
|
const rule = {
|
|
24
29
|
meta: {
|
|
@@ -34,8 +39,8 @@ const rule = {
|
|
|
34
39
|
properties: {
|
|
35
40
|
allowBothRequiredAndOptional: {
|
|
36
41
|
type: 'boolean',
|
|
37
|
-
default:
|
|
38
|
-
description: 'Allow using both "required" and "optionalProperties" in the same schema',
|
|
42
|
+
default: true,
|
|
43
|
+
description: 'Allow using both "required" and "optionalProperties" in the same schema. Set to false to warn about redundancy.',
|
|
39
44
|
},
|
|
40
45
|
},
|
|
41
46
|
additionalProperties: false,
|
|
@@ -47,7 +52,8 @@ const rule = {
|
|
|
47
52
|
},
|
|
48
53
|
create(context) {
|
|
49
54
|
const options = context.options[0] ?? {};
|
|
50
|
-
|
|
55
|
+
// Default is true - allow both patterns since it's valid and improves readability
|
|
56
|
+
const allowBothRequiredAndOptional = options.allowBothRequiredAndOptional !== false;
|
|
51
57
|
return {
|
|
52
58
|
// Check for objects that have BOTH required AND optionalProperties
|
|
53
59
|
ObjectExpression(node) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validate-schema-structure.js","sourceRoot":"","sources":["../../src/rules/validate-schema-structure.ts"],"names":[],"mappings":";;AACA,4DAA0E;AAE1E
|
|
1
|
+
{"version":3,"file":"validate-schema-structure.js","sourceRoot":"","sources":["../../src/rules/validate-schema-structure.ts"],"names":[],"mappings":";;AACA,4DAA0E;AAE1E;;;;;;;;;;;;;;;;;;;;;;;GAuBG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IAAI,EAAE,qBAAqB,CAAC,GAAG;wBAC/B,SAAS,EAAE,kCAAkC;qBAC9C,CAAC,CAAC;gBACL,CAAC;YACH,CAAC;SACF,CAAC;IACJ,CAAC;CACF,CAAC;AAEF,kBAAe,IAAI,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-plugin-firebase-ai-logic",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.5.0",
|
|
4
4
|
"description": "ESLint plugin for Firebase AI Logic best practices, detecting deprecated imports, models, and common anti-patterns",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|