chore: enable verbatimModuleSyntax in tsconfig (#2649)

This commit is contained in:
Daishi Kato 2024-07-20 17:15:21 +09:00 committed by GitHub
parent e13777495a
commit 66f3a029fb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 9 additions and 3 deletions

View File

@ -37,6 +37,10 @@ jobs:
cache-dependency-path: '**/pnpm-lock.yaml'
- run: pnpm install --frozen-lockfile
- run: pnpm build
- name: Patch for v4/v3 TS
if: ${{ startsWith(matrix.typescript, '4.') || startsWith(matrix.typescript, '3.') }}
run: |
sed -i~ 's/"verbatimModuleSyntax": true,//' tsconfig.json
- name: Patch for Old TS
run: |
sed -i~ 's/\/\/ @ts-expect-error.*\[LATEST-TS-ONLY\]//' tests/*.tsx

View File

@ -1,11 +1,11 @@
import {
Component as ClassComponent,
ReactNode,
StrictMode,
useEffect,
useLayoutEffect,
useState,
} from 'react'
import type { ReactNode } from 'react'
import { act, fireEvent, render } from '@testing-library/react'
import ReactDOM from 'react-dom'
import { afterEach, expect, it, vi } from 'vitest'

View File

@ -1,11 +1,11 @@
import {
Component as ClassComponent,
ReactNode,
StrictMode,
useCallback,
useEffect,
useState,
} from 'react'
import type { ReactNode } from 'react'
import { render } from '@testing-library/react'
import { afterEach, it, vi } from 'vitest'
import { create } from 'zustand'

View File

@ -1,6 +1,7 @@
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'
import { devtools, redux } from 'zustand/middleware'
import { StoreApi, createStore } from 'zustand/vanilla'
import { createStore } from 'zustand/vanilla'
import type { StoreApi } from 'zustand/vanilla'
type TupleOfEqualLengthH<
Arr extends unknown[],

View File

@ -10,6 +10,7 @@
"allowImportingTsExtensions": true,
"noUncheckedIndexedAccess": true,
"exactOptionalPropertyTypes": true,
"verbatimModuleSyntax": true,
"noEmit": true,
"baseUrl": ".",
"paths": {