💅 lint/style/useSelfClosingElements false positive error
Environment information
CLI:
Version: 1.8.3
Color support: true
Platform:
CPU Architecture: aarch64
OS: macos
Environment:
BIOME_LOG_DIR: unset
NO_COLOR: unset
TERM: "xterm-256color"
JS_RUNTIME_VERSION: "v20.9.0"
JS_RUNTIME_NAME: "node"
NODE_PACKAGE_MANAGER: "npm/10.1.0"
Rule name
lint/style/useSelfClosingElements
Playground link
N/A
Expected result
When I run
npx @biomejs/biome lint ./src/index.tsx
its offering this fix which is wrong because script tag cannot be self-enclosing
318 │ - ········<script·src="/filepond/filepond.js"> 318 │ + ········<script·src="/filepond/filepond.js"·/>
Code of Conduct
- [X] I agree to follow Biome's Code of Conduct
script tag cannot be self-enclosing
I think this is only true in HTML?
But this rule is only enabled in JSX, and JSX transpiler should transpile them into the same code, whether you use self-closing elements or not. You can check it in the babel playground.
Did I miss something? Or what kind of issues did you actually run into after you applied the fixes?
Good call, @Sec-ant; you're right.