Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upStandard(ESLint?) cannot decide on how many spaces are needed for a JSX Component #1196
Comments
This comment has been minimized.
This comment has been minimized.
|
Looks like changing the
|
This comment has been minimized.
This comment has been minimized.
|
Have you tried it with Standard v12? |
This comment has been minimized.
This comment has been minimized.
|
Issue still exists in 12.0.1 |
This comment has been minimized.
This comment has been minimized.
stale
bot
commented
Dec 6, 2018
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
stale
bot
added
the
stale
label
Dec 6, 2018
This comment has been minimized.
This comment has been minimized.
|
This issue has not been fixed, since reported. |
stale
bot
removed
the
stale
label
Dec 6, 2018
This comment has been minimized.
This comment has been minimized.
stale
bot
commented
Mar 6, 2019
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
stale
bot
added
the
stale
label
Mar 6, 2019
stale
bot
closed this
Mar 13, 2019
lock
bot
locked as resolved and limited conversation to collaborators
Jun 12, 2019
This comment has been minimized.
This comment has been minimized.
|
@akatechis I think that ESLint is behaving correctly in your code sample. The export default function MyComponent () {
return (
<div>
<a
onClick={(event) => {
event.preventDefault()
}}
href=''
>
Send again
</a>.
</div>
)
}Or better: export default function MyComponent () {
return (
<div>
<a
onClick={event => event.preventDefault()}
href=''
>
Send again
</a>.
</div>
)
} |
akatechis commentedSep 7, 2018
•
edited
What version of standard? 11.0.1
What operating system, Node.js, and npm version?
Windows 10, Node 10.0.0, NPM 6.1.0
What did you expect to happen?
I expect indentation to be 6 spaces for the line with the
hrefprop.What actually happened?
Standard (or ESLint?) cannot decide whether the indentation should be 6 or 8 spaces for the following example:
Initially, it correctly tells me it expects 6 spaces for the
hrefline. I change it to 6, and it marks the same line, saying it expects 8.