Skip to content

Commit e2ae138

Browse files
authored
add pre-commit and eslint as github action (#1)
1 parent 01debf2 commit e2ae138

File tree

4 files changed

+42
-0
lines changed

4 files changed

+42
-0
lines changed

.eslintrc.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
env:
2+
browser: true
3+
es2021: true
4+
extends:
5+
- standard
6+
parserOptions:
7+
ecmaVersion: 12
8+
sourceType: module
9+
rules: {}

.github/workflows/ci.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name: CI
2+
on:
3+
pull_request:
4+
push:
5+
branches: [master]
6+
jobs:
7+
Lint:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v2
11+
- uses: actions/setup-python@v2
12+
- uses: pre-commit/[email protected]

.pre-commit-config.yaml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
# See https://pre-commit.com for more information
3+
# See https://pre-commit.com/hooks.html for more hooks
4+
repos:
5+
6+
- repo: https://github.com/pre-commit/mirrors-eslint
7+
rev: v7.32.0
8+
hooks:
9+
- id: eslint
10+
additional_dependencies:
11+
12+
13+
- eslint-plugin-import
14+
- eslint-plugin-node
15+
- eslint-plugin-promise
16+
exclude: |
17+
(?x)^(
18+
(.*/)*\.pnp\.cjs|
19+
\.yarn\/cache\/.+
20+
)$

index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
console.log('hello, world')

0 commit comments

Comments
 (0)