@ripple-ts/prettier-plugin 0.2.178 → 0.2.179

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.
Files changed (2) hide show
  1. package/package.json +2 -2
  2. package/src/index.test.js +12 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ripple-ts/prettier-plugin",
3
- "version": "0.2.178",
3
+ "version": "0.2.179",
4
4
  "description": "Ripple plugin for Prettier",
5
5
  "type": "module",
6
6
  "module": "src/index.js",
@@ -25,7 +25,7 @@
25
25
  },
26
26
  "devDependencies": {
27
27
  "prettier": "^3.6.2",
28
- "ripple": "0.2.178"
28
+ "ripple": "0.2.179"
29
29
  },
30
30
  "dependencies": {},
31
31
  "files": [
package/src/index.test.js CHANGED
@@ -1875,6 +1875,18 @@ message.push(/* Some test comment */ greet(/* Some text */ \`Ripple\`));`;
1875
1875
  expect(result).toBeWithNewline(expected);
1876
1876
  });
1877
1877
 
1878
+ it('should not move commented composite elements to the outside of parent element', async () => {
1879
+ const expected = `component Child({ children, NonExistent, ...props }) {
1880
+ <div {...props}>
1881
+ // <children />
1882
+ // <NonExistent />
1883
+ </div>
1884
+ }`;
1885
+
1886
+ const result = await format(expected, { singleQuote: true });
1887
+ expect(result).toBeWithNewline(expected);
1888
+ });
1889
+
1878
1890
  it('should keep comments inside function with one statement at the top', async () => {
1879
1891
  const expected = `component App() {
1880
1892
  const something = 5;