matrix-org / matrix-org/eslint-plugin-matrix-org

`require-copyright-header` should insert as first comment

Open
#23 1 comment 0 reactions 1 assignee View on GitHub

@kerryarchibald is already working on this.

Since May 6, 2022.

enhancement
Dominant language
JavaScript
Stars
4
Forks
8
PR merge metrics
No merged PRs in 30d

Description

Describe the bug
In files with a comment before any statements or imports,require-copyright-header --fix inserts the header after the first comment.
Eg:
https://github.com/matrix-org/matrix-react-sdk/pull/8514/files/be114d0f6fb571c2a729f771b6e0afe76f90ea20#diff-8a7f360d167712620cbea8af174842a1dd85be4bf184e627c7f054bbea162bb4

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
copyright header should be inserted as the first comment in the file

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.