Skip to content

Commit

Permalink
feat(github-action): add lint (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
galta95 authored Nov 25, 2020
1 parent fbccfe6 commit 9112efd
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 10 deletions.
17 changes: 8 additions & 9 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
name: Lint

on: [push, pull_request]
on: [pull_request]

jobs:
eslint:
name: Run JS Project eslint
name: Run eslint
runs-on: ubuntu-latest

steps:
- name: Check out JS Project Git repository
- name: Check out Git repository
uses: actions/checkout@v2

- name: Set up Node.js
Expand All @@ -17,15 +17,14 @@ jobs:
node-version: 12

# ESLint and Prettier must be in `package.json`
- name: Install JS Project dependencies
working-directory: ./projectTemplates/js-server
- name: Install Node.js dependencies
run: npm install

- name: Run JS Project linters
uses: wearerequired/lint-action@v1
- name: Run linters
uses: samuelmeuli/lint-action@v1
with:
github_token: ${{ secrets.github_token }}
# Enable linters
eslint: true
eslint_dir: ./projectTemplates/js-server/
eslint_extensions: js
eslint_extensions: ts
# prettier: true
5 changes: 5 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
},
"homepage": "https://github.com/MapColonies/node-osm-api#readme",
"dependencies": {
"axios": "^0.21.0"
"axios": "^0.21.0",
"typescript": "^4.1.2"
},
"devDependencies": {
"@commitlint/config-conventional": "^11.0.0",
Expand Down

0 comments on commit 9112efd

Please sign in to comment.