Skip to content

Commit

Permalink
feat: BREAKING CHANGE - refactor to TypeScript
Browse files Browse the repository at this point in the history
  • Loading branch information
exbotanical committed Nov 10, 2021
1 parent 97a972e commit c1346bd
Show file tree
Hide file tree
Showing 102 changed files with 12,040 additions and 10,483 deletions.
12 changes: 2 additions & 10 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -1,14 +1,6 @@
{
"presets": [
["@babel/preset-env", {
"shippedProposals": true
}]
],
"plugins": [
["@babel/plugin-proposal-private-methods"],
["@babel/plugin-proposal-class-properties"],
["@babel/plugin-transform-runtime", {
"regenerator": true
}]
["@babel/preset-env", { "targets": { "node": 10 } }],
"@babel/preset-typescript"
]
}
35 changes: 24 additions & 11 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,22 +1,35 @@
root = true

[*.js]
[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

[*.{ts,tsx,js,jsx,html,vue}]
indent_style = tab
indent_size = 2
trim_trailing_whitespace = true
insert_final_newline = true
end_of_line = lf

[*.md]
[*.json]
indent_style = tab
indent_size = 2
trim_trailing_whitespace = true
insert_final_newline = true
end_of_line = lf

[*.{sh,bash}]
indent_style = tab
indent_size = 2
trim_trailing_whitespace = true
insert_final_newline = true
end_of_line = lf

[*.{css,scss}]
indent_style = tab
indent_size = 2

[*.{go}]
indent_style = tab
indent_size = 2

[*.{c,h}]
indent_style = tab
indent_size = 2

[*.md]
indent_style = space
indent_size = 2
44 changes: 16 additions & 28 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,30 +1,18 @@
{
"env": {
"browser": true,
"es2021": true,
"node": true
},
"parser": "@babel/eslint-parser",
"parserOptions": {
"ecmaVersion": 12,
"sourceType": "module",
"ecmaFeatures": {
"impliedStrict": true,
"modules": true
}
},
"extends": [
"eslint:recommended"
],
"rules": {
"no-console": "warn",
"comma-dangle": "error",
"semi": "error",
"space-before-function-paren": "error"
},
"ignorePatterns": [
"repl.js",
"**/*__tests__"
],
"reportUnusedDisableDirectives": true
"extends": [
"@magister_zito/typescript",
"prettier"
],
"plugins": [
"jest"
],
"env": {
"jest/globals": true
},
"ignorePatterns": [
"node_modules",
".build",
"coverage",
"dist"
]
}
16 changes: 16 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
version: 2
updates:

- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "monthly"
open-pull-requests-limit: 1
assignees:
- "MatthewZito"
pull-request-branch-name:
separator: "-"
commit-message:
prefix: "chore: "
include: "scope"

65 changes: 65 additions & 0 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: Continuous Deployment

on:
# a push always happens when we merge, ergo this is the
# equivalent of `on.merge.branches.master`
push:
branches:
- master

jobs:
publish:
name: Publish on NPM
runs-on: ubuntu-latest
steps:
- name: Git Checkout
uses: actions/checkout@v2

- name: Setup pnpm
uses: pnpm/action-setup@646cdf48217256a3d0b80361c5a50727664284f2
with:
version: 6.14.7

- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: 'lts/*'
cache: 'pnpm'

- name: Install dependencies
run: pnpm install --no-frozen-lockfile

- name: Transpile and Bundle Library
run: pnpm build

- name: Publish to NPM
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npx semantic-release

upload_coverage:
runs-on: ubuntu-latest

steps:
- name: Git Checkout
uses: actions/checkout@v2

- name: Setup pnpm
uses: pnpm/action-setup@646cdf48217256a3d0b80361c5a50727664284f2
with:
version: 6.14.7

- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: 'lts/*'
cache: 'pnpm'

- run: pnpm install --no-frozen-lockfile
- run: pnpm test

- name: Upload Coverage Report via Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
18 changes: 18 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Continuous Integration

on:
pull_request:
branches:
- master

jobs:

lint:
uses: MatthewZito/.github/.github/workflows/pnpm_script_run.yml@master
with:
script_name: lint

unit_test:
uses: MatthewZito/.github/.github/workflows/pnpm_script_run.yml@master
with:
script_name: test
123 changes: 120 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,122 @@
node_modules
.env
repl.js
# Project-Specific Addenda
.build
.rollup.cache

# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage
*.lcov

# nyc test coverage
.nyc_output

# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# Snowpack dependency directory (https://snowpack.dev/)
web_modules/

# TypeScript cache
*.tsbuildinfo

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Microbundle cache
.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env
.env.test

# parcel-bundler cache (https://parceljs.org/)
.cache
.parcel-cache

# Next.js build output
.next
out

# Nuxt.js build / generate output
.nuxt
dist

# Gatsby files
.cache/
# Comment in the public line in if your project uses Gatsby and not Next.js
# https://nextjs.org/blog/next-9-1#public-directory-support
# public

# vuepress build output
.vuepress/dist

# Serverless directories
.serverless/

# FuseBox cache
.fusebox/

# DynamoDB Local files
.dynamodb/

# TernJS port file
.tern-port

# Stores VSCode versions used for testing VSCode extensions
.vscode-test

# yarn v2
.yarn/cache
.yarn/unplugged
.yarn/build-state.yml
.yarn/install-state.gz
.pnp.*

temp
4 changes: 4 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

commitlint -E HUSKY_GIT_PARAMS
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

lint-staged
5 changes: 5 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
useTabs: true
singleQuote: true
quoteProps: "consistent"
trailingComma: "none"
arrowParens: "always"
20 changes: 0 additions & 20 deletions .travis.yml

This file was deleted.

Loading

0 comments on commit c1346bd

Please sign in to comment.