oracle-gaps: the owns refusal should name the fix (shared const, as const, spreads)

Aberta
#69 0 comentários 0 reações 0 responsáveis Ver no GitHub

Mantenedores costumam responder em até 1 dia

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
4/5
Tempo estimado
1-2 dias
Facilidade para iniciantes
30/100
Tipo de issue
Funcionalidade
Clareza
Razoavelmente clara
Status de atividade
Ativa
Stack de tecnologia
eslint, javascript
Domínio
cli, tooling

Direção de pesquisa

Start in oracle-gaps/owners.mjs around line 174, where the 'not a literal list' refusal is raised, and read readOwns to see which initializer forms it accepts. Done means the refusal names a concrete fix, and the CLI and the proposed eslint-plugin-oracles rule agree on the accepted forms, including whether as const on a literal array is allowed. The as-const and plugin decisions need maintainer input before coding.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

Reported from an adopter's first session, at c58b0c2.

Problem. The adopter shared one const OWNS = [...] as const across four oracleProperty calls. The CLI refuses that with "its owns list is not a literal list" (oracle-gaps/owners.mjs:174). readOwns also rejects { owns } shorthand, spreads, and owns: [...] as const, because it requires the initializer to be an ArrayLiteralExpression of string literals.

Proposal.

  • Give the refusal a fix line, such as "write owns inline as owns: ['src/x.ts#fn'] in each call".
  • Possibly add an eslint-plugin-oracles rule, so this shows up in lint before a gap-check run.

The CLI and the plugin must agree on exactly which forms they accept. Also decide whether as const on a literal array should be accepted, since it doesn't change the static list.

This issue was written by Isaac.

Linguagem predominante
JavaScript
Estrelas
5
Forks
1
Merge médio
8h 31min
PRs com merge (30d)
60

Preparar o ambiente

Este projeto não oferece contêiner de desenvolvimento, Dockerfile nem guia de contribuição, então a configuração fica por sua conta: comece pelo README e veja nosso guia da primeira contribuição para os passos gerais.

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de TanStack/oracles

Todas as issues de TanStack/oracles

Issues semelhantes

Mais issues de JavaScript

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.