This repository has been archived by the owner on Oct 13, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create base repository adding the following tooling: - eslint - prettier - rollup - typescript - github workflows - semantic-release (in dry run mode) - commit lint - lintstaged + husky - gitignore - dependabot [ch8753]
- Loading branch information
1 parent
21b51d6
commit 12281b2
Showing
23 changed files
with
10,961 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
module.exports = { | ||
presets: [ | ||
'@attest/config-babel-preset-typescript', | ||
'@attest/config-babel-preset-env-node', | ||
'@attest/config-babel-preset-jest', | ||
], | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
version: 1 | ||
update_configs: | ||
- package_manager: 'javascript' | ||
directory: '/' | ||
update_schedule: 'weekly' | ||
version_requirement_updates: increase_versions | ||
default_labels: | ||
- '🤖 Dependency update' | ||
commit_message: | ||
prefix: 'chore' | ||
include_scope: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
module.exports = { | ||
extends: ['@attest/typescript', '@attest/node'], | ||
parserOptions: { | ||
ecmaVersion: 2020, | ||
}, | ||
overrides: [ | ||
{ | ||
files: ['package.json'], | ||
rules: { | ||
'package-json/sort-collections': [ | ||
2, | ||
[ | ||
'devDependencies', | ||
'dependencies', | ||
'peerDependencies', | ||
'optionalDepedencies', | ||
'bundledDepednencies', | ||
'config', | ||
], | ||
], | ||
}, | ||
}, | ||
], | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Attest Codeowners File for annotations-action | ||
# Automatically adds original contributors to pull requests for packages | ||
|
||
# Note: This file was automatically generated from the @attest/generate-codeowners tool, any edits will be overwritten | ||
|
||
# Global codeowners (fallback) | ||
* blake.newman@askattest.com | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
name: Master Check & Publish | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
healthCheck: | ||
strategy: | ||
matrix: | ||
command: | ||
- typecheck | ||
- lint | ||
- format | ||
name: ${{ matrix.command }} | ||
runs-on: ubuntu-18.04 | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: 'Cache yarn' | ||
uses: actions/cache@v1 | ||
with: | ||
path: ~/.cache/yarn | ||
key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-yarn- | ||
- name: 'Cache node_modules' | ||
uses: actions/cache@v1 | ||
with: | ||
path: ${{ github.workspace }}/node_modules | ||
key: ${{ runner.os }}-node_modules-${{ hashFiles('yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-node_modules- | ||
- name: 'Setup registry' | ||
run: | | ||
echo "//npm.pkg.github.com/:_authToken=$GITHUB_TOKEN" >> ~/.npmrc | ||
echo "@attest:registry=https://npm.pkg.github.com/" >> ~/.npmrc | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.ADMIN_GH_TOKEN }} | ||
- name: 'Install dependencies' | ||
run: yarn install --frozen-lockfile | ||
- run: yarn ${{ matrix.command }} | ||
publish: | ||
needs: [healthCheck] | ||
runs-on: ubuntu-18.04 | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: Configure Git | ||
run: | | ||
git --version | ||
git config --global user.email admin@askattest.com | ||
git config --global user.name attest-admin | ||
git remote rm origin | ||
git remote add origin "https://attest-admin:$GITHUB_TOKEN@github.com/attest/fe-tools.git" | ||
git checkout -b master | ||
git push -u origin master | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.ADMIN_GH_TOKEN }} | ||
- name: 'Cache yarn' | ||
uses: actions/cache@v1 | ||
with: | ||
path: ~/.cache/yarn | ||
key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-yarn- | ||
- name: 'Cache node_modules' | ||
uses: actions/cache@v1 | ||
with: | ||
path: ${{ github.workspace }}/node_modules | ||
key: ${{ runner.os }}-node_modules-${{ hashFiles('yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-node_modules- | ||
- name: 'Setup registry' | ||
run: | | ||
echo "//npm.pkg.github.com/:_authToken=$GITHUB_TOKEN" >> ~/.npmrc | ||
echo "@attest:registry=https://npm.pkg.github.com/" >> ~/.npmrc | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.ADMIN_GH_TOKEN }} | ||
- name: 'Install dependencies' | ||
run: yarn install --frozen-lockfile | ||
- name: Build | ||
run: yarn build | ||
- name: Version | ||
run: yarn semantic-release -d | ||
env: | ||
GH_TOKEN: ${{ secrets.ADMIN_GH_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: Pull Request Check | ||
on: [pull_request] | ||
|
||
jobs: | ||
prCheck: | ||
strategy: | ||
matrix: | ||
command: | ||
- typecheck | ||
- lint | ||
- format | ||
- build | ||
name: ${{ matrix.command }} | ||
runs-on: ubuntu-18.04 | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: 'Cache yarn' | ||
uses: actions/cache@v1 | ||
with: | ||
path: ~/.cache/yarn | ||
key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-yarn- | ||
- name: 'Cache node_modules' | ||
uses: actions/cache@v1 | ||
with: | ||
path: ${{ github.workspace }}/node_modules | ||
key: ${{ runner.os }}-node_modules-${{ hashFiles('yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-node_modules- | ||
- name: 'Setup registry' | ||
run: | | ||
echo "//npm.pkg.github.com/:_authToken=$GITHUB_TOKEN" >> ~/.npmrc | ||
echo "@attest:registry=https://npm.pkg.github.com/" >> ~/.npmrc | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.ADMIN_GH_TOKEN }} | ||
- name: 'Install dependencies' | ||
run: yarn install --frozen-lockfile | ||
- run: yarn ${{ matrix.command }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
# csilk Gitignore default # | ||
########################### | ||
|
||
.env | ||
|
||
# Editors # | ||
########### | ||
.vscode | ||
.idea | ||
*.iml | ||
.project | ||
.gradle/ | ||
/nbproject/private/ | ||
|
||
# Compiled source # | ||
################### | ||
|
||
dist | ||
*.com | ||
*.class | ||
*.dll | ||
*.exe | ||
*.o | ||
*.so | ||
|
||
# Packages # | ||
############ | ||
|
||
*.7z | ||
*.dmg | ||
*.gz | ||
*.iso | ||
*.jar | ||
*.rar | ||
*.tar | ||
*.zip | ||
.vs | ||
*.msi | ||
*.nupkg | ||
|
||
# Logs and databases # | ||
###################### | ||
|
||
*.log | ||
*.sql | ||
*.sqlite | ||
npm-debug.log* | ||
coverage | ||
junit.xml | ||
|
||
# Caches # | ||
########## | ||
|
||
.eslintcache | ||
eslint-data | ||
/tmp/ | ||
/.cache-loader | ||
|
||
# Node # | ||
######## | ||
|
||
lib-cov | ||
*.seed | ||
*.log | ||
*.dat | ||
*.out | ||
*.pid | ||
*.gz | ||
pids | ||
logs | ||
npm-debug.log | ||
node_modules/ | ||
.pnp.js | ||
.pnp | ||
.yarn-meta | ||
/packages/lockfile/index.js | ||
/.nyc_output | ||
.npmrc | ||
|
||
# OS generated files # | ||
###################### | ||
|
||
.DS_Store | ||
.DS_Store? | ||
._* | ||
.Spotlight-V100 | ||
.Trashes | ||
ehthumbs.db | ||
Thumbs.db | ||
debug.log | ||
.settings | ||
.settings/* | ||
.buildpath | ||
*.iml | ||
sftp-config* | ||
*.sublime-* | ||
|
||
# Reports # | ||
###################### | ||
coverage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
module.exports = { | ||
hooks: { | ||
'pre-commit': 'lint-staged', | ||
'commit-msg': 'commitlint -E HUSKY_GIT_PARAMS', | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
.vscode/ | ||
dist/ | ||
node_modules/ | ||
.pnp.js | ||
CHANGELOG.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
module.exports = { | ||
'*.@(css|html|js|json|less|md|scss|ts|vue|yaml|yml)': [ | ||
'yarn prettier --ignore-path .lintignore --write', | ||
], | ||
'*.@(md|js|jsx|ts|tsx|json)': [ | ||
'yarn eslint --ext md,tsx,ts,js,ts,json --ignore-path .lintignore --fix', | ||
], | ||
'package.json': ['yarn codeowners'], | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
**/__tests__/**/package.json | ||
node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
module.exports = { | ||
release: { | ||
branches: ['master'], | ||
}, | ||
plugins: [ | ||
'@semantic-release/commit-analyzer', | ||
[ | ||
'@semantic-release/release-notes-generator', | ||
{ | ||
preset: '@attest/conventional-changelog', | ||
}, | ||
], | ||
[ | ||
'@semantic-release/changelog', | ||
{ | ||
preset: '@attest/conventional-changelog', | ||
changelogFile: 'CHANGELOG.md', | ||
}, | ||
], | ||
'@semantic-release/github', | ||
[ | ||
'@semantic-release/git', | ||
{ | ||
assets: ['CHANGELOG.md', 'dist/**'], | ||
}, | ||
], | ||
], | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# Contributing | ||
|
||
When contributing to this repository, please first discuss the change you wish to make via issue, | ||
email, or any other method with the owners of this repository before making a change. | ||
|
||
All code style is controlled by eslint and prettier, please do not disable unless there is good reason to do so | ||
|
||
## Submitting Changes | ||
|
||
### Committing | ||
|
||
We are using the [conventional commits](https://www.conventionalcommits.org/en/v1.0.0-beta.4/) format to commit our code, please read it as it has all the information you need. | ||
|
||
All commits require a `type`, `scope`, `description`, long form descriptive `body` and a ticket reference eg. `ch1234` | ||
|
||
They should be structured as follows: | ||
|
||
```bash | ||
|
||
feat(scope): I made a change | ||
|
||
BREAKING CHANGE: This is a description of the change i've made | ||
[ch1234] / #1234 | ||
``` | ||
### Pull Request Process | ||
Please send a GitHub Pull Request to Attest with a clear list of what you've done. | ||
|
||
PRs need to be approved by a repo owner as well as pass all CI/CD pipeline checks |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
The MIT License (MIT) | ||
|
||
Copyright (c) 2019 Attest Technologies Limited | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
Oops, something went wrong.