Skip to content

Commit

Permalink
add pre-commit and eslint as github action (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanrhee authored Aug 2, 2021
1 parent 01debf2 commit e2ae138
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .eslintrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
env:
browser: true
es2021: true
extends:
- standard
parserOptions:
ecmaVersion: 12
sourceType: module
rules: {}
12 changes: 12 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: CI
on:
pull_request:
push:
branches: [master]
jobs:
Lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- uses: pre-commit/[email protected]
20 changes: 20 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:

- repo: https://github.com/pre-commit/mirrors-eslint
rev: v7.32.0
hooks:
- id: eslint
additional_dependencies:
- [email protected]
- [email protected]
- eslint-plugin-import
- eslint-plugin-node
- eslint-plugin-promise
exclude: |
(?x)^(
(.*/)*\.pnp\.cjs|
\.yarn\/cache\/.+
)$
1 change: 1 addition & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
console.log('hello, world')

0 comments on commit e2ae138

Please sign in to comment.