Skip to content

Commit

Permalink
Migrate to TypeScript/Upgrade API (#19)
Browse files Browse the repository at this point in the history
  • Loading branch information
jalal246 committed Mar 3, 2021
1 parent ba1697b commit 605893d
Show file tree
Hide file tree
Showing 20 changed files with 1,261 additions and 1,351 deletions.
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

0 comments on commit 605893d

Please sign in to comment.