sindresorhus/eslint-plugin-unicorn

Create comment utility

Closed

#370 opened on Sep 16, 2019

 (3 comments) (1 reaction) (0 assignees)JavaScript (468 forks)user submission
enhancementhelp wanted

Repository metrics

Stars
 (5,022 stars)
PR merge metrics
 (Avg merge 1d 16h) (399 merged PRs in 30d)

Description

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.

Contributor guide