Skip to content
This repository was archived by the owner on Oct 13, 2020. It is now read-only.

Commit 12281b2

Browse files
committed
chore(repo): setup
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]
1 parent 21b51d6 commit 12281b2

23 files changed

+10961
-0
lines changed

.babelrc.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
module.exports = {
2+
presets: [
3+
'@attest/config-babel-preset-typescript',
4+
'@attest/config-babel-preset-env-node',
5+
'@attest/config-babel-preset-jest',
6+
],
7+
}

.dependabot/config.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
version: 1
2+
update_configs:
3+
- package_manager: 'javascript'
4+
directory: '/'
5+
update_schedule: 'weekly'
6+
version_requirement_updates: increase_versions
7+
default_labels:
8+
- '🤖 Dependency update'
9+
commit_message:
10+
prefix: 'chore'
11+
include_scope: true

.eslintrc.js

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
module.exports = {
2+
extends: ['@attest/typescript', '@attest/node'],
3+
parserOptions: {
4+
ecmaVersion: 2020,
5+
},
6+
overrides: [
7+
{
8+
files: ['package.json'],
9+
rules: {
10+
'package-json/sort-collections': [
11+
2,
12+
[
13+
'devDependencies',
14+
'dependencies',
15+
'peerDependencies',
16+
'optionalDepedencies',
17+
'bundledDepednencies',
18+
'config',
19+
],
20+
],
21+
},
22+
},
23+
],
24+
}

.github/CODEOWNERS

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Attest Codeowners File for annotations-action
2+
# Automatically adds original contributors to pull requests for packages
3+
4+
# Note: This file was automatically generated from the @attest/generate-codeowners tool, any edits will be overwritten
5+
6+
# Global codeowners (fallback)
7+
8+
9+
Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
name: Master Check & Publish
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
jobs:
9+
healthCheck:
10+
strategy:
11+
matrix:
12+
command:
13+
- typecheck
14+
- lint
15+
- format
16+
name: ${{ matrix.command }}
17+
runs-on: ubuntu-18.04
18+
steps:
19+
- uses: actions/checkout@v1
20+
- name: 'Cache yarn'
21+
uses: actions/cache@v1
22+
with:
23+
path: ~/.cache/yarn
24+
key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}
25+
restore-keys: |
26+
${{ runner.os }}-yarn-
27+
- name: 'Cache node_modules'
28+
uses: actions/cache@v1
29+
with:
30+
path: ${{ github.workspace }}/node_modules
31+
key: ${{ runner.os }}-node_modules-${{ hashFiles('yarn.lock') }}
32+
restore-keys: |
33+
${{ runner.os }}-node_modules-
34+
- name: 'Setup registry'
35+
run: |
36+
echo "//npm.pkg.github.com/:_authToken=$GITHUB_TOKEN" >> ~/.npmrc
37+
echo "@attest:registry=https://npm.pkg.github.com/" >> ~/.npmrc
38+
env:
39+
GITHUB_TOKEN: ${{ secrets.ADMIN_GH_TOKEN }}
40+
- name: 'Install dependencies'
41+
run: yarn install --frozen-lockfile
42+
- run: yarn ${{ matrix.command }}
43+
publish:
44+
needs: [healthCheck]
45+
runs-on: ubuntu-18.04
46+
steps:
47+
- uses: actions/checkout@v1
48+
- name: Configure Git
49+
run: |
50+
git --version
51+
git config --global user.email [email protected]
52+
git config --global user.name attest-admin
53+
git remote rm origin
54+
git remote add origin "https://attest-admin:[email protected]/attest/fe-tools.git"
55+
git checkout -b master
56+
git push -u origin master
57+
env:
58+
GITHUB_TOKEN: ${{ secrets.ADMIN_GH_TOKEN }}
59+
- name: 'Cache yarn'
60+
uses: actions/cache@v1
61+
with:
62+
path: ~/.cache/yarn
63+
key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}
64+
restore-keys: |
65+
${{ runner.os }}-yarn-
66+
- name: 'Cache node_modules'
67+
uses: actions/cache@v1
68+
with:
69+
path: ${{ github.workspace }}/node_modules
70+
key: ${{ runner.os }}-node_modules-${{ hashFiles('yarn.lock') }}
71+
restore-keys: |
72+
${{ runner.os }}-node_modules-
73+
- name: 'Setup registry'
74+
run: |
75+
echo "//npm.pkg.github.com/:_authToken=$GITHUB_TOKEN" >> ~/.npmrc
76+
echo "@attest:registry=https://npm.pkg.github.com/" >> ~/.npmrc
77+
env:
78+
GITHUB_TOKEN: ${{ secrets.ADMIN_GH_TOKEN }}
79+
- name: 'Install dependencies'
80+
run: yarn install --frozen-lockfile
81+
- name: Build
82+
run: yarn build
83+
- name: Version
84+
run: yarn semantic-release -d
85+
env:
86+
GH_TOKEN: ${{ secrets.ADMIN_GH_TOKEN }}
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Pull Request Check
2+
on: [pull_request]
3+
4+
jobs:
5+
prCheck:
6+
strategy:
7+
matrix:
8+
command:
9+
- typecheck
10+
- lint
11+
- format
12+
- build
13+
name: ${{ matrix.command }}
14+
runs-on: ubuntu-18.04
15+
steps:
16+
- uses: actions/checkout@v1
17+
- name: 'Cache yarn'
18+
uses: actions/cache@v1
19+
with:
20+
path: ~/.cache/yarn
21+
key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}
22+
restore-keys: |
23+
${{ runner.os }}-yarn-
24+
- name: 'Cache node_modules'
25+
uses: actions/cache@v1
26+
with:
27+
path: ${{ github.workspace }}/node_modules
28+
key: ${{ runner.os }}-node_modules-${{ hashFiles('yarn.lock') }}
29+
restore-keys: |
30+
${{ runner.os }}-node_modules-
31+
- name: 'Setup registry'
32+
run: |
33+
echo "//npm.pkg.github.com/:_authToken=$GITHUB_TOKEN" >> ~/.npmrc
34+
echo "@attest:registry=https://npm.pkg.github.com/" >> ~/.npmrc
35+
env:
36+
GITHUB_TOKEN: ${{ secrets.ADMIN_GH_TOKEN }}
37+
- name: 'Install dependencies'
38+
run: yarn install --frozen-lockfile
39+
- run: yarn ${{ matrix.command }}

