frontend: add multi-line assignment lint for better formatting#4171
Open
thisconnect wants to merge 2 commits into
Open
frontend: add multi-line assignment lint for better formatting#4171thisconnect wants to merge 2 commits into
thisconnect wants to merge 2 commits into
Conversation
thisconnect
commented
May 28, 2026
Collaborator
Author
There was a problem hiding this comment.
2 questions
- do you like the style change?
- should we add the plugin locally in the same repo?
cc @shonsirsha @bznein @Beerosagos wdyt?
| import pluginReact from 'eslint-plugin-react'; | ||
| import pluginReactHooks from 'eslint-plugin-react-hooks'; | ||
| import stylistic from '@stylistic/eslint-plugin'; | ||
| import { softBrackets } from './node_vendor/eslint-plugin-soft-brackets/lib/index.js'; |
Collaborator
Author
There was a problem hiding this comment.
Should we add such a custom lint plugin locally in the same repo? (currently using node_vendor but it could be anywhere)
Collaborator
I do! It reads more clearly imho!
I don't really have an opinion here to be honest, either is fine for me |
6ecc3d0 to
b381217
Compare
Collaborator
Author
|
rebased |
b381217 to
f423519
Compare
Collaborator
Author
|
rebased |
Beerosagos
approved these changes
Jun 3, 2026
Beerosagos
left a comment
Collaborator
There was a problem hiding this comment.
didn't look into implementation details, but cACK
shonsirsha
approved these changes
Jun 4, 2026
f423519 to
7ab64dc
Compare
It visually communicates: - this assignment spans multiple lines - the entire expression is grouped - operator hierarchy matters here without needing mental parsing. And according to GPT: this soft-bracket style is surprisingly AI-friendly because it creates very obvious expression boundaries.
7ab64dc to
971656f
Compare
Collaborator
Author
|
rebased |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
It visually communicates:
without needing mental parsing.
And according to GPT: this soft-bracket style is surprisingly AI-friendly because it creates very obvious expression boundaries.