Skip to content

Commit 5427d4d

Browse files
fix: tsconfig imports
1 parent 5969b06 commit 5427d4d

File tree

9 files changed

+13
-41
lines changed

9 files changed

+13
-41
lines changed

packages/react/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"type": "module",
66
"main": "./src/index.ts",
77
"types": "./src/index.d.ts",
8+
"sideEffects": false,
89
"scripts": {
910
"watch": "tsc -w -p ./tsconfig.json",
1011
"build": "pnpm clean && pnpm build:esm && pnpm build:postcompile && pnpm build:clean",

packages/react/src/constants/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import {
1818
scroll,
1919
zkSync,
2020
} from 'viem/chains';
21-
import { ChainIds, ChainType } from '../types';
21+
import { ChainIds, ChainType } from '../types/index.js';
2222

2323
export const CHAIN_ID = {
2424
// evm

packages/react/src/index.ts

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
export * from './constants/index.js';
12
export * from './providers/TangledContext.js';
23
export * from './types/index.js';
34
export * from './utils/getConnectorIcon.js';

packages/react/src/providers/EVMProvider.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { ReactNode, useState } from 'react';
22
import { Chain, Transport, http } from 'viem';
33
import { WagmiProvider, createConfig } from 'wagmi';
4-
import { CHAINS_DATA } from '../constants';
5-
import { ChainConfig } from '../types';
4+
import { CHAINS_DATA } from '../constants/index.js';
5+
import { ChainConfig } from '../types/index.js';
66

77
const EVMProvider = ({ children, chains }: { children: ReactNode; chains: ChainConfig[] }) => {
88
const [evmChains] = useState(() => {

packages/react/src/providers/TangledContext.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ import { coinbaseWallet, injected, walletConnect } from '@wagmi/connectors';
33
import { ReactNode, createContext, useState } from 'react';
44
import { Chain, Transport, http } from 'viem';
55
import { WagmiProvider, createConfig } from 'wagmi';
6-
import { CHAINS_DATA } from '../constants';
7-
import { ChainConfig } from '../types';
6+
import { CHAINS_DATA } from '../constants/index.js';
7+
import { ChainConfig } from '../types/index.js';
88

99
export const TangledContext = createContext({});
1010

packages/react/src/types/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { CHAIN_ID, CHAIN_TYPES } from '../constants';
1+
import { CHAIN_ID, CHAIN_TYPES } from '../constants/index.js';
22

33
export type ChainType = (typeof CHAIN_TYPES)[number];
44

packages/react/tsconfig.json

+4-23
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,14 @@
11
{
22
"extends": "../../tsconfig.json",
33
"compilerOptions": {
4-
"target": "ES2020",
5-
"useDefineForClassFields": true,
6-
"lib": ["ES2020", "DOM", "DOM.Iterable"],
7-
"module": "NodeNext",
8-
"skipLibCheck": true,
9-
10-
/* Bundler mode */
11-
"moduleResolution": "NodeNext",
12-
"resolveJsonModule": true,
13-
"isolatedModules": true,
14-
154
"composite": true,
16-
"noEmit": false,
175
"declaration": true,
6+
"noEmit": false,
187
"sourceMap": true,
19-
20-
"jsx": "react-jsx",
21-
228
"outDir": "dist/_esm",
239
"rootDir": "./src",
24-
25-
/* Linting */
26-
"strict": true,
27-
"noUnusedLocals": true,
28-
"noUnusedParameters": true,
29-
"noFallthroughCasesInSwitch": true
10+
"module": "NodeNext",
11+
"moduleResolution": "NodeNext"
3012
},
31-
"include": ["src"],
32-
"references": [{ "path": "./tsconfig.node.json" }]
13+
"include": ["./src/**/*", "./src/**/*.json"]
3314
}

packages/react/tsconfig.node.json

-11
This file was deleted.

prettier.config.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
module.exports = {
1+
export default {
22
endOfLine: 'lf',
33
printWidth: 120,
44
useTabs: false,

0 commit comments

Comments
 (0)