Skip to content

Commit

Permalink
feat: gh action to run eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
BelfordZ committed Mar 28, 2020
1 parent 6036d16 commit 56ab736
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 12 deletions.
12 changes: 12 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
module.exports = {
root: true,
parser: '@typescript-eslint/parser',
plugins: [
'@typescript-eslint',
],
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
],
};
15 changes: 15 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
on:
pull_request:

jobs:
lint:
name: lint
runs-on: ubuntu-latest
steps:
- name: nodenv/setup-nodenv
uses: nodenv/actions-setup-nodenv@v2.0.4
- uses: actions/checkout@v1
- name: install eslint
run: npm install eslint@6.8.0 @typescript-eslint/parser@2.25.0 @typescript-eslint/eslint-plugin@2.25.0
- name: lint
run: ./node_modules/.bin/eslint . --ext .ts
4 changes: 1 addition & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@
},
"scripts": {
"build": "tsc && bin/build.js",
"test": "npm run lint && jest src/test.js",
"lint": "tslint -c tslint.json 'src/index.ts' --fix",
"test": "jest src/test.js",
"test:watch": "npm run test -- --watch"
},
"license": "Apache-2.0",
Expand All @@ -33,7 +32,6 @@
"json-schema-ref-parser": "^8.0.0",
"lodash": "^4.17.11",
"node-fetch": "^2.3.0",
"tslint": "^6.1.0",
"typescript": "^3.3.3333"
},
"keywords": [
Expand Down
9 changes: 0 additions & 9 deletions tslint.json

This file was deleted.

0 comments on commit 56ab736

Please sign in to comment.