question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

operator-linebreak for symbol `=` and `&&`

See original GitHub issue

hi guys, sorry about this issue.

I catch this situation:

        const { name, type } = typeof subject === 'object'
            ? subject
...

fixed to:

        const { name, type } =
          typeof subject === 'object'
            ? subject
            : {
                name: subject,
                type: 'null',
              };

but the rule is:

'operator-linebreak': ["error", "before",  { "overrides": { "=": "ignore", "+=": "ignore", "-=": "ignore", "?=": "ignore", "*=": "ignore", "/=": "ignore" } }],

nodejs, eslint, prettier, typescript - latest.

if u know in what file n at what line I can look for to fix - I’ll be thankful n will try to fix this bug.


image

image


Tell us about your environment

  • ESLint Version:
  • Node Version:
  • npm Version:

What parser (default, @babel/eslint-parser, @typescript-eslint/parser, etc.) are you using?

Please show your full configuration:

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.



What did you expect to happen?

What actually happened? Please include the actual, raw output from ESLint.

Are you willing to submit a pull request to fix this bug?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
nzakascommented, Oct 14, 2020

@anikethsaha please leave the evaluating label until the issue is closed or accepted.

0reactions
nzakascommented, Oct 16, 2020

Closing as it seems like this isn’t an issue for ESLint itself to address.

Read more comments on GitHub >

github_iconTop Results From Across the Web

operator-linebreak - ESLint - Pluggable JavaScript Linter
A pluggable and configurable linter tool for identifying and reporting on patterns in JavaScript. Maintain your code quality with ease.
Read more >
'?' Should be placed at the beginning of the line in ReactJS
This rule enforces a consistent linebreak style for operators. And by default, the rule is set to allow operators to be after an...
Read more >
Java code style operator new line formatting
According to the Google Java Style Guide, the break should come “before the symbol”, therefore: String veryLong = "This is an example of...
Read more >
java - Line break before/after operator
I believe the line should start with the highest symbol in the parse tree of the statement you want to break.
Read more >
Add a line break with a formula - Exceljet
This formula "glues together" the pieces of text that appear in B4, C4, and D4 using the ampersand (&) which is the concatenation...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found