Skip to content

Commit 60878fd

Browse files
authored
Merge pull request #126 from koblas/build-update-packages
fix: update packages and linting
2 parents 5182615 + e7be35b commit 60878fd

9 files changed

Lines changed: 3767 additions & 3812 deletions

File tree

.eslintrc.js

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

.github/workflows/pull_request.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,27 @@
11
name: Build and Test
22

3-
on:
3+
on:
44
push:
5-
branches: [ main ]
5+
branches: [main]
66
pull_request:
7-
branches: [ main ]
7+
branches: [main]
88

99
jobs:
1010
build:
1111
runs-on: ubuntu-latest
1212

1313
strategy:
1414
matrix:
15-
node-version: [20.x]
15+
node-version: [22.x]
1616

1717
steps:
18-
- uses: actions/checkout@v3
18+
- uses: actions/checkout@v4
1919
- name: Use Node.js ${{ matrix.node-version }}
20-
uses: actions/setup-node@v3
20+
uses: actions/setup-node@v4
2121
with:
2222
node-version: ${{ matrix.node-version }}
2323
- name: Cache Node.js modules
24-
uses: actions/cache@v3
24+
uses: actions/cache@v4
2525
with:
2626
# npm cache files are stored in `~/.npm` on Linux/macOS
2727
path: ~/.npm

.github/workflows/release.yaml

Lines changed: 44 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@ name: Release
22

33
on:
44
#push:
5-
# branches:
5+
# branches:
66
# - main
77

88
# Only run if the general build for the main branch has completed
99
workflow_run:
10-
workflows: ["Build and Test"]
10+
workflows: ['Build and Test']
1111
branches: [main]
12-
types:
12+
types:
1313
- completed
1414

1515
jobs:
@@ -19,46 +19,45 @@ jobs:
1919
outputs:
2020
version: ${{ steps.version.outputs.test }}
2121

22-
2322
steps:
24-
- name: Checkout
25-
uses: actions/checkout@v3
26-
with:
27-
fetch-depth: 0
28-
persist-credentials: false
29-
- name: Setup Node.js
30-
uses: actions/setup-node@v3
31-
with:
32-
node-version: 20
33-
- name: Install dependencies
34-
run: npm ci
35-
- name: Install semantic-release extra plugins
36-
run: npm install --save-dev @semantic-release/changelog @semantic-release/git
37-
# - name: Lint
38-
# run: npm run lint-fix
39-
# - name: Test
40-
# run: npm run test:unit --if-present
41-
- name: Build
42-
run: npm run build
43-
- name: Release
44-
id: release
45-
env:
46-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
47-
NPM_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
48-
run: |
49-
npx semantic-release
50-
echo "version=$(npx semantic-release --version)" >> $GITHUB_OUTPUT
51-
- name: GitHub Release update
52-
uses: softprops/action-gh-release@v1
53-
#if: startsWith(github.ref, 'refs/tags/')
54-
with:
55-
# body_path: ${{ github.workspace }}-CHANGELOG.txt
56-
# note you'll typically need to create a personal access token
57-
# with permissions to create releases in the other repoj
58-
#token: ${{ secrets.CUSTOM_GITHUB_TOKEN }}
59-
tag_name: ${{ steps.release.outputs.version }}
60-
files: |
61-
LICENSE.md
62-
README.md
63-
lib
64-
package.json
23+
- name: Checkout
24+
uses: actions/checkout@v4
25+
with:
26+
fetch-depth: 0
27+
persist-credentials: false
28+
- name: Setup Node.js
29+
uses: actions/setup-node@v4
30+
with:
31+
node-version: 22
32+
- name: Install dependencies
33+
run: npm ci
34+
- name: Install semantic-release extra plugins
35+
run: npm install --save-dev @semantic-release/changelog @semantic-release/git
36+
# - name: Lint
37+
# run: npm run lint-fix
38+
# - name: Test
39+
# run: npm run test:unit --if-present
40+
- name: Build
41+
run: npm run build
42+
- name: Release
43+
id: release
44+
env:
45+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
46+
NPM_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
47+
run: |
48+
npx semantic-release
49+
echo "version=$(npx semantic-release --version)" >> $GITHUB_OUTPUT
50+
- name: GitHub Release update
51+
uses: softprops/action-gh-release@v1
52+
#if: startsWith(github.ref, 'refs/tags/')
53+
with:
54+
# body_path: ${{ github.workspace }}-CHANGELOG.txt
55+
# note you'll typically need to create a personal access token
56+
# with permissions to create releases in the other repoj
57+
#token: ${{ secrets.CUSTOM_GITHUB_TOKEN }}
58+
tag_name: ${{ steps.release.outputs.version }}
59+
files: |
60+
LICENSE.md
61+
README.md
62+
lib
63+
package.json

bin/tmpl/tin.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,10 @@ const impl: Validator = {
6060
// return { isValid: false, error: new exceptions.InvalidFormat() };
6161
// }
6262

63+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
6364
const [, front, check] = strings.splitAt(value, 1, 10);
6465

66+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
6567
const sum = weightedSum(front, {
6668
weights: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],
6769
modulus: 11,

eslint.config.mjs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import eslint from '@eslint/js';
2+
import tseslint from 'typescript-eslint';
3+
import eslintConfigPrettier from 'eslint-config-prettier';
4+
5+
export default tseslint.config(
6+
eslint.configs.recommended,
7+
tseslint.configs.recommended,
8+
tseslint.configs.strict,
9+
tseslint.configs.stylistic,
10+
eslintConfigPrettier,
11+
{
12+
ignores: ['lib/*', '.eslintrc.js', 'release.config.js'],
13+
},
14+
);

0 commit comments

Comments
 (0)