Skip to content
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

Format JS scripts with Prettier #441

Merged
merged 1 commit into from Apr 12, 2024

Conversation

ricekot
Copy link
Member

@ricekot ricekot commented Apr 9, 2024

Format all JS scripts with Prettier via the Spotless Gradle plugin.

The dependency on npm to run prettier is fulfilled via the gradle-node-plugin.

Part of #170.

text = text.replace("\n", "\\n");
return text
function prepareDiffText(text) {
text = text.replace("\r", "\\r");

Check failure

Code scanning / CodeQL

Incomplete string escaping or encoding High

This replaces only the first occurrence of "\r".
return text
function prepareDiffText(text) {
text = text.replace("\r", "\\r");
text = text.replace("\n", "\\n");

Check failure

Code scanning / CodeQL

Incomplete string escaping or encoding High

This replaces only the first occurrence of "\n".
Signed-off-by: ricekot <github@ricekot.com>
@thc202
Copy link
Member

thc202 commented Apr 12, 2024

Thank you!

Copy link
Member

@kingthorin kingthorin left a comment

Choose a reason for hiding this comment

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

Cool

@kingthorin kingthorin merged commit a941beb into zaproxy:main Apr 12, 2024
7 of 8 checks passed
@ricekot ricekot deleted the spotless-js-scripts branch April 12, 2024 16:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants