Skip to content
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
29 changes: 0 additions & 29 deletions .eslintrc.json

This file was deleted.

22 changes: 10 additions & 12 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@ jobs:
steps:
- uses: actions/checkout@main
- uses: actions/setup-node@main
- run: npx auto pr-check --url https://github.com/$GITHUB_REPOSITORY
- uses: pnpm/action-setup@v4
with:
version: 10
- run: pnpx auto pr-check --url https://github.com/$GITHUB_REPOSITORY
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -28,18 +31,13 @@ jobs:
id: cache-modules
with:
path: node_modules
key: ${{ runner.os }}-node-modules-${{ hashFiles('**/package-lock.json') }}
- uses: actions/cache@main
if: steps.cache-modules.outputs.cache-hit != 'true'
key: ${{ runner.os }}-node-modules-${{ hashFiles('**/pnpm-lock.json') }}
- uses: pnpm/action-setup@v4
with:
path: ~/.npm
key: ${{ runner.os }}-node-global
- run: npm ci
if: steps.cache-modules.outputs.cache-hit != 'true'
env:
NPM_TOKEN: ${{secrets.NPM_TOKEN}}
- run: npm run build
- run: npx auto shipit
version: 10
- run: pnpm install
- run: pnpm run build
- run: pnpx auto shipit
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
51 changes: 22 additions & 29 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@ jobs:
steps:
- uses: actions/checkout@main
- uses: actions/setup-node@main
- run: npm audit
- uses: pnpm/action-setup@v4
with:
version: 10
- run: pnpm audit
lint:
name: Lint
runs-on: ubuntu-latest
Expand All @@ -20,17 +23,17 @@ jobs:
id: cache-modules
with:
path: node_modules
key: ${{ runner.os }}-node-modules-${{ hashFiles('**/package-lock.json') }}
key: ${{ runner.os }}-node-modules-${{ hashFiles('**/pnpm-lock.json') }}
- uses: actions/cache@main
if: steps.cache-modules.outputs.cache-hit != 'true'
with:
path: ~/.npm
key: ${{ runner.os }}-node-global
- run: npm ci
if: steps.cache-modules.outputs.cache-hit != 'true'
env:
NPM_TOKEN: ${{secrets.NPM_TOKEN}}
- run: npm run lint
- uses: pnpm/action-setup@v4
with:
version: 10
- run: pnpm install
- run: pnpm run lint
test:
name: Test
runs-on: ubuntu-latest
Expand All @@ -41,18 +44,13 @@ jobs:
id: cache-modules
with:
path: node_modules
key: ${{ runner.os }}-node-modules-${{ hashFiles('**/package-lock.json') }}
- uses: actions/cache@main
if: steps.cache-modules.outputs.cache-hit != 'true'
key: ${{ runner.os }}-node-modules-${{ hashFiles('**/pnpm-lock.yaml') }}
- uses: pnpm/action-setup@v4
with:
path: ~/.npm
key: ${{ runner.os }}-node-global
- run: npm ci
if: steps.cache-modules.outputs.cache-hit != 'true'
env:
NPM_TOKEN: ${{secrets.NPM_TOKEN}}
- run: npm run test
- run: npm run build
version: 10
- run: pnpm install
- run: pnpm run test
- run: pnpm run build

publish-gpr:
name: Publish Version
Expand All @@ -67,18 +65,13 @@ jobs:
id: cache-modules
with:
path: node_modules
key: ${{ runner.os }}-node-modules-${{ hashFiles('**/package-lock.json') }}
- uses: actions/cache@main
if: steps.cache-modules.outputs.cache-hit != 'true'
key: ${{ runner.os }}-node-modules-${{ hashFiles('**/pnpm-lock.json') }}
- uses: pnpm/action-setup@v4
with:
path: ~/.npm
key: ${{ runner.os }}-node-global
- run: npm ci
if: steps.cache-modules.outputs.cache-hit != 'true'
env:
NPM_TOKEN: ${{secrets.NPM_TOKEN}}
- run: npm run build
- run: npx auto shipit
version: 10
- run: pnpm install
- run: pnpm run build
- run: pnpx auto shipit
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
56 changes: 56 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
import { defineConfig, globalIgnores } from "eslint/config"
import typescriptEslint from "@typescript-eslint/eslint-plugin"
import tsParser from "@typescript-eslint/parser"
import path from "node:path"
import { fileURLToPath } from "node:url"
import js from "@eslint/js"
import { FlatCompat } from "@eslint/eslintrc"

const __filename = fileURLToPath(import.meta.url)
const __dirname = path.dirname(__filename)
const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
allConfig: js.configs.all,
})

export default defineConfig([
globalIgnores(["**/build/", "eslint.config.mjs"]),
{
extends: compat.extends(
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"prettier",
),

plugins: {
"@typescript-eslint": typescriptEslint,
},

languageOptions: {
parser: tsParser,
ecmaVersion: 11,
sourceType: "module",

parserOptions: {
project: "./tsconfig.json",
},
},

rules: {
"@typescript-eslint/no-unused-vars": [
"error",
{
varsIgnorePattern: "^_",
argsIgnorePattern: "^_",
ignoreRestSiblings: true,
},
],

"@typescript-eslint/no-explicit-any": 0,
"@typescript-eslint/no-this-alias": 0,
"@typescript-eslint/ban-ts-comment": 0,
"@typescript-eslint/no-floating-promises": ["error"],
},
},
])
Loading
Loading