We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bfc46e6 commit bb2aa9dCopy full SHA for bb2aa9d
2 files changed
lib/index.js
@@ -41,8 +41,8 @@ module.exports = {
41
const ast = parse(...args);
42
43
if (rePkg.test(filepath)) {
44
- const { properties } = ast;
45
- ast.properties = format(properties);
+ const { properties, node } = ast;
+ ast.properties = format(properties || node.properties);
46
}
47
48
return ast;
package.json
@@ -1,6 +1,6 @@
1
{
2
"name": "prettier-plugin-package",
3
- "version": "1.3.0",
+ "version": "1.4.0",
4
"description": "An opinionated package.json formatter plugin for Prettier",
5
"license": "MPL-2.0",
6
"repository": "shellscape/prettier-plugin-package",
@@ -36,7 +36,7 @@
36
"prettier"
37
],
38
"peerDependencies": {
39
- "prettier": "^2.0.0"
+ "prettier": "^2.0.0 || ^3.0.0"
40
},
"devDependencies": {
"@commitlint/cli": "^17.6.5",
0 commit comments