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
Extra indenting in a nested ternary with offsetTernaryExpressions: true from Standard JS config #13971
Closed
brodybits opened this issue
Jan 1, 2021
· 2 comments
· Fixed by #13972, pzhlkj6612/action-js-qt-windows-msvc-mingw-version-info-generator#1, neo-hack/action-jscpdrs#1, DDDEastMidlandsLimited/dddem-web#218 or Sidoine/Ovale#844
Closed
Extra indenting in a nested ternary with offsetTernaryExpressions: true from Standard JS config #13971
brodybits opened this issue
Jan 1, 2021
· 2 comments
· Fixed by #13972, pzhlkj6612/action-js-qt-windows-msvc-mingw-version-info-generator#1, neo-hack/action-jscpdrs#1, DDDEastMidlandsLimited/dddem-web#218 or Sidoine/Ovale#844
Labels
accepted
There is consensus among the team that this change meets the criteria for inclusion
archived due to age
This issue has been archived; please open a new issue for any further discussion
bug
ESLint is working incorrectly
Projects
Comments
brodybits
added
bug
ESLint is working incorrectly
triage
An ESLint team member will look at this issue soon
labels
Jan 1, 2021
1 task
brodybits
added a commit
to brodybits/prettierx
that referenced
this issue
Jan 1, 2021
check for consistent formatting as discussed in: - eslint/eslint#13971 - standard/standard#1624 - #41
brodybits
added a commit
to brodybits/prettierx
that referenced
this issue
Jan 3, 2021
check for consistent formatting on prettierx side as discussed in: - eslint/eslint#13971 - standard/standard#1624 - #41
brodybits
added a commit
to brodybits/prettierx
that referenced
this issue
Jan 4, 2021
check for consistent formatting on prettierx side as discussed in: - eslint/eslint#13971 - standard/standard#1624 - #41
nzakas
added
accepted
There is consensus among the team that this change meets the criteria for inclusion
and removed
triage
An ESLint team member will look at this issue soon
labels
Jan 29, 2021
Confirmed. |
Thanks! I will fix the commit message in the next 1-2 days.
On Fri, Jan 29, 2021 at 12:59 PM Nicholas C. Zakas ***@***.***> wrote:
Confirmed.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#13971 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAL42UFWZBWIZ5PS6B7EOWTS4LZOPANCNFSM4VP4JANQ>
.
--
Sent from my mobile
|
btmills
pushed a commit
that referenced
this issue
Jan 30, 2021
… (#13972) * reproduce extra nested ternary indentation with a test * add a similar test with proper indenting of nested ternary * apply condition to avoid extra indenting with offsetTernaryExpressions Co-authored-by: Adam Stankiewicz <sheerun@sher.pl> Co-authored-by: Adam Stankiewicz <sheerun@sher.pl>
This was referenced Mar 5, 2021
This was referenced Mar 17, 2021
Merged
eslint-github-bot
bot
added
the
archived due to age
This issue has been archived; please open a new issue for any further discussion
label
Jul 30, 2021
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
accepted
There is consensus among the team that this change meets the criteria for inclusion
archived due to age
This issue has been archived; please open a new issue for any further discussion
bug
ESLint is working incorrectly
Tell us about your environment
What parser (default,
@babel/eslint-parser
,@typescript-eslint/parser
, etc.) are you using?default
Please show your full configuration:
Here is the configuration from my work in brodybits/react-native-module-init#85 but with Prettier items removed since they are not needed to reproduce this issue:
Configuration
What did you do? Please include the actual source code causing the issue, as well as the command that you used to run ESLint.
Reduced reproduction code that I made in a local
mock.test.js
file:What did you expect to happen?
no errors
What actually happened? Please include the actual, raw output from ESLint.
npx eslint --fix mock.test.js
updates the code with extra indenting in the nested ternary like this:I was able to reproduce this issue more simply with the following fragment in the test suite:
Are you willing to submit a pull request to fix this bug?
Yes.
I was able to make a one-line fix based on bb6cf50 (PR #12556) by @sheerun:
One-line fix
This issue is in follow-up to the offsetTernaryExpressions option contributed in PR #12556 and has led to standard/standard#1624.
/cc @sheerun
The text was updated successfully, but these errors were encountered: