sindresorhus/eslint-plugin-unicorn

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

Open

#881 geöffnet am 20. Okt. 2020

Auf GitHub ansehen
 (1 Kommentar) (1 Reaktion) (0 zugewiesene Personen)JavaScript (5.022 Stars) (468 Forks)user submission
docsenhancementhelp wanted

Beschreibung

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.

Contributor Guide