Skip to content
Open
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
5 changes: 5 additions & 0 deletions .changeset/three-papayas-wonder.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@shadeprotocol/shadejs": patch
---

nodejs bump
3 changes: 0 additions & 3 deletions .eslintignore

This file was deleted.

55 changes: 0 additions & 55 deletions .eslintrc.cjs

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
- name: Node Version
uses: actions/setup-node@v3
with:
node-version: 20.9.0
node-version: 22.14.0
cache: yarn
- name: Install Dependencies
run: yarn install --frozen-lockfile
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
- name: Node Version
uses: actions/setup-node@v3
with:
node-version: 18.16.0
node-version: 22.14.0
cache: yarn
- name: Install Dependencies
run: yarn install --frozen-lockfile
Expand All @@ -25,7 +25,7 @@ jobs:
- name: Node Version
uses: actions/setup-node@v3
with:
node-version: 20.9.0
node-version: 22.14.0
cache: yarn
- name: Install Dependencies
run: yarn install --frozen-lockfile
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: Node Version
uses: actions/setup-node@v3
with:
node-version: 20.9.0
node-version: 22.14.0
cache: yarn
- name: Install Dependencies
run: yarn install --frozen-lockfile
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
- name: Node Version
uses: actions/setup-node@v3
with:
node-version: 20.9.0
node-version: 22.14.0
cache: yarn
- name: Install Dependencies
run: yarn install --frozen-lockfile
Expand Down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,10 @@ Docs will be available on a vitepress site. You can run the site locally with th

```
$ yarn docs:dev
```

## CHangeset for deployment

Comment on lines +48 to +49
Copy link

Copilot AI Mar 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] Consider changing '## CHangeset for deployment' to '## Changeset for deployment' for consistent capitalization.

Suggested change
## CHangeset for deployment
## Changeset for deployment

Copilot uses AI. Check for mistakes.
```
$ yarn changeset
```
103 changes: 103 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
// eslint.config.js (or .mjs if using "type": "module")
import { defineConfig, globalIgnores } from "eslint/config";
import typescriptEslint from "@typescript-eslint/eslint-plugin";
import tsParser from "@typescript-eslint/parser";
import js from "@eslint/js";
import globals from "globals";
import { FlatCompat } from "@eslint/eslintrc";
import path from "node:path";
import { fileURLToPath } from "node:url";
import eslintPluginImport from "eslint-plugin-import";


const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const compat = new FlatCompat({ baseDirectory: __dirname });

