Skip to content

Commit

Permalink
Merge branch 'master' into Ashleyhx-patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
Ashleyhx committed Dec 12, 2023
2 parents 25a3fb6 + 59f7565 commit 1b19d10
Show file tree
Hide file tree
Showing 23 changed files with 1,893 additions and 1,561 deletions.
13 changes: 13 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
module.exports = {
extends: [
'plugin:vue/vue3-recommended',
// 'plugin:vue/recommended' // Use this if you are using Vue.js 2.x.
],
parserOptions: {
ecmaVersion: 2022,
},
rules: {
// override/add rules settings here, such as:
// 'vue/no-unused-vars': 'error'
}
}
9 changes: 8 additions & 1 deletion .github/workflows/build-and-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,17 @@ name: Build-And-Deploy
on:
push:
branches:
- "master"
- master

jobs:
lint:
name: Lint
uses: ./.github/workflows/lint.yml
secrets: inherit

docker:
needs: lint
name: Build and push Docker image
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand Down
46 changes: 46 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Lint

on:
pull_request:
branches:
- master
workflow_call:

permissions:
checks: write
contents: write

jobs:
run-linters:
name: Run linters
runs-on: ubuntu-latest

steps:
- name: Check out Git repository
uses: actions/checkout@v3
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.head.ref }}

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'

- name: Install dependencies
run: npm install

- name: Run linters without auto-fix (on master)
if: github.ref == 'refs/heads/master'
run: ./node_modules/.bin/eslint --ext .js,.vue src

- name: Run linters with auto-fix (on non-master branches)
if: github.ref != 'refs/heads/master'
run: ./node_modules/.bin/eslint --ext .js,.vue src --fix

- name: Commit changes
uses: EndBug/add-and-commit@v9
if: github.ref != 'refs/heads/master'
with:
author_name: Lint Bot
message: 'Run linters'
Loading

0 comments on commit 1b19d10

Please sign in to comment.