Skip to content

🔨 Native, blazing-fast Prettier CLI

License

Notifications You must be signed in to change notification settings

hudsonm62/prettier-cli

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace
 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

66 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🔨 hudsonm62/prettier-cli

Checks status Dependabot status License Code style

🔥 Native, Fast statically linked prettier CLI for your favorite Shell, Docker and Github Actions. It allows you to run prettier CLI commands without having to install Node.js and any dependencies.

Note: This project is NOT affiliated with Prettier.

~Originally forked from actionsx/prettier.

Usage

  • path/to/prettier <args>

GitHub Actions

- uses: actions/checkout@v4
- uses: hudsonm62/prettier-cli@v1
  with:
    args: --check .
Input Default Description
args --check . Prettier CLI Arguments

Docker

All the provided Docker images can be used 'ad-hoc', this is especially handy in environments without a JavaScript interpreter.

The binary is located at /usr/local/bin/prettier (except for the bun- tags, which use a Bun.Build bundle).

USER WORKDIR CMD
guest /lint --check .

With docker run

docker run --rm -v path/to/repo:/lint hudsonm62/prettier-cli:latest

With a Dockerfile

FROM hudsonm62/prettier-cli:latest
WORKDIR /lint
COPY . .
CMD [ "--check", "." ]

Plugins

Plugins somewhat work! You'll typically have them available in node_modules on your cwd, or globally somewhere on $PATH. Please report any issues - this is still lacking in solid testing and could definitely be improved.

Tags

There are two versions of the Docker image available: "main" and "bun". The "main" tags provide the standard Prettier CLI, while the "bun" tags utilize the Bun runtime, which might be preferred in certain situations. Additionally, the "bun" images come in two distributions - Alpine and Debian:

Contributing

This project uses Bun. You'll either need to install it, or you can use the provided devcontainer.json.

See the Contributing Guidelines.

License

This project is licensed under the MIT License.

About

🔨 Native, blazing-fast Prettier CLI

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Languages

  • JavaScript 61.0%
  • Dockerfile 39.0%