Skip to content

Commit

Permalink
ci: Add prettier workflow support
Browse files Browse the repository at this point in the history
  • Loading branch information
Pradumnasaraf committed Feb 17, 2023
1 parent 4fcc784 commit 0d87e53
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 2 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/prettier.yml
@@ -0,0 +1,22 @@
name: Format

on: [push]

jobs:
format:
runs-on: ubuntu-latest
name: Format Files
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: "16"
- run: npm ci
- name: Prettier
run: npx prettier --write '**/*.js' '*.{js,md}'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: stefanzweifel/git-auto-commit-action@v4
if: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }}
with:
commit_message: "style: format files"
4 changes: 4 additions & 0 deletions .prettierignore
@@ -0,0 +1,4 @@
CHANGELOG.md
CODE_OF_CONDUCT.md
*.yml
*.yaml
6 changes: 6 additions & 0 deletions .prettierrc
@@ -0,0 +1,6 @@
{
"semi": true,
"tabWidth": 2,
"doubleQuotes": true,
"bracketSpacing": true
}
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Expand Up @@ -20,4 +20,4 @@
- Look at the existing [**Issues**](https://github.com/Pradumnasaraf/LinkFree-CLI/issues) or [**create a new issue**](https://github.com/Pradumnasaraf/LinkFree-CLI/issues/new/choose)!
- [**Fork the Repo**](https://github.com/Pradumnasaraf/LinkFree-CLI/fork). Then, create a branch for any issue that you are working on. Finally, commit your work.
- Create a **[Pull Request](https://github.com/Pradumnasaraf/LinkFree-CLI/compare)** (_PR_), which will be promptly reviewed and given suggestions for improvements by the community.
- Add screenshots or screen captures to your Pull Request to help us understand the effects of the changes proposed in your PR.
- Add screenshots or screen captures to your Pull Request to help us understand the effects of the changes proposed in your PR.
2 changes: 1 addition & 1 deletion SECURITY.md
@@ -1,3 +1,3 @@
## Reporting a Vulnerability

Please don't raise an issue that can be more vulnerable to put out in public. Instead, report via http://pradumnasaraf.dev/contact.
Please don't raise an issue that can be more vulnerable to put out in public. Instead, report via http://pradumnasaraf.dev/contact.

0 comments on commit 0d87e53

Please sign in to comment.