Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 noRedundantUseStrict: Applying fixes also removes the comment above "use strict" directive #313

Closed
1 task done
gaeulbyul opened this issue Sep 17, 2023 · 0 comments · Fixed by #468
Closed
1 task done
Assignees
Labels
A-Linter Area: linter L-JavaScript Language: JavaScript and super languages S-Bug-confirmed Status: report has been confirmed as a valid bug

Comments

@gaeulbyul
Copy link

Environment information

CLI:
  Version:                      1.2.2
  Color support:                true

Platform:
  CPU Architecture:             x86_64
  OS:                           windows

Environment:
  BIOME_LOG_DIR:                unset
  NO_COLOR:                     unset
  TERM:                         unset
  JS_RUNTIME_VERSION:           "v18.17.1"
  JS_RUNTIME_NAME:              "node"
  NODE_PACKAGE_MANAGER:         "npm/9.1.2"

Biome Configuration:
  Status:                       unset

Workspace:
  Open Documents:               0

What happened?

Example Code

// some comments...
"use strict";

console.info("HELLO, WORLD!");

Step to reproduce

  1. Save this code to somewhere. (I tried this without any configuration file)
  2. Run biome check --apply example.js
  3. Check fixed code and notify the // some comments... is also removed.

Expected result

It should only remove the "use strict" directive, not the comment.

// some comments...

console.info("HELLO, WORLD!");

Code of Conduct

  • I agree to follow Biome's Code of Conduct
@Conaclos Conaclos added A-Linter Area: linter L-JavaScript Language: JavaScript and super languages S-Bug-confirmed Status: report has been confirmed as a valid bug labels Sep 17, 2023
@Conaclos Conaclos self-assigned this Oct 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Linter Area: linter L-JavaScript Language: JavaScript and super languages S-Bug-confirmed Status: report has been confirmed as a valid bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants