Skip to main content

meaningful-identifiers

Naming guidance for callback parameters and local variables in TypeScript. Use when writing or refactoring loops, array callbacks (map/filter/find/reduce), or local accumulators.

Informações da origem

Repositório
hashintel/hash
Última atividade na origem
1 de setembro de 2026 às 07:54
Idioma detectado do SKILL.md
inglês
Estrelas
1.666
Forks
123

Opções de instalação

Por padrão, está selecionado o prompt que primeiro revisa a origem. Você pode mudar para um comando direto ou baixar uma cópia local.

Revise os arquivos de origem

Leia o SKILL.md e os arquivos complementares exibidos pelo SkillsMP antes de decidir se vai instalar.

Exibindo SKILL.md

SKILL.md
Instruções da origem · Visualização somente leitura
name
meaningful-identifiers
description
Naming guidance for callback parameters and local variables in TypeScript. Use when writing or refactoring loops, array callbacks (map/filter/find/reduce), or local accumulators.
license
AGPL-3.0
metadata
{"triggers":{"type":"domain","enforcement":"suggest","priority":"low","keywords":["naming","rename","identifier","variable name"]}}
# Meaningful identifiers Callback parameters and local variables must describe the value they hold. ## Rules - Name array callback params after the element's domain type: `batches.map((batch) => …)`, `bins.filter((bin) => …)`, `checkpoints.find((checkpoint) => …)`. Never reuse `right`/`left`/`column` for values that are not sort operands or table columns. - Name `reduce` accumulators after what they accumulate: `sum`/`total` for a running total, not `step`. - Name percentile/ratio arguments for the quantity they represent (`percentileRank`, `multiplier`), not an unrelated domain noun. ## Leave correct uses untouched - Sort comparators: `(left, right) => left - right`. - `(column) => column.key` over a real `.columns` array. - `for (const row of …Rows)` where the items are genuinely rows.
Ver no GitHub