code-quality

Enforce TypeScript and JavaScript code quality standards in RedisInsight.

8.7k|482|Updated Jul 30, 2021
One-click install
npx skills add https://github.com/redis/RedisInsight --skill code-quality-redis
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: code-quality
Source: https://github.com/redis/RedisInsight/tree/main/.ai/skills/code-quality
Command: npx skills add https://github.com/redis/RedisInsight --skill code-quality-redis

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill reduces bugs and review churn by enforcing consistent TypeScript strictness, naming conventions, linting expectations, and import organization across the RedisInsight codebase.

Core Features & Use Cases

  • Enforces lint-first quality gates: Requires running yarn lint after changes and passing it before committing.
  • Standardizes TypeScript practices: Encourages TypeScript usage, discourages unexplained any, prefers interface for object shapes, and mandates explicit return types for non-obvious functions.
  • Improves maintainability through conventions: Covers naming (camelCase/PascalCase/UPPER_SNAKE_CASE), import ordering, DRY/constant extraction, and cognitive complexity guidance.
  • Supports reliable front-end dependency updates: Provides Vite cache clearing steps after package updates and dev-server restarts.

Quick Start

Apply these standards when updating or refactoring TypeScript/JavaScript code in RedisInsight, then run yarn lint and fix any reported ESLint/Prettier issues until the linter passes.

Frequently Asked Questions about code-quality

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I enforce TypeScript naming conventions and import order in my project?

Enforce TypeScript naming conventions and import order by applying strict alias-based import rules, using camelCase for variables, PascalCase for types, and UPPER_SNAKE_CASE for constants to ensure consistent code quality standards.

What is the best way to resolve ESLint and Prettier findings when refactoring TypeScript?

The best way to resolve ESLint and Prettier findings is to run `yarn lint` after your changes and fix all reported issues until the linter passes, ensuring your TypeScript and JavaScript code meets repository-wide quality standards.

Why does Vite cache cause issues after updating UI dependencies and how do I clear it?

Vite cache causes issues after updating UI dependencies because stale cached files conflict with new package versions; clear the Vite cache and restart the dev-server to ensure reliable front-end dependency updates.

Can I use `any` type in TypeScript if I explain the reasoning?

You can use `any` in TypeScript only with explicit justification, as unjustified `any` types are banned to reduce bugs; prefer using `interface` for object shapes and mandate explicit return types for non-obvious functions.

Does this code quality standard require running a linter before committing changes?

Yes, this code quality standard requires running `yarn lint` and passing it before committing, applying a lint-first quality gate during development, refactoring, and resolving ESLint or Prettier findings.