Comments (3)
I did try using something a while back, but the problem was managing PRs. I wanted to keep things easy for contributors, without them having to install and run stuff locally. This was before GitHub actions came about, so I could revisit this now, and have a style guide that runs when a PR is opened, maybe with issues being either auto-fixed, or added as a comment on the PR
from personal-security-checklist.
I wanted to keep things easy for contributors, without them having to install and run stuff locally.
That makes perfect sense.
Admittedly I've never used Prettier in a GitHub action to actually make changes, only to check and reject/accept PRs.
It looks like the prettier-action can do all of that. Probably would be sensible (and marginally more performant) to use only_changed
so it will skip linting unmodified files. (Although this means you probably want to do a one-off, manual commit to lint the existing source.
Something like:
name: Continuous Integration
on:
pull_request:
branches: [master]
jobs:
prettier:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
ref: ${{ github.head_ref }}
fetch-depth: 0
- name: Prettify code
uses: creyD/[email protected]
with:
prettier_options: --write **/*.md *.md
only_changed: True
from personal-security-checklist.
Awesome, thanks for snippet. I'll try this out this evening and hopefully get a proper styleguide implemented :)
from personal-security-checklist.
Related Issues (20)
- [ADDITION] translation into Chinese
- [AMENDMENT] A little error in the README.MD
- Broken hyperlinks in README.md HOT 1
- ~ 50 broken links in other md files HOT 1
- [REMOVAL] Information about Silence
- [REMOVAL] Disable WebRTC
- [AMENDMENT] Disable WebRTC
- [ADDITION] Add Information about PassKeys (with Apple, Microsoft, Google, Github etc)
- how to fork as github page HOT 1
- [ADDITION] altTech web directory
- [AMENDMENT] Invisible Hyperlinks HOT 2
- [AMENDMENT] DNS-over-HTTPS vs DNS-over-TLS
- [AMENDMENT] Missing links re. third-part cookies
- [REMOVAL] Change your Router's Default IP
- [AMENDMENT] Harmonize wording: "recommended", "basic", "essential" HOT 1
- [AMENDMENT] is the "Spoofing GPS" advise suggesting something illegal? HOT 2
- [AMENDMENT] Ability to edit unclear/not working HOT 5
- Noob is looking for the help!
- 404 Issue in self running copy - no checklists working.
- digital-defense.io - gorgeous!
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from personal-security-checklist.