lints doublequotes in JSX HTML
alexchandel opened this issue · comments
What version of this package are you using?
1.4.0
What operating system, Node.js, and npm version?
macOS 11, v15.14.0, 7.9.0
What happened?
The double quotes below are unexpectedly linted:
import logo from './logo.svg'
import './App.css'
function App () {
return (
<div className="App">
<header className="App-header">
<img src={logo} className="App-logo" alt="logo" />
<p>
Edit <code>src/App.js</code> and save to reload.
</p>
<a
className="App-link"
href="https://reactjs.org"
target="_blank"
rel="noopener noreferrer"
>
Learn React
</a>
</header>
</div>
)
}
export default App
What did you expect to happen?
HTML was correctly detected, but double quotes are standard in HTML.
Are you willing to submit a pull request to fix this bug?
Is this intended?
JSX != HTML though, I personally think it's better to be consistent with the surrounding plain javascript code than to be consistent with another language (even though that language was the inspiration for JSX)
But essentially no one uses single quotes in HTML, and almost as few use single-quotes in JSX, surveying git repos. Far fewer than any other style choice of standard-js.
Wouldn't it be better to adopt a normal standard?