Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chore: Update Dependencies, Linting, and TypeScript #296

Merged
merged 21 commits into from
Aug 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
519 changes: 0 additions & 519 deletions .eslintrc.cjs

This file was deleted.

2 changes: 1 addition & 1 deletion .github/renovate.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": ["github>bachmacintosh/renovate-config:jslib"]
"extends": ["github>bachman-dev/renovate-config:jslib"]
}
57 changes: 31 additions & 26 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,61 +16,66 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup pnpm
uses: pnpm/action-setup@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
cache: "pnpm"
- name: Install Dependencies
run: npm ci
run: pnpm install
- name: Lint Code
run: npm run lint
run: pnpm lint
- name: Run Unit Tests
run: npm test
run: pnpm test
- name: Upload Coverage Reports to Codecov
uses: codecov/codecov-action@v4
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
- name: Build Documentation
run: npm run build:docs
run: pnpm build:docs
- name: Install TypeScript 4.5
run: 'npm install --no-save typescript@"~4.5"'
run: 'pnpm add --save-dev typescript@"~4.5"'
- name: Build Library on TypeScript 4.5
run: npm run build:ts4
run: pnpm build:ts4
- name: Install TypeScript 4.6
run: 'npm install --no-save typescript@"~4.6"'
run: 'pnpm add --save-dev typescript@"~4.6"'
- name: Build Library on TypeScript 4.6
run: npm run build:ts4
run: pnpm build:ts4
- name: Install TypeScript 4.7
run: 'npm install --no-save typescript@"~4.7"'
run: 'pnpm add --save-dev typescript@"~4.7"'
- name: Build Library on TypeScript 4.7
run: npm run build:ts4
run: pnpm build:ts4
- name: Install TypeScript 4.8
run: 'npm install --no-save typescript@"~4.8"'
run: 'pnpm add --save-dev typescript@"~4.8"'
- name: Build Library on TypeScript 4.8
run: npm run build:ts4
run: pnpm build:ts4
- name: Install TypeScript 4.9
run: 'npm install --no-save typescript@"~4.9"'
run: 'pnpm add --save-dev typescript@"~4.9"'
- name: Build Library on TypeScript 4.9
run: npm run build:ts4
run: pnpm build:ts4
- name: Install TypeScript 5.0
run: 'npm install --no-save typescript@"~5.0"'
run: 'pnpm add --save-dev typescript@"~5.0"'
- name: Build Library on TypeScript 5.0
run: npm run build
run: pnpm build
- name: Install TypeScript 5.1
run: 'npm install --no-save typescript@"~5.1"'
run: 'pnpm add --save-dev typescript@"~5.1"'
- name: Build Library on TypeScript 5.1
run: npm run build
run: pnpm build
- name: Install TypeScript 5.2
run: 'npm install --no-save typescript@"~5.2"'
run: 'pnpm add --save-dev typescript@"~5.2"'
- name: Build Library on TypeScript 5.2
run: npm run build
run: pnpm build
- name: Install TypeScript 5.3
run: 'npm install --no-save typescript@"~5.3"'
run: 'pnpm add --save-dev typescript@"~5.3"'
- name: Build Library on TypeScript 5.3
run: npm run build
run: pnpm build
- name: Install TypeScript 5.4
run: 'npm install --no-save typescript@"~5.4"'
run: 'pnpm add --save-dev typescript@"~5.4"'
- name: Build Library on TypeScript 5.4
run: npm run build
run: pnpm build
- name: Install TypeScript 5.5
run: 'npm install --no-save typescript@"~5.5"'
run: 'pnpm add --save-dev typescript@"~5.5"'
- name: Build Library on TypeScript 5.5
run: npm run build
run: pnpm build
15 changes: 10 additions & 5 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,24 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup pnpm
uses: pnpm/action-setup@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
cache: "pnpm"
- name: Install Dependencies
run: npm ci
run: pnpm install
- name: Lint Code
run: npm run lint
run: pnpm lint
- name: Run Unit Tests
run: npm test
run: pnpm test
- name: Upload Coverage Reports to Codecov
uses: codecov/codecov-action@v4
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
- name: Build Documentation
run: npm run build:docs
run: pnpm build:docs
- name: Build Library
run: npm run build
run: pnpm build
20 changes: 10 additions & 10 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,33 +8,33 @@ jobs:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
deployments: write
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.event.release.tag_name }}
- name: Setup pnpm
uses: pnpm/action-setup@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
cache: "pnpm"
registry-url: "https://registry.npmjs.org"
- name: Install Latest NPM Version
run: npm install -g npm@latest
- name: Install Dependencies
run: npm ci
run: pnpm install
- name: Lint Code
run: npm run lint
run: pnpm lint
- name: Run Unit Tests
run: npm test
run: pnpm test
- name: Build Documentation
run: npm run build:docs
run: pnpm build:docs
- name: Build Library
run: npm run build
run: pnpm build
- name: Publish Library
run: npm publish --provenance
run: pnpm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_CONFIG_PROVENANCE: true
- name: Publish Documentation
run: "curl -X POST ${{ secrets.VERCEL_DEPLOY_HOOK }}"
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
20
20.16.0
5 changes: 4 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,7 @@ coverage

# Generated data
dist/
docs/
docs/

# Lockfile
pnpm-lock.yaml
7 changes: 7 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"printWidth": 120,
"semi": true,
"singleAttributePerLine": true,
"singleQuote": false,
"trailingComma": "all"
}
15 changes: 0 additions & 15 deletions .prettierrc.cjs

This file was deleted.

32 changes: 32 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import bachmanDev from "@bachman-dev/eslint-config";
import eslint from "@eslint/js";
import eslintConfigPrettier from "eslint-config-prettier";
import tseslint from "typescript-eslint";

export default tseslint.config(
{
// Replace output folder if needed, e.g. "dist"
ignores: ["{coverage,docs,dist,tests}/**"],
},
eslint.configs.recommended,
...tseslint.configs.strictTypeChecked,
...tseslint.configs.stylisticTypeChecked,
bachmanDev({ language: "typescript" }),
{
languageOptions: {
parserOptions: {
projectService: true,
tsconfigRootDir: import.meta.dirname,
},
},
},
{
files: ["**/*.js"],
...tseslint.configs.disableTypeChecked,
},
{
files: ["**/*.js"],
...bachmanDev({ language: "javascript-in-typescript" }),
},
eslintConfigPrettier,
);
22 changes: 0 additions & 22 deletions jest.config.cjs

This file was deleted.

Loading