Skip to content

Commit

Permalink
Merge pull request #1 from simonyiszk/add-static-analysis-action
Browse files Browse the repository at this point in the history
Added static analysis actions file
  • Loading branch information
berenteb authored Nov 24, 2023
2 parents 57d3f24 + 762b066 commit 7a8f96d
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 6 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/static-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Static Analysis

on:
push:
branches:
- master
- dev
pull_request:
branches:
- master
- dev

jobs:
eslint:
name: ESLint Check
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3

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

- name: Install dependencies
run: yarn install --frozen-lockfile --non-interactive --production=false

- name: Run ESLint check
run: yarn lint:check
prettier:
name: Prettier Check
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3

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

- name: Install dependencies
run: yarn install --frozen-lockfile --non-interactive --production=false

- name: Run Prettier check
run: yarn prettier:check
7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@
"dev": "next dev",
"build": "next build",
"start": "next start",
"lint": "next lint"
"lint": "eslint \"./src/**/*.ts?(x)\" --fix",
"lint:check": "eslint \"./src/**/*.ts?(x)\"",
"prettier": "prettier --write \"src/**/*.(ts|tsx)\"",
"prettier:check": "prettier --check \"src/**/*.(ts|tsx)\""
},
"author": {
"name": "Simonyi Károly Szakkollégium",
Expand All @@ -32,6 +35,6 @@
"postcss": "^8",
"prettier": "^3.1.0",
"tailwindcss": "^3.3.0",
"typescript": "^5"
"typescript": "~5.2.2"
}
}
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2689,10 +2689,10 @@ typed-array-length@^1.0.4:
for-each "^0.3.3"
is-typed-array "^1.1.9"

typescript@^5:
version "5.3.2"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.3.2.tgz#00d1c7c1c46928c5845c1ee8d0cc2791031d4c43"
integrity sha512-6l+RyNy7oAHDfxC4FzSJcz9vnjTKxrLpDG5M2Vu4SHRVNg6xzqZp6LYSR9zjqQTu8DU/f5xwxUdADOkbrIX2gQ==
typescript@~5.2.2:
version "5.2.2"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.2.2.tgz#5ebb5e5a5b75f085f22bc3f8460fba308310fa78"
integrity sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==

unbox-primitive@^1.0.2:
version "1.0.2"
Expand Down

0 comments on commit 7a8f96d

Please sign in to comment.