Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,18 @@ module.exports = {
*/
singleQuote: true,

// TODO: Review this implementation
java
public class Main {
public static void main(String[] args) {
int i = 0;
while(i != 0) {
// do something
}
}
}
Comment on lines +37 to +46
Copy link

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

⚠️ Potential issue

Invalid Java snippet breaks the Prettier config – remove or fully comment it out

Lines 37-46 introduce raw Java code (plus a stray java token) inside a .js file that is executed by Node.
This makes the entire module.exports object syntactically invalid and will cause the config load to throw on startup, blocking any tooling that relies on Prettier.

Apply one of the following fixes:

-// TODO: Review this implementation
-java
-public class Main {
-  public static void main(String[] args) {
-    int i = 0;
-    while(i != 0) {
-      // do something
-    }
-  }
-}
+// Example illustrating the loop bug (kept fully commented to preserve valid JS):
+/*
+public class Main {
+  public static void main(String[] args) {
+    int i = 0;
+    // BUG: should be `== 0`; using `!= 0` causes the loop to run forever
+    while (i != 0) {
+      // do something
+    }
+  }
+}
+*/

—or simply delete the block entirely if it’s no longer needed.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
// TODO: Review this implementation
java
public class Main {
public static void main(String[] args) {
int i = 0;
while(i != 0) {
// do something
}
}
}
// Example illustrating the loop bug (kept fully commented to preserve valid JS):
/*
public class Main {
public static void main(String[] args) {
int i = 0;
// BUG: should be `== 0`; using `!= 0` causes the loop to run forever
while (i != 0) {
// do something
}
}
}
*/
🤖 Prompt for AI Agents
In .prettierrc.js around lines 37 to 46, there is raw Java code that breaks the
JavaScript syntax of the config file. Remove this Java snippet entirely or fully
comment it out so the file remains valid JavaScript and does not cause Prettier
to fail on startup.



/**
* https://prettier.io/docs/en/options.html#quote-props
*/
Expand Down
Loading