Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate to TypeScript/Upgrade API #19

Merged
merged 9 commits into from
Mar 3, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
node_modules/
dist/
lib
13 changes: 7 additions & 6 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
module.exports = {
parser: "@typescript-eslint/parser",
parserOptions: {
ecmaVersion: 12,
sourceType: "module",
},
env: {
browser: false,
commonjs: true,
browser: true,
es2021: true,
},
extends: ["airbnb-base", "prettier"],
parserOptions: {
ecmaVersion: 12,
},
plugins: ["@typescript-eslint"],
globals: {
describe: true,
it: true,
expect: true,
},
rules: {},
};
5 changes: 2 additions & 3 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,10 @@ updates:
- package-ecosystem: "npm" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "weekly"
interval: "monthly"
day: "sunday"


- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
interval: "weekly"
76 changes: 76 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
name: CI

on:
push:
branches:
- master
pull_request:

jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@master

- name: Use latest version of Node.j
uses: actions/setup-node@master
with:
node-version: "*"

- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"

- name: Cache yarn cache
uses: actions/cache@v2.1.4
id: yarn-cache #`steps.yarn-cache.outputs.cache-hit != 'true'
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-

- name: Install Dependencies
run: yarn install

- name: Compile to JS
run: "yarn tsc"

- name: Run lint
run: yarn eslint .

test:
name: Unit Test
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@master

- name: Use latest version of Node.j
uses: actions/setup-node@master
with:
node-version: "*"

- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"

- name: Cache yarn cache
uses: actions/cache@v2.1.4
id: yarn-cache #`steps.yarn-cache.outputs.cache-hit != 'true'
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: $s{{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-

- name: Install Dependencies
run: yarn install

- name: Compile to JS
run: "yarn tsc"

- name: Run Test
run: CI=true yarn mocha
32 changes: 0 additions & 32 deletions .github/workflows/lint.yml

This file was deleted.

32 changes: 0 additions & 32 deletions .github/workflows/test.yml

This file was deleted.

8 changes: 1 addition & 7 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,2 @@
node_modules
*.log
.changelog
build
dist
draft
scripts
react
/lib
Loading