untsx
v0.1.3
Published
Universal TypeScript extension for all popular toolchains.
Readme
untsx
Universal TypeScript extension for all popular toolchains.
Install
npm i untsxFeatures
- ✅ Parser - Supports Acorn, Babel, espree, ESLint-TypeScript, and more parsers.
- ✅ TypeScript - Full type support with transformations.
- ✅ Bundler - Seamless integration with Vite and other bundlers via
unplugin. - ✅ Prettier - Code formatting support.
- ✅ ESLint - Linting with proper syntax recognition.
- ✅ Development - Hot reload and dev server support powered by Vite.
Usage
Vite Integration
To integrate with Vite, configure your vite.config.ts as follows:
// vite.config.ts
import Foo from 'untsx-foo/unplugin'
import { defineConfig } from 'vite'
export default defineConfig({
plugins: [Foo.vite()],
})TypeScript Macro
For proper syntax highlighting and IntelliSense support, install the TS Macro extension in VS Code.
Alternatively, search for "TS Macro" in the VS Code Extensions marketplace.
Then, configure your ts-macro.config.ts:
// ts-macro.config.ts
import Foo from 'untsx-foo/volar'
export default {
plugins: [Foo()],
}Prettier Configuration
To enable Prettier support, configure your prettier.config.js as follows:
// prettier.config.js
import { fileURLToPath } from 'node:url'
export default {
// ...
plugins: [fileURLToPath(import.meta.resolve('untsx-foo/prettier'))],
}ESLint Configuration
To enable ESLint support, configure your eslint.config.js as follows:
// eslint.config.js
import { jsParser, tsParser } from 'untsx-foo/eslint'
export default [
{
files: ['**/*.ts'],
languageOptions: { parser: tsParser },
},
{
files: ['**/*.js'],
languageOptions: { parser: jsParser },
},
]Sponsors
License
MIT License © 2025 Kevin Deng
