Skip to content

Commit

Permalink
fix: eslint/prettier combination also with github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
mabunixda committed Sep 30, 2022
1 parent 1064922 commit b4c8d8a
Show file tree
Hide file tree
Showing 14 changed files with 1,863 additions and 1,637 deletions.
1 change: 1 addition & 0 deletions .eslintrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ env:
es2021: true
extends:
- standard
- prettier
parserOptions:
ecmaVersion: latest
rules: {}
40 changes: 26 additions & 14 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,24 +15,36 @@ jobs:
matrix:
node: [14,16]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
- uses: actions/checkout@v3

- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
- uses: actions/checkout@master
- name: Shell Linter
uses: azohra/[email protected]
- name: Cache node_modules
id: cache-modules

- name: Cache node modules
id: cache
uses: actions/cache@v1
with:
path: node_modules
key: ${{ runner.OS }}-build-${{ hashFiles('package.json') }}
- name: install check deps
run: npm install npm-check mocha eslint
- name: eslint
run: ./scripts/lint.sh
- run: npm ci
path: node_modules # npm cache files are stored in `~/.npm` on Linux/macOS
key: ${{ runner.os }}-node_modules-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Install Dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: npm ci

- name: Prettier
run: npm run fmt:check

- name: ESlint
run: npm run eslint:github-action

- name: Shell Linter
uses: azohra/[email protected]

# - run: npm test
release:
runs-on: ubuntu-latest
Expand Down
Loading

0 comments on commit b4c8d8a

Please sign in to comment.