sindresorhus/eslint-plugin-unicorn

Inconsistency in rule option names ("checkFoo" vs "ignoreFoo")

Fechada

#881 aberto em 20 de out. de 2020

 (1 comentário) (1 reação) (0 responsável)JavaScript (468 forks)user submission
docsenhancementhelp wanted

Métricas do repositório

Stars
 (5.022 estrelas)
Métricas de merge de PR
 (Mesclagem média 1d 16h) (399 fundiu PRs em 30d)

Description

Grepping the docs for "ignore" and "check" I find these option names:

  • With "ignore":
    • expiring-todo-comments:
      • ignoreDatesOnPullRequests
    • import-index:
      • ignoreImports
  • With "check":
    • prevent-abbreviations:
      • checkDefaultAndNamespaceImports
      • checkShorthandImports
      • checkProperties
      • checkDefaultAndNamespaceImports
      • checkVariables
      • checkFilenames
    • no-null:
      • checkStrictEquality
    • import-style:
      • checkImport
      • checkDynamicImport
      • checkExportFrom
      • checkRequire
    • no-keyword-prefix:
      • checkProperties

The "check" names seem to win for now, so I think all new options should be named like "checkFoo" instead of "ignoreFoo". Not sure should we and how to automatically enforce this, maybe with a prevent-abbreviations replacement.

Guia do colaborador