[PR #169] [MERGED] Add run-node-formatter #202

Closed
opened 2025-11-06 17:14:30 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/sdras/awesome-actions/pull/169
Author: @MarvinJWendt
Created: 9/7/2019
Status: Merged
Merged: 9/7/2019
Merged by: @gep13

Base: masterHead: patch-1


📝 Commits (2)

📊 Changes

1 file changed (+1 additions, -0 deletions)

View changed files

📝 README.md (+1 -0)

📄 Description

run-node-formatter is an action that automatically formats NodeJS code with the currently installed formatter.

Official readme:

Node Code Formatter

Automatically formats your code!

Usage ✏️

  1. Create a formatter.yml file in .github/workflows/
  2. Paste this code into the file:
on: push
name: Node Code Formatter
jobs:
  lint:
    name: Node Code Formatter
    runs-on: ubuntu-latest
    steps:
    - name: Node Code Formatter
      uses: MarvinJWendt/run-node-formatter@1.2.1
      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  1. Commit the file

Setup formatter scripts 📋

Simply put your code formatter into a script named format or lint in your package.json (Yarn only supports a format script at the moment).

Make sure that your code formatter is a dependency of your module!

StandardJS

...
"scripts": {
    "format": "standard --fix"
  }

Prettier

...
"scripts": {
    "format": "prettier"
  }

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/sdras/awesome-actions/pull/169 **Author:** [@MarvinJWendt](https://github.com/MarvinJWendt) **Created:** 9/7/2019 **Status:** ✅ Merged **Merged:** 9/7/2019 **Merged by:** [@gep13](https://github.com/gep13) **Base:** `master` ← **Head:** `patch-1` --- ### 📝 Commits (2) - [`2cf519f`](https://github.com/sdras/awesome-actions/commit/2cf519fa9638a0e90fb99b6787737b3f468a4c5b) Add run-node-formatter - [`102564c`](https://github.com/sdras/awesome-actions/commit/102564c9e1a794b173cf1a6d57134059ad406d2a) Change NodeJS to Node.js ### 📊 Changes **1 file changed** (+1 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `README.md` (+1 -0) </details> ### 📄 Description [run-node-formatter](https://github.com/MarvinJWendt/run-node-formatter) is an action that automatically formats NodeJS code with the currently installed formatter. # Official readme: # Node Code Formatter > Automatically formats your code! ## Usage :pencil2: 1. Create a `formatter.yml` file in `.github/workflows/` 2. Paste this code into the file: ```yml on: push name: Node Code Formatter jobs: lint: name: Node Code Formatter runs-on: ubuntu-latest steps: - name: Node Code Formatter uses: MarvinJWendt/run-node-formatter@1.2.1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} ``` 3. Commit the file ## Setup formatter scripts :clipboard: Simply put your code formatter into a script named `format` or `lint` in your `package.json` (Yarn only supports a `format` script at the moment). **Make sure that your code formatter is a dependency of your module!** ### StandardJS ```json ... "scripts": { "format": "standard --fix" } ``` ### Prettier ```json ... "scripts": { "format": "prettier" } ``` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2025-11-06 17:14:30 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/awesome-actions#202