Skip to content

Commit

Permalink
chore: oss migration (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
danadajian authored Jun 27, 2022
1 parent a4ed1d6 commit 9a2fd36
Show file tree
Hide file tree
Showing 32 changed files with 21,006 additions and 408 deletions.
7 changes: 1 addition & 6 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,13 @@ indent_size = 4
trim_trailing_whitespace = true
insert_final_newline = true
charset = utf-8
end_of_line = lf

[*.{yaml,yml}]
indent_size = 2

[*.{ts,js}]
[*.{ts,js,json}]
indent_size = 2

[*.bat]
indent_style = tab
end_of_line = crlf

[LICENSE]
insert_final_newline = false

Expand Down
3 changes: 3 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
dist
lib
node_modules
60 changes: 60 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
{
"plugins": ["cypress", "jest", "@typescript-eslint"],
"extends": ["plugin:github/recommended"],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 9,
"sourceType": "module",
"project": "./tsconfig.json"
},
"rules": {
"import/no-dynamic-require": "off",
"prefer-arrow-callback": "error",
"no-trailing-spaces": "error",
"eslint-comments/no-use": "off",
"import/named": "off",
"import/no-namespace": "off",
"no-console": "error",
"no-shadow": "off",
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": "error",
"@typescript-eslint/no-require-imports": "off",
"@typescript-eslint/array-type": "error",
"@typescript-eslint/ban-ts-comment": "error",
"camelcase": "off",
"@typescript-eslint/consistent-type-assertions": "error",
"@typescript-eslint/func-call-spacing": ["error", "never"],
"@typescript-eslint/no-array-constructor": "error",
"@typescript-eslint/no-empty-interface": "error",
"@typescript-eslint/no-extraneous-class": "error",
"@typescript-eslint/no-for-in-array": "error",
"@typescript-eslint/no-inferrable-types": "error",
"@typescript-eslint/no-misused-new": "error",
"@typescript-eslint/no-namespace": "off",
"@typescript-eslint/no-non-null-assertion": "warn",
"@typescript-eslint/no-unnecessary-qualifier": "error",
"@typescript-eslint/no-unnecessary-type-assertion": "error",
"@typescript-eslint/no-useless-constructor": "error",
"@typescript-eslint/no-var-requires": "off",
"@typescript-eslint/prefer-function-type": "warn",
"@typescript-eslint/prefer-includes": "error",
"@typescript-eslint/prefer-string-starts-ends-with": "error",
"@typescript-eslint/require-array-sort-compare": "error",
"@typescript-eslint/restrict-plus-operands": "error",
"@typescript-eslint/type-annotation-spacing": "error",
"@typescript-eslint/no-explicit-any": "error",
"github/array-foreach": "off",
"github/no-then": "off",
"i18n-text/no-en": "off",
"import/no-unresolved": "off",
"filenames/match-regex": [2, "(^[a-z-]+$)|(^[a-z-]+\\.test$)"],
"quotes": ["error", "single"]
},
"env": {
"node": true,
"es6": true,
"cypress/globals": true,
"jest/globals": true,
"mocha": true
}
}
10 changes: 7 additions & 3 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
- package-ecosystem: 'npm'
directory: '/'
schedule:
interval: "daily"
interval: 'weekly'
- package-ecosystem: 'github-actions'
directory: '/'
schedule:
interval: 'weekly'
24 changes: 18 additions & 6 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,27 @@ on:
- main

jobs:
build:
release:
name: Release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-node@v2
- run: |
npm install semantic-release semantic-release/git
npx semantic-release --debug --no-ci

- name: Setup Node
uses: actions/setup-node@v3
with:
node-version-file: .nvmrc

- name: Install
run: npm ci

- name: Build
run: npm run build

- name: Create Release
run: npx semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
29 changes: 23 additions & 6 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,31 @@
name: "Test"
name: PR Checks

on:
pull_request:
branches:
- main

jobs:
test:
name: Build and Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Checkout
uses: actions/checkout@v3

- name: Setup Node
uses: actions/setup-node@v3
with:
ref: ${{ github.event.pull_request.head.ref }}
- uses: actions/setup-python@v2
- run: |
echo "Execute tests here"
node-version-file: .nvmrc

- name: Install
run: npm ci

- name: Lint
run: npm run lint

- name: Unit Tests
run: npm run test

- name: Integration Tests
run: npm run cypress
77 changes: 4 additions & 73 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,74 +1,5 @@
# Project files #
#################
*.iml
*.ipr
*.iws
nbactions.xml
/.idea/

# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so

# Maven target #
################
*/target/**

# H2 db files #
###############
mem.h2.db
mem.lock.db

# HSQLDB files #
################
testdb.log
testdb.properties
testdb.script


# Packages #
############
# it's better to unpack these files and commit the raw source
# git has its own built in compression methods
*.7z
*.dmg
*.gz
*.iso
*.jar
*.rar
*.tar
*.zip

# Logs and databases #
######################
*.log
*.sqlite
metastore_db

# OS generated files #
######################
dist
node_modules
.idea
.DS_Store
.DS_Store?
._*
.Spotlight-V100
.Trashes
Icon?
ehthumbs.db
Thumbs.db

# Temporary files #
###################
*~
/target/

# Eclipse #
###########
.classpath
.project
.settings/

cypress/screenshots
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"

npm run lint && npm run format && git add .
12 changes: 12 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
.editorconfig
.eslintignore
.husky
.nvmrc
.prettierignore
.idea
.github
cypress
src
test
*.json
*.yaml
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
registry=https://registry.npmjs.org
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
18
2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
dist
node_modules
8 changes: 8 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"printWidth": 140,
"useTabs": false,
"singleQuote": true,
"trailingComma": "none",
"bracketSpacing": true,
"arrowParens": "avoid"
}
22 changes: 22 additions & 0 deletions .releaserc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
plugins:
- - '@semantic-release/commit-analyzer'
- preset: angular
releaseRules:
- breaking: true
release: major
- type: breaking
release: major
- type: docs
release: patch
- type: refactor
release: patch
- scope: no-release
release: false
- '@semantic-release/release-notes-generator'
- '@semantic-release/npm'
- '@semantic-release/github'
- '@semantic-release/changelog'
- - '@semantic-release/git'
- message: "chore(release): v${nextRelease.version} \n\n${nextRelease.notes}"
branches:
- main
73 changes: 0 additions & 73 deletions CODE-OF-CONDUCT.md

This file was deleted.

Loading

0 comments on commit 9a2fd36

Please sign in to comment.