tsdown-jsr-exports-lint
v0.1.4
Published
JSR exports field lint with tsdown
Readme
tsdown-jsr-exports-lint
JSR exports field lint with tsdown
🐱 Motivation
- When
publintoption is enabled on tsdown.config, tsdown will lint theexportsfield inpackage.jsonusingpublint. - However,
publintcurrently does not lint theexportsin package manifest files like JSR'sjsr.json. - Linting for
jsr.jsonmay be niche, but for those like me who distribute library packages via both npm and JSR, this lint is necessary.
💿 Installation
# npm
npm install --save-dev tsdown-jsr-exports-lint
## pnpm
pnpm add -D tsdown-jsr-exports-lint
## yarn
yarn add -D tsdown-jsr-exports-lint
## bum
bun add -D tsdown-jsr-exports-lint🚀 Usage
import { defineConfig } from 'tsdown'
import { jsrExportsLint } from 'tsdown-jsr-exports-lint'
export default defineConfig({
entry: ['./src/index.ts', './src/features/feature1.ts', './src/features/feature2.ts'],
publint: true,
dts: true,
// lint via `onSuccess` option
onSuccess: jsrExportsLint() // or put your jsr.json path (e.g. `jsrExportsLint('/path/to/your/projects/project/jsr.json')`)
})🤝 Sponsors
The development of Gunish is supported by my OSS sponsors!
