Skip to content

Commit f421539

Browse files
committed
ecosystem upgrades
1 parent 3c2ff6c commit f421539

File tree

14 files changed

+7728
-5673
lines changed

14 files changed

+7728
-5673
lines changed

.eslintignore

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

.eslintrc.json

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

.github/workflows/build.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88

99
strategy:
1010
matrix:
11-
node-version: [18.x]
11+
node-version: [20.x]
1212

1313
steps:
1414
- uses: actions/checkout@v4
@@ -18,13 +18,18 @@ jobs:
1818
node-version: ${{ matrix.node-version }}
1919

2020
- name: install deps
21-
run: yarn
21+
run: |
22+
corepack enable
23+
yarn
2224
2325
- name: lint
2426
run: yarn lint
2527

26-
- name: astro check
27-
run: yarn typecheck
28+
- name: build
29+
run: yarn build
2830

2931
- name: test
3032
run: yarn test
33+
34+
- name: astro check
35+
run: yarn typecheck

.gitignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,14 @@ local.settings.json
9595

9696
# use yarn as a package manager
9797
package-lock.json
98+
.yarn/*
99+
!.yarn/cache
100+
!.yarn/patches
101+
!.yarn/plugins
102+
!.yarn/releases
103+
!.yarn/sdks
104+
!.yarn/versions
105+
98106
.vercel
99107

100108
# astro settings

.husky/pre-commit

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1 @@
1-
#!/bin/sh
2-
. "$(dirname "$0")/_/husky.sh"
3-
41
yarn lint

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
node_modules
22
dist
3+
.yarn

.yarnrc.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
nodeLinker: node-modules

astro.config.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { config } from 'dotenv'
22
import { defineConfig } from 'astro/config'
33
import vercel from '@astrojs/vercel/serverless'
44

5-
// eslint-disable-next-line functional/no-expression-statements
5+
66
config()
77

88
export default defineConfig({

eslint.config.js

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
import eslint from '@eslint/js'
2+
import tseslint from 'typescript-eslint'
3+
import prettier from 'eslint-config-prettier'
4+
import functional from 'eslint-plugin-functional'
5+
import globals from 'globals'
6+
7+
export default tseslint.config(
8+
{
9+
files: ['**/*.{ts,tsx,mts}'],
10+
extends: [
11+
eslint.configs.recommended,
12+
...tseslint.configs.recommended,
13+
functional.configs.recommended,
14+
prettier,
15+
],
16+
languageOptions: {
17+
parser: tseslint.parser,
18+
parserOptions: { projectService: true },
19+
globals: { ...globals.browser, ...globals.node },
20+
},
21+
rules: {
22+
'functional/prefer-immutable-types': 'warn',
23+
'no-unused-vars': 'off',
24+
'@typescript-eslint/triple-slash-reference': 'warn',
25+
'functional/no-expression-statements': 'warn',
26+
'@typescript-eslint/no-unused-expressions': 'warn',
27+
'functional/immutable-data': 'warn',
28+
},
29+
},
30+
{
31+
files: ['**/*.test.ts', '**/*.{js,mjs,cjs}'],
32+
extends: [functional.configs.off],
33+
rules: { '@typescript-eslint/no-explicit-any': 'off' },
34+
},
35+
{ ignores: ['dist', '.yarn', '.preview', '.astro'] },
36+
)

package.json

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212
"pretest": "tsc",
1313
"prebuild": "rimraf dist",
1414
"lint": "yarn lint:eslint && yarn lint:format",
15-
"lint:eslint": "eslint . --ext .ts,.js --fix",
15+
"lint:eslint": "eslint . --fix",
1616
"lint:format": "prettier --write '**/*.{ts,js,json,md,yml}'",
1717
"typecheck": "astro check && tsc --noEmit",
18-
"prepare": "husky install"
18+
"prepare": "husky"
1919
},
2020
"author": "Dev Protocol",
2121
"license": "MPL-2.0",
@@ -35,22 +35,24 @@
3535
"devDependencies": {
3636
"@astrojs/check": "^0.9.0",
3737
"@ava/typescript": "5.0.0",
38+
"@eslint/js": "^9.24.0",
3839
"@types/dotenv": "8.2.3",
40+
"@types/eslint-config-prettier": "^6.11.3",
3941
"@types/node": "22.14.0",
4042
"@types/ramda": "0.30.2",
41-
"@typescript-eslint/eslint-plugin": "7.18.0",
42-
"@typescript-eslint/parser": "7.18.0",
4343
"@vercel/node": "^5.0.0",
4444
"ava": "6.2.0",
4545
"dotenv": "16.4.7",
46-
"eslint": "8.57.1",
47-
"eslint-config-prettier": "10.1.1",
48-
"eslint-plugin-functional": "6.6.3",
46+
"eslint": "^9.24.0",
47+
"eslint-config-prettier": "^10.1.1",
48+
"eslint-plugin-functional": "^9.0.1",
49+
"globals": "^16.0.0",
4950
"husky": "9.1.7",
5051
"prettier": "3.5.3",
5152
"rimraf": "5.0.10",
5253
"type-fest": "^4.3.1",
53-
"typescript": "5.5.4"
54+
"typescript": "5.5.4",
55+
"typescript-eslint": "^8.29.0"
5456
},
5557
"ava": {
5658
"files": [
@@ -68,5 +70,6 @@
6870
"url": "https://github.com/dev-protocol/template-repos-ts/issues"
6971
},
7072
"homepage": "https://github.com/dev-protocol/template-repos-ts#readme",
71-
"private": true
73+
"private": true,
74+
"packageManager": "yarn@4.8.1"
7275
}

src/pages/api/crons/s-tokens/dest/airtable/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/* eslint-disable functional/functional-parameters */
21
/* eslint-disable functional/no-return-void */
32
import type { APIRoute } from 'astro'
43
import { cors, headers, json } from 'utils/json'

utils/airtable.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/* eslint-disable functional/type-declaration-immutability */
21
/* eslint-disable functional/no-return-void */
32
import { whenDefined, type ErrorOr } from '@devprotocol/util-ts'
43
import type { FieldSet, Records } from 'airtable'
@@ -21,8 +20,8 @@ export const getFieldNameById = async (opts: {
2120
const [[name]] = names
2221
return err
2322
? resolve(new Error(err))
24-
: whenDefined(name, (name) => resolve(name)) ??
25-
resolve(new Error(`Faild to fetch the field name: ${opts.id}`))
23+
: (whenDefined(name, (name) => resolve(name)) ??
24+
resolve(new Error(`Faild to fetch the field name: ${opts.id}`)))
2625
}),
2726
)
2827
}

utils/logs.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/* eslint-disable functional/functional-parameters */
21
import { whenDefined } from '@devprotocol/util-ts'
32
import {
43
decodeBase64,
@@ -19,10 +18,9 @@ export type TransferEvent = Readonly<{
1918
event: Log | EventLog
2019
contractAddress: string
2120
}>
22-
// eslint-disable-next-line functional/type-declaration-immutability
21+
2322
export type TransferEvents = Readonly<TransferEvent[]>
2423

25-
// eslint-disable-next-line functional/type-declaration-immutability
2624
type Metadata = Readonly<{
2725
name: string
2826
description: string

0 commit comments

Comments
 (0)