Skip to content

Commit

Permalink
Merge pull request #340 from open-rpc/feat/eslint-ghaction
Browse files Browse the repository at this point in the history
Feat/eslint ghaction
  • Loading branch information
BelfordZ authored Mar 28, 2020
2 parents d250f8d + 8d56209 commit 96fc2b0
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 126 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/[email protected]
- uses: actions/checkout@v1
- name: install eslint
run: npm install [email protected] @typescript-eslint/[email protected] @typescript-eslint/[email protected]
- name: lint
run: ./node_modules/.bin/eslint . --ext .ts
112 changes: 0 additions & 112 deletions package-lock.json

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

4 changes: 1 addition & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
"main": "build/src/index.js",
"scripts": {
"build": "tsc",
"test": "npm run lint && npm run build && jest",
"lint": "tslint -c tslint.json 'src/*.ts' --fix",
"test": "npm run build && jest",
"publish": "npm run test && npm run build",
"test:watch": "npm run test -- --watch"
},
Expand Down Expand Up @@ -34,7 +33,6 @@
"jest": "^25.1.0",
"lodash": "^4.17.11",
"ts-jest": "^25.0.0",
"tslint": "^6.0.0",
"typescript": "^3.3.3333",
"json-schema-ref-parser": "^7.0.1"
},
Expand Down
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ import apiWithExamples from "../service-descriptions/api-with-examples-openrpc.j
import simpleMath from "../service-descriptions/simple-math-openrpc.json";
import { OpenrpcDocument as OpenRPC } from "@open-rpc/meta-schema";

export interface IExamples {
export interface Examples {
[key: string]: OpenRPC;
}

const examples: IExamples = {
const examples: Examples = {
apiWithExamples: apiWithExamples as OpenRPC,
links: links as OpenRPC,
petstore: petstore as OpenRPC,
Expand Down
9 changes: 0 additions & 9 deletions tslint.json

This file was deleted.

0 comments on commit 96fc2b0

Please sign in to comment.