Skip to content

Commit

Permalink
refactor: rewrite with less dependencies (#114)
Browse files Browse the repository at this point in the history
  • Loading branch information
Brian Faust committed Jan 31, 2022
1 parent 667fb3c commit 295cda5
Show file tree
Hide file tree
Showing 83 changed files with 8,988 additions and 9,553 deletions.
6 changes: 6 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,9 @@ end_of_line = lf
insert_final_newline = true
indent_style = tab
trim_trailing_whitespace = true

[*.md]
trim_trailing_whitespace = false

[*.{yml,yaml}]
indent_size = 4
5 changes: 3 additions & 2 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
/__tests__/**/*.spec.ts
/__snapshots__/
/__tests__/unit/coverage/
/*.js
/build/
/config/
/dist/
/distribution/
/docs/
/prisma/
/node_modules/**
env.json
48 changes: 45 additions & 3 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,37 @@
"project": "./tsconfig.eslint.json",
"extraFileExtensions": [".json"]
},
"plugins": ["@typescript-eslint", "jest", "prettier", "simple-import-sort"],
"plugins": [
"@typescript-eslint",
"jest",
"prettier",
"simple-import-sort",
"unused-imports",
"eslint-plugin-tsdoc"
],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking",
"plugin:@typescript-eslint/recommended",
"plugin:import/errors",
"plugin:import/typescript",
"plugin:import/warnings",
"plugin:jest/recommended",
"plugin:prettier/recommended",
"prettier/@typescript-eslint"
"prettier"
],
"rules": {
"@typescript-eslint/ban-ts-comment": "off",
"@typescript-eslint/ban-types": "off",
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/naming-convention": "off",
"@typescript-eslint/no-empty-function": "off",
"@typescript-eslint/no-empty-interface": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-misused-promises": "off",
"@typescript-eslint/no-non-null-asserted-optional-chain": "off",
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/no-unsafe-assignment": "off",
"@typescript-eslint/no-unsafe-call": "off",
"@typescript-eslint/no-unsafe-member-access": "off",
Expand All @@ -29,13 +44,40 @@
"@typescript-eslint/require-await": "off",
"@typescript-eslint/restrict-plus-operands": "off",
"@typescript-eslint/restrict-template-expressions": "off",
"import/default": "error",
"import/export": "warn",
"import/exports-last": "warn",
"import/extensions": "error",
"import/first": "error",
"import/group-exports": "off",
"import/namespace": "error",
"import/no-absolute-path": "error",
"import/no-anonymous-default-export": "error",
"import/no-cycle": "warn",
"import/no-deprecated": "error",
"import/no-duplicates": "error",
"import/no-dynamic-require": "off",
"import/no-extraneous-dependencies": "error",
"import/no-mutable-exports": "error",
"import/no-namespace": "warn",
"import/no-restricted-paths": "error",
"import/no-self-import": "error",
"import/no-unresolved": "warn",
"import/no-unused-modules": "error",
"import/no-useless-path-segments": "error",
"import/no-webpack-loader-syntax": "error",
"import/order": "error",
"jest/no-conditional-expect": "off",
"no-async-promise-executor": "off",
"no-prototype-builtins": "off",
"prefer-const": [
"error",
{
"destructuring": "all"
}
],
"prettier/prettier": "error",
"simple-import-sort/sort": "error"
"tsdoc/syntax": "off",
"unused-imports/no-unused-imports-ts": "warn"
}
}
4 changes: 4 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
# https://www.kernel.org/pub/software/scm/git/docs/gitattributes.html

# Ignore all test and documentation with "export-ignore".
/.editorconfig export-ignore
/.gitattributes export-ignore
/.gitignore export-ignore
/.travis.yml export-ignore
/__tests__ export-ignore
/docs export-ignore
/README.md export-ignore
34 changes: 34 additions & 0 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: CD

on:
push:
branches:
- "master"

jobs:
publish:
if: "contains(github.event.head_commit.message, 'release:')"
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
registry-url: "https://registry.npmjs.org"
- name: Cache .pnpm-store
uses: actions/cache@v1
with:
path: ~/.pnpm-store
key: ${{ runner.os }}-node${{ matrix.node-version }}-${{ hashFiles('**/pnpm-lock.yaml') }}
- name: Install pnpm
run: curl -f https://get.pnpm.io/v6.14.js | node - add --global pnpm@6
- name: Install
run: pnpm install
- name: Publish
run: npm publish --access=public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
40 changes: 40 additions & 0 deletions .github/workflows/cf.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: CF

on:
pull_request:
types: [ready_for_review, synchronize, opened]

jobs:
prettier:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x]
concurrency:
group: ${{ github.head_ref }}-prettier
cancel-in-progress: true
steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.head_ref }}
token: ${{ secrets.GH_TOKEN }}
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- name: Cache .pnpm-store
uses: actions/cache@v1
with:
path: ~/.pnpm-store
key: ${{ runner.os }}-node${{ matrix.node-version }}-${{ hashFiles('**/pnpm-lock.yaml') }}
- name: Install pnpm
run: curl -f https://get.pnpm.io/v6.14.js | node - add --global pnpm@6
- name: Install
run: pnpm install
- name: Lint
run: pnpm run lint
- name: Format
run: pnpm run prettier
- uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: "style: resolve style guide violations"
46 changes: 46 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: CI

