Skip to content

Commit

Permalink
ci: configure linters
Browse files Browse the repository at this point in the history
  • Loading branch information
ianwremmel committed Aug 16, 2020
1 parent 287cc78 commit 79e3428
Show file tree
Hide file tree
Showing 5 changed files with 2,160 additions and 3 deletions.
18 changes: 18 additions & 0 deletions .eslintrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
extends:
- 'plugin:@ianwremmel/ianwremmel/node'
- prettier

overrides:
# make sure eslint lints all files
- files:
- '**/*.ts'
extends:
- 'plugin:@ianwremmel/ianwremmel/typescript'

- files:
- '**/*.js'
parserOptions:
sourceType: script

rules:
no-console: error
38 changes: 36 additions & 2 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,44 @@ jobs:
fixup:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: actions/checkout@v2.3.2
- uses: ianwremmel/prevent-fixup-commits@v1.0.1
nopush:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: actions/checkout@v2.3.2
- uses: ianwremmel/prevent-nopush-commits@v1.0.2
eslint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.3.2
- uses: actions/setup-node@v2.1.1
with:
node-version: '12'
- run: npm install
- run: npm run lint:es
env:
ESLINT_FORMAT_OPTIONS:
'--format json-with-metadata --output-file reports/style/eslint.json'
- uses: check-run-reporter/action@typescript-action
if: ${{ always() }}
with:
report: 'reports/style/eslint.json'
token: ${{ secrets.CHECK_RUN_REPORTER_TOKEN }}
tsc:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.3.2
- uses: actions/setup-node@v2.1.1
with:
node-version: '12'
- run: npm install
- run: mkdir -p reports/style
- run: npm run lint:types
env:
TSC_OPTIONS: '| tee reports/style/tsc.log'
- uses: check-run-reporter/action@typescript-action
if: ${{ always() }}
with:
report: 'reports/style/tsc.log'
token: ${{ secrets.CHECK_RUN_REPORTER_TOKEN }}
5 changes: 4 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
'use strict';

require('./babel-register')
require('./babel-register');
// as our typescript entrypoint, eslint-plugin-import doesn't know src/index
// exists
// eslint-disable-next-line import/no-unresolved
require('./src/index');
Loading

0 comments on commit 79e3428

Please sign in to comment.