From 03231ffecbb575adece83dc60bb1d1e20c80e89d Mon Sep 17 00:00:00 2001 From: Justin DiRose Date: Fri, 25 Sep 2020 11:47:02 -0500 Subject: [PATCH] DEV: Add linting workflow --- .github/workflows/plugin-linting.yml | 41 ++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 .github/workflows/plugin-linting.yml diff --git a/.github/workflows/plugin-linting.yml b/.github/workflows/plugin-linting.yml new file mode 100644 index 0000000..5a20ec2 --- /dev/null +++ b/.github/workflows/plugin-linting.yml @@ -0,0 +1,41 @@ +name: Linting + +on: [push, 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: Set up ruby + uses: actions/setup-ruby@v1 + with: + ruby-version: 2.7 + + - name: Setup bundler + run: gem install bundler -v 2.1.4 --no-doc + + - name: Setup gems + run: bundle install --jobs 4 + + - name: Yarn install + run: yarn install --dev + + - name: ESLint + run: yarn eslint --ext .js,.js.es6 --no-error-on-unmatched-pattern assets/javascripts + + - name: Prettier + run: | + yarn prettier -v + yarn prettier --list-different \ + "assets/**/*.{scss,js,es6}" + + - name: Rubocop + run: bundle exec rubocop .