on:
push:
branches:
- "master"
- "develop"
pull_request:
types: [ready_for_review, synchronize, opened]

jobs:
conflicts:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
ref: ${{ github.head_ref }}
- name: Merge Conflict finder
uses: olivernybroe/action-conflict-finder@v1.1
test:
needs: [conflicts]
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x]
concurrency:
group: ${{ github.head_ref }}-sdk
cancel-in-progress: true
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- name: Cache .pnpm-store
uses: actions/cache@v1
with:
path: ~/.pnpm-store
key: ${{ runner.os }}-node${{ matrix.node-version }}-${{ hashFiles('**/pnpm-lock.yaml') }}
- name: Install pnpm
run: curl -f https://get.pnpm.io/v6.14.js | node - add --global pnpm@6
- name: Install
run: pnpm install
- name: Test
run: pnpm run test
34 changes: 0 additions & 34 deletions .github/workflows/test.yml

This file was deleted.

39 changes: 14 additions & 25 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,11 @@ lib-cov

# Coverage directory used by tools like istanbul
.coverage
coverage

# nyc test coverage
.nyc_output

# vscode
.vscode

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

Expand All @@ -30,20 +28,18 @@ lib-cov
# Build results
app.js

# JetBrains settings
.idea

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

# Dependency directories
node_modules
jspm_packages

# Generated doc directory
doc
docs

# Optional npm cache directory
.npm
package-lock.json

# Mac OS X local settings
.DS_Store
Expand All @@ -52,28 +48,21 @@ bundle.min.js

# Build
dist
distribution

# Microsoft Visual Studio settings
.vs
.vscode

# Databases
*.sqlite

# Random
docker/development

#Webstorm/Intellij
.idea

# Vagrant
.vagrant

# oclif
tmp
oclif.manifest.json
npm-shrinkwrap.json
# Environment
.env
env.json

# Transaction Pool
transaction-pool.sqlite
transaction-pool.sqlite-shm
transaction-pool.sqlite-wal
# Rush temporary files
common/deploy/
common/temp/
common/autoinstallers/*/.npmrc
**/.rush/temp/
6 changes: 3 additions & 3 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.coverage
.pnp.js
.yarn/**
dist
distribution
docs
packages/**/distribution
packages/**/prisma
1 change: 0 additions & 1 deletion .yarnrc

This file was deleted.

1 change: 0 additions & 1 deletion CODEOWNERS

This file was deleted.

Loading

0 comments on commit 295cda5

Please sign in to comment.