Skip to content

Commit 976e25e

Browse files
committed
chore: mis cleanup
- upgrade lots of dev dependencies - upgrade linter + fix lint errors - add typing to jest config - setup semantic-release
1 parent f0762b4 commit 976e25e

File tree

18 files changed

+25804
-15336
lines changed

18 files changed

+25804
-15336
lines changed

.eslintrc.js

Lines changed: 2 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,9 @@
11
module.exports = {
2-
env: {
3-
browser: true,
4-
node: true,
5-
jest: true,
6-
es6: true,
7-
},
82
extends: [
93
'@djthoms/eslint-config',
10-
'@djthoms/eslint-config/jest',
4+
'@djthoms/eslint-config/typescript',
115
'@djthoms/eslint-config/react',
126
'@djthoms/eslint-config/react-typescript',
13-
'@djthoms/eslint-config/typescript',
14-
'plugin:react/jsx-runtime',
15-
],
16-
rules: {
17-
'@typescript-eslint/explicit-function-return-type': 'off',
18-
'@typescript-eslint/explicit-module-boundary-types': 'off',
19-
},
20-
overrides: [
21-
{
22-
files: ['*.js'],
23-
rules: {
24-
'@typescript-eslint/no-var-requires': 'off',
25-
},
26-
},
7+
'@djthoms/eslint-config/jest',
278
],
289
};

.github/workflows/on_pre_release.yml

Lines changed: 0 additions & 24 deletions
This file was deleted.

.github/workflows/on_push.yml

Lines changed: 36 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,17 @@ name: Build & Publish Docs
33
jobs:
44
build:
55
runs-on: ubuntu-latest
6-
strategy:
7-
matrix:
8-
node-version: [16.x]
96
steps:
10-
- uses: actions/checkout@v2
11-
- name: Use Node.js ${{ matrix.node-version }}
12-
uses: actions/setup-node@v2
7+
- uses: actions/checkout@v3
138
with:
14-
node-version: ${{ matrix.node-version }}
9+
fetch-depth: 0
10+
- name: Setup Node.js
11+
uses: actions/setup-node@v3
12+
with:
13+
node-version: 16
1514
- name: npm install, build, and test
1615
run: |
17-
npm i
16+
npm ci
1817
npm t
1918
npm run build
2019
env:
@@ -24,12 +23,40 @@ jobs:
2423
uses: coverallsapp/github-action@master
2524
with:
2625
github-token: ${{ secrets.GITHUB_TOKEN }}
26+
- uses: actions/upload-artifacts@master
27+
with:
28+
name: bundle
29+
path: pkg
2730
checkChangesInDocs:
2831
name: Check changes in docs
2932
runs-on: ubuntu-latest
3033
steps:
31-
- uses: actions/checkout@master
34+
- uses: actions/checkout@v3
35+
with:
36+
fetch-depth: 0
3237
- name: Check changes in stories
3338
uses: netlify/actions/diff-includes@master
3439
with:
3540
args: docs
41+
release:
42+
name: Release
43+
runs-on: ubuntu-latest
44+
if: github.ref === 'refs/heads/main'
45+
steps:
46+
- uses: actions/checkout@v3
47+
with:
48+
fetch-depth: 0
49+
- name: Setup Node.js
50+
uses: actions/setup-node@v3
51+
with:
52+
node-version: 16
53+
run: npm ci
54+
- name: Release
55+
uses: actions/download-artifact@master
56+
with:
57+
name: bundle
58+
path: pkg
59+
env:
60+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
61+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
62+
run: npx semantic-release

.github/workflows/on_release.yml

Lines changed: 0 additions & 22 deletions
This file was deleted.

.github/workflows/stale.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
runs-on: ubuntu-latest
1010

1111
steps:
12-
- uses: actions/stale@v1
12+
- uses: actions/stale@v5
1313
with:
1414
repo-token: ${{ secrets.GITHUB_TOKEN }}
1515
stale-issue-message: 'Stale issue message'

.husky/commit-msg

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/usr/bin/env sh
2+
. "$(dirname -- "$0")/_/husky.sh"
3+
4+
npx --no -- commitlint --edit "${1}"

.husky/pre-commit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#!/bin/sh
22
. "$(dirname "$0")/_/husky.sh"
33

4-
npx --no-install lint-staged
4+
npx --no lint-staged

.releaserc.json

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
{
2+
"branches": ["main"],
3+
"plugins": [
4+
"@semantic-release/commit-analyzer",
5+
[
6+
"@semantic-release/release-notes-generator",
7+
{
8+
"preset": "conventionalcommits",
9+
"parserOpts": {
10+
"noteKeywords": ["BREAKING CHANGE", "BREAKING CHANGES", "BREAKING"]
11+
},
12+
"writerOpts": {
13+
"commitsSort": ["subject", "scope"]
14+
}
15+
}
16+
],
17+
[
18+
"@semantic-release/changelog",
19+
{
20+
"changelogFile": "CHANGELOG.md"
21+
}
22+
],
23+
"@semantic-release/github",
24+
[
25+
"@semantic-release/npm",
26+
{
27+
"pkgRoot": "pkg"
28+
}
29+
],
30+
[
31+
"@semantic-release/git",
32+
{
33+
"assets": ["package.json", "package-lock.json", "CHANGELOG.md"],
34+
"message": "chore(release): ${nextRelease.version} [skip ci]"
35+
}
36+
]
37+
]
38+
}

.vscode/extensions.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"esbenp.prettier-vscode",
66
"christian-kohler.npm-intellisense",
77
"christian-kohler.path-intellisense",
8-
"eg2.vscode-npm-script"
8+
"eg2.vscode-npm-script",
9+
"wix.vscode-import-cost"
910
]
1011
}

CONTRIBUTING.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,12 @@ Pretty Checkbox React uses github as its source of truth and all changes are
5050
public from the beginning :+1. When a change is made, github actions will lint,
5151
build, and test Pretty Checkbox React code.
5252

53+
### Commit Messages
54+
55+
Commits as of 06/19/2022 use
56+
[conventional commit format](https://www.conventionalcommits.org/en/v1.0.0/) so
57+
please be sure to follow the convention :smile:.
58+
5359
### Branch Organization
5460

5561
Pretty Checkbox React has one main branch: `master`. This is where the code

0 commit comments

Comments
 (0)