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

"use strict"; -- document how to convince biomejs that a file is not a module? #52

Closed
1 task done
asottile opened this issue Jan 5, 2024 · 4 comments · Fixed by biomejs/biome#2699
Closed
1 task done

Comments

@asottile
Copy link

asottile commented Jan 5, 2024

Documentation URL

https://biomejs.dev/linter/rules/no-redundant-use-strict/

Description

the noRedundantUseStrict shows removing redundant strict -- and the biome playground allows for both "Module" and "Script" forms -- but I can't find how to configure that from the cli and so I am always getting a diagnostic for removal of 'use strict';

Expectations

it may be nice to show how to teach biome that these are scripts and not modules -- perhaps in the noRedundantUseStrict docs as well since that's where it is relevant to me!

Code of Conduct

  • I agree to follow Biome's Code of Conduct
@ematipico
Copy link
Member

Can you send a PR @asottile ?

@asottile
Copy link
Author

but I can't find how to configure that from the cli

I can if I first learn how to do it

@Conaclos
Copy link
Member

At the time, the only way I know is using .cjs as fiile extension.

@ematipico
Copy link
Member

ematipico commented Jan 26, 2024

@asottile We have extensive documents that explain everything:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants