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
10 changes: 5 additions & 5 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@
"@solana-program/memo": "^0.7.0",
"@solana-program/system": "^0.7.0",
"@solana-program/token": "^0.5.1",
"@solana/compat": "5.1.0-canary-20251204203500",
"@solana/kit": "5.1.0-canary-20251204203500",
"@solana/react": "5.1.0-canary-20251204203500",
"@solana/compat": "5.1.1-canary-20251216194212",
"@solana/kit": "5.1.1-canary-20251216194212",
"@solana/react": "5.1.1-canary-20251216194212",
"@solana/web3.js": "^1.98.2",
"@solana/webcrypto-ed25519-polyfill": "5.1.0-canary-20251204203500",
"@solana/webcrypto-ed25519-polyfill": "5.1.1-canary-20251216194212",
"@tailwindcss/postcss": "^4.1.4",
"@types/mdx": "^2.0.13",
"@types/node": "22.13.8",
Expand All @@ -53,4 +53,4 @@
}
},
"packageManager": "pnpm@10.4.1"
}
}
906 changes: 453 additions & 453 deletions docs/pnpm-lock.yaml

Large diffs are not rendered by default.

30 changes: 1 addition & 29 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -1,29 +1 @@
import solanaConfig from '@solana/eslint-config-solana';
import solanaJestConfig from '@solana/eslint-config-solana/jest';

export default [
...solanaConfig,
...solanaJestConfig,
{
rules: {
'@typescript-eslint/no-base-to-string': 'off',
'@typescript-eslint/no-unsafe-argument': 'off',
'@typescript-eslint/no-unsafe-assignment': 'off',
'@typescript-eslint/no-unsafe-call': 'off',
'@typescript-eslint/no-unsafe-enum-comparison': 'off',
'@typescript-eslint/no-unsafe-member-access': 'off',
'@typescript-eslint/no-unsafe-return': 'off',
'@typescript-eslint/only-throw-error': 'off',
'@typescript-eslint/prefer-promise-reject-errors': 'error',
'@typescript-eslint/restrict-plus-operands': 'error',
'@typescript-eslint/restrict-template-expressions': 'error',
'@typescript-eslint/unbound-method': 'off',
'jest/expect-expect': [
'error',
{
assertFunctionNames: ['expect', 'expectNewPreOffset', 'expectNewPostOffset'],
},
],
},
},
];
export { default } from '@solana/eslint-config/eslint.config.mjs';
25 changes: 2 additions & 23 deletions examples/react-app/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -1,24 +1,18 @@
import solanaReactConfig from '@solana/eslint-config-solana/react';
import solanaReactConfig from '@solana/eslint-config/eslint.config.react.mjs';
import reactRefreshPlugin from 'eslint-plugin-react-refresh';
import globals from 'globals';

import baseConfig from '../../eslint.config.mjs';

