Skip to main content
Glama

MCP Agent TypeScript Port

by waldzellai
no-sparse-arrays.js1.2 kB
/** * @fileoverview Disallow sparse arrays * @author Nicholas C. Zakas */ "use strict"; //------------------------------------------------------------------------------ // Rule Definition //------------------------------------------------------------------------------ /** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "problem", docs: { description: "Disallow sparse arrays", recommended: true, url: "https://eslint.org/docs/latest/rules/no-sparse-arrays" }, schema: [], messages: { unexpectedSparseArray: "Unexpected comma in middle of array." } }, create(context) { //-------------------------------------------------------------------------- // Public //-------------------------------------------------------------------------- return { ArrayExpression(node) { const emptySpot = node.elements.includes(null); if (emptySpot) { context.report({ node, messageId: "unexpectedSparseArray" }); } } }; } };

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/waldzellai/mcp-agent-ts'

If you have feedback or need assistance with the MCP directory API, please join our Discord server