sindresorhus/eslint-plugin-unicorn

Create comment utility

Chiusa

#370 aperta il 16 set 2019

 (3 commenti) (1 reazione) (0 assegnatari)JavaScript (468 fork)user submission
enhancementhelp wanted

Metriche repository

Star
 (5022 stelle)
Metriche merge PR
 (Merge medio 1g 16h) (399 PR mergiate in 30 g)

Descrizione

See discussion here: https://github.com/sindresorhus/eslint-plugin-unicorn/pull/225#discussion_r294262451

We need to make handling comments easier. The current suggestions are:

  1. Comments should be preserved (may be non-trivial)
  2. Comments should be moved above a suitable node
  3. Do not fix if comments are detected

At the very least, we should add some notes in our documentation around creating rules since this comes up frequently.

Guida contributor