mirror of
https://github.com/flarum/framework.git
synced 2025-02-24 10:10:13 +08:00
32 lines
568 B
YAML
32 lines
568 B
YAML
![]() |
name: Lint code
|
||
|
|
||
|
on:
|
||
|
push:
|
||
|
paths:
|
||
|
- 'js/src/**'
|
||
|
pull_request:
|
||
|
paths:
|
||
|
- 'js/src/**'
|
||
|
|
||
|
jobs:
|
||
|
prettier:
|
||
|
runs-on: ubuntu-latest
|
||
|
|
||
|
name: Lint JS code with Prettier
|
||
|
|
||
|
steps:
|
||
|
- uses: actions/checkout@master
|
||
|
|
||
|
- name: Setup Node.js
|
||
|
uses: actions/setup-node@v1
|
||
|
with:
|
||
|
node-version: "12"
|
||
|
|
||
|
- name: Install JS dependencies
|
||
|
run: npm ci
|
||
|
working-directory: ./js
|
||
|
|
||
|
- name: Check JS code for formatting
|
||
|
run: node_modules/.bin/prettier --check src
|
||
|
working-directory: ./js
|