Building Real-Time Data Visualization Dashboards with TypeScript

Learn how to create interactive and real-time data visualization dashboards using TypeScript and D3.js.

0 likes
11 views

Rule Content

{
  "title": "Building Real-Time Data Visualization Dashboards with TypeScript",
  "description": "Learn how to create interactive and real-time data visualization dashboards using TypeScript and D3.js.",
  "category": "TypeScript Cursor Rules",
  "rules": [
    {
      "description": "Ensure strict type safety by avoiding the use of 'any'.",
      "pattern": "**/*.ts",
      "rule": "noImplicitAny"
    },
    {
      "description": "Use interfaces to define object shapes for better extensibility and readability.",
      "pattern": "**/*.ts",
      "rule": "preferInterfaces"
    },
    {
      "description": "Leverage TypeScript's utility types like 'Partial', 'Readonly', 'Pick', and 'Omit' to manipulate types effectively.",
      "pattern": "**/*.ts",
      "rule": "useUtilityTypes"
    },
    {
      "description": "Implement consistent error handling and success responses using ActionResponse.",
      "pattern": "**/*.ts",
      "rule": "consistentErrorHandling"
    },
    {
      "description": "Use descriptive variable names with auxiliary verbs (e.g., isLoading, hasError).",
      "pattern": "**/*.ts",
      "rule": "descriptiveVariableNames"
    },
    {
      "description": "Use arrow functions over anonymous function expressions for cleaner syntax.",
      "pattern": "**/*.ts",
      "rule": "preferArrowFunctions"
    },
    {
      "description": "Use 'const' where possible and 'let' otherwise; avoid 'var'.",
      "pattern": "**/*.ts",
      "rule": "noVarKeyword"
    },
    {
      "description": "Use 2 spaces per indentation; do not use tabs.",
      "pattern": "**/*.ts",
      "rule": "indentation"
    },
    {
      "description": "Use JSDoc comments to provide type information and describe the purpose of functions, classes, and variables.",
      "pattern": "**/*.ts",
      "rule": "useJSDocComments"
    },
    {
      "description": "Follow consistent naming conventions: PascalCase for classes, camelCase for variables and functions, kebab-case for files and directories.",
      "pattern": "**/*.ts",
      "rule": "namingConventions"
    }
  ]
}