44 lines
1.0 KiB
YAML
44 lines
1.0 KiB
YAML
name: Linting
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
pull_request:
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Set up Node.js
|
|
uses: actions/setup-node@v1
|
|
with:
|
|
node-version: 12
|
|
|
|
- name: Yarn install
|
|
run: yarn install
|
|
|
|
- name: ESLint
|
|
if: ${{ always() }}
|
|
run: yarn eslint --ext .js,.js.es6 --no-error-on-unmatched-pattern {test,javascripts}
|
|
|
|
- name: Prettier
|
|
if: ${{ always() }}
|
|
shell: bash
|
|
run: |
|
|
yarn prettier -v
|
|
shopt -s extglob
|
|
if ls @(javascripts|desktop|mobile|common|scss)/**/*.@(scss|js|es6) &> /dev/null; then
|
|
yarn prettier --list-different "@(javascripts|desktop|mobile|common|scss)/**/*.{scss,js,es6}"
|
|
fi
|
|
if ls test/**/*.@(js|es6) &> /dev/null; then
|
|
yarn prettier --list-different "test/**/*.{js,es6}"
|
|
fi
|
|
|
|
- name: Ember template lint
|
|
if: ${{ always() }}
|
|
run: yarn ember-template-lint javascripts
|