diffplug / diffplug/spotless

Allow to specify npm-dependencies using json file

Open
#1,479 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Java
Stars
5.6k
Forks
559
Avg merge
1d 13h
Merged PRs (30d)
34

Description

(From discussion in #1453)
For npm-based formatters, one can supply npm-modules to be used:

```gradle
prettier([ 'my-custom-module': '1.0.0', 'my-second-custom-module': '0.2.0'])
```

It would be nice to be able to create that list using npm itself e.g. using
```bash
echo "$(npm info --json "my-custom-module@latest" peerDependencies) $(npm info --json "my-second-custom-module" peerDependencies)" | jq -s add > dependencies.json
```

and then use that file as input
```gradle
prettier().usePeerDependenciesFrom('dependencies.json')
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.