export default [
{
ignores: ['**/dist', '**/*.css'],
},
...baseConfig,
...solanaReactConfig,
{
languageOptions: {
globals: {
...globals.browser,
...globals.es2020,
},
parserOptions: {
project: './tsconfig.app.json',
},
},
plugins: {
'react-refresh': reactRefreshPlugin,
Expand All @@ -36,19 +30,4 @@ export default [
],
},
},
].map(
// FIXME: Without this hack, this error results:
// ConfigError: Config (unnamed): Key "plugins": Cannot redefine plugin "typescript-sort-keys".
(() => {
let typescriptSortKeysPluginFound = false;
return config => {
if (config.plugins?.['typescript-sort-keys']) {
if (typescriptSortKeysPluginFound === false) {
delete config.plugins['typescript-sort-keys'];
}
typescriptSortKeysPluginFound = true;
}
return config;
};
})(),
);
];
4 changes: 3 additions & 1 deletion examples/react-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,14 @@
"swr": "^2.3.7"
},
"devDependencies": {
"@solana/eslint-config-solana": "^5.0.0",
"@solana/eslint-config": "workspace:*",
"@solana/wallet-standard-features": "^1.3.0",
"@types/react": "^19.2.7",
"@types/react-dom": "^19.2.3",
"@vitejs/plugin-react-swc": "^4.2.2",
"eslint": "^9.39.1",
"eslint-plugin-react-refresh": "^0.4.24",
"jest": "^30.0.0-alpha.6",
"globals": "^16.5.0",
"vite": "^7.2.0"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@ export function SelectedWalletAccountContextProvider({ children }: { children: R
useEffect(() => {
const savedWalletAccount = getSavedWalletAccount(wallets);
if (savedWalletAccount) {
setSelectedWalletAccountInternal(savedWalletAccount);
// FIXME: Rewrite this not to run afoul of react-hooks/set-state-in-effect
setSelectedWalletAccountInternal(savedWalletAccount); // eslint-disable-line react-hooks/set-state-in-effect
}
}, [wallets]);
const walletAccount = useMemo(() => {
Expand All @@ -90,7 +91,8 @@ export function SelectedWalletAccountContextProvider({ children }: { children: R
// If there is a selected wallet account but the wallet to which it belongs has since
// disconnected, clear the selected wallet.
if (selectedWalletAccount && !walletAccount) {
setSelectedWalletAccountInternal(undefined);
// FIXME: Rewrite this not to run afoul of react-hooks/set-state-in-effect
setSelectedWalletAccountInternal(undefined); // eslint-disable-line react-hooks/set-state-in-effect
}
}, [selectedWalletAccount, walletAccount]);
return (
Expand Down
1 change: 1 addition & 0 deletions examples/react-app/src/hooks/useStable.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable react-hooks/refs */
import { useRef } from 'react';

const UNRESOLVED = Symbol();
Expand Down
19 changes: 5 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,44 +13,35 @@
"devDependencies": {
"@changesets/changelog-github": "^0.5.1",
"@changesets/cli": "^2.29.7",
"@eslint/js": "^9.38.0",
"@eslint/json": "^0.13.2",
"@prettier/sync": "^0.6.1",
"@solana/build-scripts": "workspace:*",
"@solana/eslint-config-solana": "^4.0.0",
"@solana/prettier-config-solana": "0.0.5",
"@solana/eslint-config": "workspace:*",
"@solana/prettier-config-solana": "0.0.6",
"@solana/test-config": "workspace:*",
"@solana/test-matchers": "workspace:*",
"@solana/tsconfig": "workspace:*",
"@swc/jest": "^0.2.39",
"@types/jest": "^29.5.14",
"@types/node": "^24",
"@typescript-eslint/eslint-plugin": "^8.47.0",
"@typescript-eslint/parser": "^8.47.0",
"agadoo": "^3.0.0",
"bundlemon": "^3.1.0",
"eslint": "^9.38.0",
"eslint-plugin-jest": "^28.11.0",
"eslint-plugin-react-hooks": "^5.2.0",
"eslint-plugin-simple-import-sort": "^12.1.1",
"eslint-plugin-sort-keys-fix": "^1.1.2",
"eslint-plugin-typescript-sort-keys": "^3.3.0",
"eslint": "^9.39.1",
"jest": "^30.0.0-alpha.6",
"jest-environment-jsdom": "^30.0.0-alpha.6",
"jest-runner-eslint": "^2.3.0",
"jest-runner-prettier": "^1.0.0",
"jest-watch-master": "^1.0.0",
"jest-watch-select-projects": "^2.0.0",
"jest-watch-typeahead": "^2.2.2",
"prettier": "^3.6",
"prettier": "^3.7.4",
"ts-node": "^10.9.2",
"tsup": "^8.5.1",
"turbo": "^2.5.5",
"typedoc": "^0.28.14",
"typedoc-plugin-frontmatter": "^1.3.1",
"typedoc-plugin-markdown": "^4.9.0",
"typedoc-plugin-mdn-links": "^5.0.10",
"typescript": "^5.8.3"
"typescript": "^5.9.3"
},
"engines": {
"node": ">=20.18.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/accounts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
"@solana/rpc-types": "workspace:*"
},
"peerDependencies": {
"typescript": ">=5.3.3"
"typescript": ">=5.9.3"
},
"engines": {
"node": ">=20.18.0"
Expand Down
2 changes: 1 addition & 1 deletion packages/addresses/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
"@solana/nominal-types": "workspace:*"
},
"peerDependencies": {
"typescript": ">=5.3.3"
"typescript": ">=5.9.3"
},
"engines": {
"node": ">=20.18.0"
Expand Down
2 changes: 1 addition & 1 deletion packages/assertions/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
"@solana/errors": "workspace:*"
},
"peerDependencies": {
"typescript": ">=5.3.3"
"typescript": ">=5.9.3"
},
"engines": {
"node": ">=20.18.0"
Expand Down
2 changes: 1 addition & 1 deletion packages/codecs-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
"tinybench": "^5.1.0"
},
"peerDependencies": {
"typescript": ">=5.3.3"
"typescript": ">=5.9.3"
},
"engines": {
"node": ">=20.18.0"
Expand Down
6 changes: 4 additions & 2 deletions packages/codecs-core/src/readonly-uint8array.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,10 @@
* bytes[0] = 42; // Type error: Cannot assign to '0' because it is a read-only property.
* ```
*/
export interface ReadonlyUint8Array<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike>
extends Omit<Uint8Array<TArrayBuffer>, TypedArrayMutableProperties> {
export interface ReadonlyUint8Array<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> extends Omit<
Uint8Array<TArrayBuffer>,
TypedArrayMutableProperties
> {
readonly [n: number]: number;
}

Expand Down
2 changes: 1 addition & 1 deletion packages/codecs-data-structures/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
"@solana/codecs-strings": "workspace:*"
},
"peerDependencies": {
"typescript": ">=5.3.3"
"typescript": ">=5.9.3"
},
"engines": {
"node": ">=20.18.0"
Expand Down
2 changes: 1 addition & 1 deletion packages/codecs-numbers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
"@solana/errors": "workspace:*"
},
"peerDependencies": {
"typescript": ">=5.3.3"
"typescript": ">=5.9.3"
},
"engines": {
"node": ">=20.18.0"
Expand Down
2 changes: 1 addition & 1 deletion packages/codecs-strings/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
},
"peerDependencies": {
"fastestsmallesttextencoderdecoder": "^1.0.22",
"typescript": ">=5.3.3"
"typescript": ">=5.9.3"
},
"peerDependenciesMeta": {
"fastestsmallesttextencoderdecoder": {
Expand Down
2 changes: 1 addition & 1 deletion packages/codecs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
"@solana/options": "workspace:*"
},
"peerDependencies": {
"typescript": ">=5.3.3"
"typescript": ">=5.9.3"
},
"engines": {
"node": ">=20.18.0"
Expand Down
2 changes: 1 addition & 1 deletion packages/compat/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
"@solana/web3.js": "^1"
},
"peerDependencies": {
"typescript": ">=5.3.3"
"typescript": ">=5.9.3"
},
"engines": {
"node": ">=20.18.0"
Expand Down
2 changes: 1 addition & 1 deletion packages/errors/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
"commander": "14.0.2"
},
"peerDependencies": {
"typescript": ">=5.3.3"
"typescript": ">=5.9.3"
},
"engines": {
"node": ">=20.18.0"
Expand Down
1 change: 1 addition & 0 deletions packages/eslint-config/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
engine-strict=true
29 changes: 29 additions & 0 deletions packages/eslint-config/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import solanaConfig from '@solana/eslint-config-solana';
import solanaJestConfig from '@solana/eslint-config-solana/jest';

export default [
...solanaConfig,
...solanaJestConfig,
{
rules: {
'@typescript-eslint/no-base-to-string': 'off',
'@typescript-eslint/no-unsafe-argument': 'off',
'@typescript-eslint/no-unsafe-assignment': 'off',
'@typescript-eslint/no-unsafe-call': 'off',
'@typescript-eslint/no-unsafe-enum-comparison': 'off',
'@typescript-eslint/no-unsafe-member-access': 'off',
'@typescript-eslint/no-unsafe-return': 'off',
'@typescript-eslint/only-throw-error': 'off',
'@typescript-eslint/prefer-promise-reject-errors': 'error',
'@typescript-eslint/restrict-plus-operands': 'error',
'@typescript-eslint/restrict-template-expressions': 'error',
'@typescript-eslint/unbound-method': 'off',
'jest/expect-expect': [
'error',
{
assertFunctionNames: ['expect', 'expectNewPreOffset', 'expectNewPostOffset'],
},
],
},
},
];
Comment on lines +1 to +29
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Should we consider updating @solana/eslint-config-solana with these? I've been using @solana/eslint-config-solana directly lately for Codama & program repos and it would be nice if we were aligned on all these projects out-of-the-box.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yeah, that was totally the idea. You'll notice that most of these are 'off' and the reason for that is this: #13

The ones that ended up 'error' are, as you've noticed, just things that should have been moved into the common config.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

4 changes: 4 additions & 0 deletions packages/eslint-config/eslint.config.react.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import solanaReactConfig from '@solana/eslint-config-solana/react';
import baseConfig from './eslint.config.mjs';

export default [...solanaReactConfig, ...baseConfig];
27 changes: 27 additions & 0 deletions packages/eslint-config/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"name": "@solana/eslint-config",
"version": "0.0.0",
"private": true,
"files": [
"eslint.config.mjs",
"eslint.config.react.mjs"
],
"devDependencies": {
"@eslint/js": "^9.39.1",
"@eslint/json": "^0.14.0",
"@solana/eslint-config-solana": "^5.0.1",
"@typescript-eslint/eslint-plugin": "^8.49.0",
"@typescript-eslint/parser": "^8.49.0",
"eslint-plugin-jest": "^29.2.1",
"eslint-plugin-react-hooks": "^7.0.1",
"eslint-plugin-simple-import-sort": "^12.1.1",
"eslint-plugin-sort-keys-fix": "^1.1.2",
"eslint-plugin-typescript-sort-keys": "^3.3.0"
},
"peerDependencies": {
"eslint": "^9.39.1"
},
"engines": {
"node": ">=20.18.0"
}
}
5 changes: 5 additions & 0 deletions packages/eslint-config/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"$schema": "https://json.schemastore.org/tsconfig",
"display": "ESLint Config",
"extends": "../tsconfig/base.json"
}
2 changes: 1 addition & 1 deletion packages/fast-stable-stringify/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
"maintained node versions"
],
"peerDependencies": {
"typescript": ">=5.3.3"
"typescript": ">=5.9.3"
},
"engines": {
"node": ">=20.18.0"
Expand Down
2 changes: 1 addition & 1 deletion packages/functional/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
"maintained node versions"
],
"peerDependencies": {
"typescript": ">=5.3.3"
"typescript": ">=5.9.3"
},
"engines": {
"node": ">=20.18.0"
Expand Down
2 changes: 1 addition & 1 deletion packages/instruction-plans/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
"@solana/functional": "workspace:*"
},
"peerDependencies": {
"typescript": ">=5.3.3"
"typescript": ">=5.9.3"
},
"engines": {
"node": ">=20.18.0"
Expand Down
Loading