Skip to content

Commit

Permalink
chore: enable verbatimModuleSyntax in tsconfig (#2664)
Browse files Browse the repository at this point in the history
* chore: enable verbatimModuleSyntax in tsconfig

* fix a workflow

* fix title
  • Loading branch information
dai-shi authored Jul 20, 2024
1 parent debff8b commit 628aa3e
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 4 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/test-old-typescript.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,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 Newer TS
if: ${{ matrix.typescript == '4.9.5' || matrix.typescript == '4.8.4' }}
run: |
Expand Down
3 changes: 2 additions & 1 deletion src/babel/plugin-debug-label.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import babel, { PluginObj } from '@babel/core'
import babel from '@babel/core'
import type { PluginObj } from '@babel/core'
import _templateBuilder from '@babel/template'
import { isAtom } from './utils.ts'
import type { PluginOptions } from './utils.ts'
Expand Down
3 changes: 2 additions & 1 deletion src/babel/plugin-react-refresh.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import babel, { PluginObj } from '@babel/core'
import babel from '@babel/core'
import type { PluginObj } from '@babel/core'
import _templateBuilder from '@babel/template'
import { isAtom } from './utils.ts'
import type { PluginOptions } from './utils.ts'
Expand Down
2 changes: 1 addition & 1 deletion src/babel/preset.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import babel from '@babel/core'
import pluginDebugLabel from './plugin-debug-label.ts'
import pluginReactRefresh from './plugin-react-refresh.ts'
import { PluginOptions } from './utils.ts'
import type { PluginOptions } from './utils.ts'

export default function jotaiPreset(
_: typeof babel,
Expand Down
3 changes: 2 additions & 1 deletion src/vanilla/utils/atomWithLazy.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { PrimitiveAtom, atom } from '../../vanilla.ts'
import { atom } from '../../vanilla.ts'
import type { PrimitiveAtom } from '../../vanilla.ts'

export function atomWithLazy<Value>(
makeInitial: () => Value,
Expand Down
1 change: 1 addition & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"allowImportingTsExtensions": true,
"noUncheckedIndexedAccess": true,
"exactOptionalPropertyTypes": true,
"verbatimModuleSyntax": true,
"noEmit": true,
"baseUrl": ".",
"paths": {
Expand Down

0 comments on commit 628aa3e

Please sign in to comment.