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
Add autofix to function-calc-no-unspaced-operator #5273
Add autofix to function-calc-no-unspaced-operator #5273
Conversation
Hi all |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[suggestion] How about adding a new utility isNewlineAtIndex()
as below?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[suggestion] How about using more generic function names and unifying the use of String.prototype.slice()
instead of substr()
or substring()
?
IMO, substr()
and substring()
seem confusing, so I recommend using slice()
instead.
See also:
@doing-art Thank you for creating this change! 👍🏼 The logic seems good to me, but I've left some comments to improve the code readability and maintainability. |
Co-authored-by: Masafumi Koba <473530+ybiquitous@users.noreply.github.com>
Co-authored-by: Masafumi Koba <473530+ybiquitous@users.noreply.github.com>
Co-authored-by: Masafumi Koba <473530+ybiquitous@users.noreply.github.com>
Co-authored-by: Masafumi Koba <473530+ybiquitous@users.noreply.github.com>
Thank you for reviewing my PR and sharing knowledge about |
@doing-art Thank you! It seems good to me. 👍🏼 By the way, we are now working on the next version 14 (#5205), which includes many significant changes such as ESM, PostCSS 8, etc. What do you think? @jeddy3 |
I agree. We'll want to minimise conflicts and save ourselves a headache by working from the @doing-art Can you change the merge branch, please? |
…unspaced-operator
@jeddy3 @ybiquitous Changed the merge branch and resolved one small conflict in the tests. |
Thanks! You'll need to run |
Sorry, my bad. Have fixed linting issue. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@doing-art Thank you! Looks good to me. 👍🏼
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
|
This PR contains implementation of the autofix for the
function-calc-no-unspaced-operator
rule as it is required in #4866.No, it's self-explanatory.