.gitignore

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
# csilk Gitignore default #
2+
###########################
3+
4+
.env
5+
6+
# Editors #
7+
###########
8+
.vscode
9+
.idea
10+
*.iml
11+
.project
12+
.gradle/
13+
/nbproject/private/
14+
15+
# Compiled source #
16+
###################
17+
18+
dist
19+
*.com
20+
*.class
21+
*.dll
22+
*.exe
23+
*.o
24+
*.so
25+
26+
# Packages #
27+
############
28+
29+
*.7z
30+
*.dmg
31+
*.gz
32+
*.iso
33+
*.jar
34+
*.rar
35+
*.tar
36+
*.zip
37+
.vs
38+
*.msi
39+
*.nupkg
40+
41+
# Logs and databases #
42+
######################
43+
44+
*.log
45+
*.sql
46+
*.sqlite
47+
npm-debug.log*
48+
coverage
49+
junit.xml
50+
51+
# Caches #
52+
##########
53+
54+
.eslintcache
55+
eslint-data
56+
/tmp/
57+
/.cache-loader
58+
59+
# Node #
60+
########
61+
62+
lib-cov
63+
*.seed
64+
*.log
65+
*.dat
66+
*.out
67+
*.pid
68+
*.gz
69+
pids
70+
logs
71+
npm-debug.log
72+
node_modules/
73+
.pnp.js
74+
.pnp
75+
.yarn-meta
76+
/packages/lockfile/index.js
77+
/.nyc_output
78+
.npmrc
79+
80+
# OS generated files #
81+
######################
82+
83+
.DS_Store
84+
.DS_Store?
85+
._*
86+
.Spotlight-V100
87+
.Trashes
88+
ehthumbs.db
89+
Thumbs.db
90+
debug.log
91+
.settings
92+
.settings/*
93+
.buildpath
94+
*.iml
95+
sftp-config*
96+
*.sublime-*
97+
98+
# Reports #
99+
######################
100+
coverage

.huskyrc.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
module.exports = {
2+
hooks: {
3+
'pre-commit': 'lint-staged',
4+
'commit-msg': 'commitlint -E HUSKY_GIT_PARAMS',
5+
},
6+
}

.lintignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
.vscode/
2+
dist/
3+
node_modules/
4+
.pnp.js
5+
CHANGELOG.md

.lintstagedrc.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
module.exports = {
2+
'*.@(css|html|js|json|less|md|scss|ts|vue|yaml|yml)': [
3+
'yarn prettier --ignore-path .lintignore --write',
4+
],
5+
'*.@(md|js|jsx|ts|tsx|json)': [
6+
'yarn eslint --ext md,tsx,ts,js,ts,json --ignore-path .lintignore --fix',
7+
],
8+
'package.json': ['yarn codeowners'],
9+
}

0 commit comments

Comments
 (0)