dprint / dprint-plugin-exec

Formatting plugin for dprint that formats code via other formatting CLI tools.
MIT License
21 stars 1 forks source link

Use an object for sub config #24

Open dsherret opened 1 year ago

dsherret commented 1 year ago

This is too verbose:

"exec": {
    "associations": [
      "**/*.{sh,bash}",
      "**/package.json"
    ],
    "prettier-package-json.associations": "**/package.json",
    "prettier-package-json": "node_modules/.bin/prettier-package-json --write",
    "prettier-package-json.stdin": false
}

It should allow for something along these lines now that dprint supports it:


"exec": {
    "associations": [
      "**/*.{sh,bash}",
      "**/package.json"
    ],
    "prettier-package-json": {
      "associations": "**/package.json",
      "command": "node_modules/.bin/prettier-package-json --write",
      "stdin": false
  }
}