export default defineConfig([
// ✅ Add your ignore patterns here
globalIgnores([
"**/node_modules/**",
"**/dist/**",
"**/.vitepress/cache/**",
"**/docs/.vitepress/cache/**",
"**/*.d.ts",
"**/*.js",
]),
{
files: ["**/*.{ts,tsx}"],
plugins: {
"@typescript-eslint": typescriptEslint,
import: eslintPluginImport,
},
languageOptions: {
parser: tsParser,
parserOptions: {
ecmaVersion: "latest",
sourceType: "module",
},
globals: {
...globals.browser,
...globals.node,
Buffer: "readonly",
fetch: "readonly",
crypto: "readonly",
AbortController: "readonly",
setTimeout: "readonly",
clearTimeout: "readonly",
},
},
settings: {
"import/resolver": {
typescript: {},
},
},
rules: {
"no-unused-vars": "off",
"no-shadow": "off",
"@typescript-eslint/no-shadow": "error",
"import/extensions": ["error", "always", {
js: "never",
mjs: "never",
jsx: "never",
ts: "never",
tsx: "never",
}],
"import/prefer-default-export": "off",
"import/no-extraneous-dependencies": ["error", {
devDependencies: [
"**/*.test.ts",
"**/*.test.tsx",
"**/*.spec.ts",
"**/test/**",
"**/tests/**",
"**/*.config.ts",
"**/vite.config.ts",
"**/docs/**",
"**/.vitepress/**",
],
}],
},
},
// For config files
{
files: ["**/.eslintrc.{js,cjs}"],
languageOptions: {
ecmaVersion: 5,
sourceType: "commonjs",
globals: globals.node,
},
},

// For Docs files
{
files: ["docs/**/*.{ts,tsx,js}"],
settings: {
"import/core-modules": ["vue", "vitepress"], // tell import plugin not to flag these
},
rules: {
"import/no-extraneous-dependencies": "off", // or leave as-is if needed
},
}

]);
36 changes: 18 additions & 18 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@shadeprotocol/shadejs",
"description": "The Typescript SDK for Shade Protocol",
"version": "1.0.9",
"version": "1.7.1",
"author": "Secure Secrets",
"bugs": {
"url": "https://github.com/securesecrets/shadejs/issues"
Expand Down Expand Up @@ -29,8 +29,8 @@
"build": "tsc && vite build",
"release": "tsc && vite build && changeset publish",
"commitizen": "cz",
"lint": "eslint \"**/*.{ts,js}\"",
"lint:fix": "eslint \"**/*.{vue,ts,js}\" --fix",
"lint": "eslint . --ext .ts,.js",
"lint:fix": "eslint . --ext .ts,.js --fix",
"test": "vitest --run",
"test:coverage": "vitest run --coverage",
"test:watch": "vitest watch",
Expand All @@ -41,27 +41,27 @@
},
"dependencies": {
"bignumber.js": "^9.1.2",
"rxjs": "^7.8.1",
"secretjs": "1.15.0",
"vite": "^4.5.0",
"rxjs": "^7.8.2",
"secretjs": "1.15.1",
"vite": "^6.2.3",
"whatwg-fetch": "^3.6.19"
},
"devDependencies": {
"@changesets/cli": "^2.26.2",
"@commitlint/cli": "^17.7.2",
"@commitlint/config-conventional": "^17.7.0",
"@typescript-eslint/eslint-plugin": "^6.7.4",
"@typescript-eslint/parser": "^6.7.4",
"@changesets/cli": "^2.28.1",
"@commitlint/cli": "^19.8.0",
"@commitlint/config-conventional": "^19.8.0",
"@typescript-eslint/eslint-plugin": "^8.28.0",
"@typescript-eslint/parser": "^8.28.0",
"cz-conventional-changelog": "^3.3.0",
"eslint": "^8.51.0",
"eslint": "^9.23.0",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-import-resolver-typescript": "^3.6.1",
"eslint-import-resolver-typescript": "^4.2.5",
"eslint-plugin-import": "^2.28.1",
"lefthook": "^1.5.2",
"typescript": "^5.2.2",
"vite-plugin-dts": "^3.6.0",
"vitepress": "^1.0.0-rc.24",
"vitest": "^0.34.6"
"lefthook": "^1.11.5",
"typescript": "^5.8.2",
"vite-plugin-dts": "^4.5.3",
"vitepress": "^1.6.3",
"vitest": "^3.0.9"
},
"config": {
"commitizen": {
Expand Down
2 changes: 1 addition & 1 deletion src/lib/swap/stableswapCurve/stable.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* eslint-disable max-len */
import { expect, test } from 'vitest';
import BigNumber from 'bignumber.js';
import { isBigNumberWithinMarginOfError } from '~/lib/test';
Expand Down
2 changes: 1 addition & 1 deletion src/lib/swap/stableswapCurve/stable.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* eslint-disable max-len */
import BigNumber from 'bignumber.js';
import { ReverseTradeResult, TradeResult } from '~/types/stableswap/stable';
import { NewtonMethodError } from '~/lib/swap/stableswapCurve/error';
Expand Down
2 changes: 1 addition & 1 deletion src/test/mocks/batchQuery/batchPricesWithErrorParsed.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const batchPricesWithErrorParsed: BatchQueryParsedResponse = [{
data: {
rate: '49521843708800000000000',
last_updated_base: 1707858482,
// eslint-disable-next-line
last_updated_quote: 18446744073709551615,
},
},
Expand Down
2 changes: 1 addition & 1 deletion src/test/mocks/oracle/batchPricesParsed.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const batchPricesWithErrorParsedResponse: ParsedOraclePricesResponse = {
oracleKey: 'BTC',
rate: '49521843708800000000000',
lastUpdatedBase: 1707858482,
// eslint-disable-next-line
lastUpdatedQuote: 18446744073709551615,
blockHeight: 3,
},
Expand Down
Loading