Skip to content

Commit

Permalink
Merge pull request #126 from koblas/build-update-packages
Browse files Browse the repository at this point in the history
fix: update packages and linting
  • Loading branch information
koblas authored Jan 14, 2025
2 parents 5182615 + e7be35b commit 60878fd
Show file tree
Hide file tree
Showing 9 changed files with 3,767 additions and 3,812 deletions.
25 changes: 0 additions & 25 deletions .eslintrc.js

This file was deleted.

14 changes: 7 additions & 7 deletions .github/workflows/pull_request.yaml
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
name: Build and Test

on:
on:
push:
branches: [ main ]
branches: [main]
pull_request:
branches: [ main ]
branches: [main]

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [20.x]
node-version: [22.x]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Cache Node.js modules
uses: actions/cache@v3
uses: actions/cache@v4
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm
Expand Down
89 changes: 44 additions & 45 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ name: Release

on:
#push:
# branches:
# branches:
# - main

# Only run if the general build for the main branch has completed
workflow_run:
workflows: ["Build and Test"]
workflows: ['Build and Test']
branches: [main]
types:
types:
- completed

jobs:
Expand All @@ -19,46 +19,45 @@ jobs:
outputs:
version: ${{ steps.version.outputs.test }}


steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
persist-credentials: false
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 20
- name: Install dependencies
run: npm ci
- name: Install semantic-release extra plugins
run: npm install --save-dev @semantic-release/changelog @semantic-release/git
# - name: Lint
# run: npm run lint-fix
# - name: Test
# run: npm run test:unit --if-present
- name: Build
run: npm run build
- name: Release
id: release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
run: |
npx semantic-release
echo "version=$(npx semantic-release --version)" >> $GITHUB_OUTPUT
- name: GitHub Release update
uses: softprops/action-gh-release@v1
#if: startsWith(github.ref, 'refs/tags/')
with:
# body_path: ${{ github.workspace }}-CHANGELOG.txt
# note you'll typically need to create a personal access token
# with permissions to create releases in the other repoj
#token: ${{ secrets.CUSTOM_GITHUB_TOKEN }}
tag_name: ${{ steps.release.outputs.version }}
files: |
LICENSE.md
README.md
lib
package.json
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: false
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 22
- name: Install dependencies
run: npm ci
- name: Install semantic-release extra plugins
run: npm install --save-dev @semantic-release/changelog @semantic-release/git
# - name: Lint
# run: npm run lint-fix
# - name: Test
# run: npm run test:unit --if-present
- name: Build
run: npm run build
- name: Release
id: release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
run: |
npx semantic-release
echo "version=$(npx semantic-release --version)" >> $GITHUB_OUTPUT
- name: GitHub Release update
uses: softprops/action-gh-release@v1
#if: startsWith(github.ref, 'refs/tags/')
with:
# body_path: ${{ github.workspace }}-CHANGELOG.txt
# note you'll typically need to create a personal access token
# with permissions to create releases in the other repoj
#token: ${{ secrets.CUSTOM_GITHUB_TOKEN }}
tag_name: ${{ steps.release.outputs.version }}
files: |
LICENSE.md
README.md
lib
package.json
2 changes: 2 additions & 0 deletions bin/tmpl/tin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,10 @@ const impl: Validator = {
// return { isValid: false, error: new exceptions.InvalidFormat() };
// }

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

// eslint-disable-next-line @typescript-eslint/no-unused-vars
const sum = weightedSum(front, {
weights: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],
modulus: 11,
Expand Down
14 changes: 14 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import eslint from '@eslint/js';
import tseslint from 'typescript-eslint';
import eslintConfigPrettier from 'eslint-config-prettier';

export default tseslint.config(
eslint.configs.recommended,
tseslint.configs.recommended,
tseslint.configs.strict,
tseslint.configs.stylistic,
eslintConfigPrettier,
{
ignores: ['lib/*', '.eslintrc.js', 'release.config.js'],
},
);
Loading

0 comments on commit 60878fd

Please sign in to comment.