Skip to content

ESLint Config Migration: Tweak the operator-linebreak lint rule#1037

Merged
filmaj merged 1 commit intotslint-to-eslintfrom
operator-linebreak
Aug 23, 2021
Merged

ESLint Config Migration: Tweak the operator-linebreak lint rule#1037
filmaj merged 1 commit intotslint-to-eslintfrom
operator-linebreak

Conversation

@filmaj
Copy link
Copy Markdown
Contributor

@filmaj filmaj commented Aug 5, 2021

Summary

This is a PR that should be merged into #1024 and incrementally addresses #842.

This PR tweaks the operator-linebreak rule such that:

  • forbid line breaks around the = operator
  • require other operators to be at the end of the line

What do folks think?

Impact

Before

✖ 362 problems (173 errors, 189 warnings)
  76 errors and 0 warnings potentially fixable with the `--fix` option.

After

✖ 306 problems (117 errors, 189 warnings)
  20 errors and 0 warnings potentially fixable with the `--fix` option.

Requirements (place an x in each [ ])

@filmaj filmaj requested a review from misscoded August 5, 2021 13:58
@gitwave gitwave bot added the untriaged label Aug 5, 2021
@filmaj filmaj force-pushed the operator-linebreak branch from 4357426 to 20d8e29 Compare August 9, 2021 23:51
@filmaj filmaj self-assigned this Aug 9, 2021
@filmaj filmaj added the tests M-T: Testing work only label Aug 9, 2021
@filmaj filmaj requested review from seratch and stevengill August 9, 2021 23:52
Copy link
Copy Markdown
Contributor

@seratch seratch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This may be due to my preference but the updated ones is this pull request is easier to read for me.

@filmaj filmaj removed the untriaged label Aug 12, 2021
Copy link
Copy Markdown
Member

@stevengill stevengill left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed. This is more readable! Nice

… = operator, and prefix for other operators to be at the end of the line.
@filmaj filmaj force-pushed the operator-linebreak branch from 20d8e29 to cfa29ef Compare August 23, 2021 17:01
@filmaj filmaj merged commit 4b741cc into tslint-to-eslint Aug 23, 2021
@filmaj filmaj deleted the operator-linebreak branch August 23, 2021 17:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tests M-T: Testing work only

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants