@round-core/prettier 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,13 @@
1
+ # @round-core/prettier
2
+
3
+ Prettier plugin for RoundJS. Keeps your code clean, consistent, and always in its native syntax.
4
+
5
+ ## Features
6
+
7
+ - **Native Syntax**: Unlike other preprocessors, this plugin ensures your loops and conditionals keep their native RoundJS syntax: `{for (item in list) { ... }}`.
8
+ - **Hybrid Formatting**: Uses the Babel parser internally for JS/JSX content while reconstructing RoundJS control structures to ensure the final output is always pure and readable RoundJS.
9
+ - **VS Code Integration**: Works automatically on save when the Prettier plugin is configured for `.round` files.
10
+
11
+ ## Usage
12
+
13
+ Add `"plugins": ["@round-core/prettier"]` to your `.prettierrc` file.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@round-core/prettier",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Prettier plugin for RoundJS",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
package/src/printer.js CHANGED
@@ -74,6 +74,7 @@ export function print(path, options, print) {
74
74
  }
75
75
  if (attr.name.name === '_attrs') rawAttrs = attr.value.value;
76
76
  }
77
+
77
78
  if (typeof head === 'string') {
78
79
  head = head ? head.replace(/"/g, '"') : '';
79
80
  }