Skip to content

Migrate to tsdown to fix dts output #146

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Apr 30, 2025
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .prettierrc.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module.exports = {
export default {
plugins: ['prettier-plugin-svelte', 'prettier-plugin-astro']
}
31 changes: 22 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
{
"name": "typescript-eslint-parser-for-extra-files",
"version": "0.8.0",
"type": "module",
"description": "An experimental ESLint custom parser for Vue, Svelte, and Astro for use with TypeScript. It provides type information in combination with each framework's ESLint custom parser.",
"repository": "git+https://github.com/ota-meshi/typescript-eslint-parser-for-extra-files.git",
"repository": {
"type": "git",
"url": "git+https://github.com/ota-meshi/typescript-eslint-parser-for-extra-files.git"
},
"homepage": "https://github.com/ota-meshi/typescript-eslint-parser-for-extra-files#readme",
"author": "Yosuke Ota (https://github.com/ota-meshi)",
"funding": "https://github.com/sponsors/ota-meshi",
Expand All @@ -11,17 +15,23 @@
"engines": {
"node": ">=16.0.0"
},
"main": "lib/index.js",
"module": "./lib/index.mjs",
"main": "./lib/index.cjs",
"module": "./lib/index.js",
"types": "./lib/index.d.ts",
"exports": {
".": {
"import": "./lib/index.mjs",
"require": "./lib/index.js"
"module-sync": {
"types": "./lib/index.d.ts",
"default": "./lib/index.js"
},
"default": {
"types": "./lib/index.d.cts",
"default": "./lib/index.cjs"
}
}
},
"types": "./lib/index.d.ts",
"files": [
"lib"
"lib/"
],
"keywords": [
"eslint",
Expand All @@ -32,7 +42,7 @@
"typescript"
],
"scripts": {
"build": "tsup",
"build": "tsdown",
"clean": "rimraf .nyc_output lib coverage",
"cover": "nyc --reporter=lcov yarn test",
"debug": "yarn mocha \"tests/src/**/*.ts\" --reporter dot --timeout 60000",
Expand Down Expand Up @@ -69,6 +79,7 @@
}
},
"dependencies": {
"@typescript-eslint/utils": "^8.31.1",
"tinyglobby": "^0.2.12"
},
"devDependencies": {
Expand Down Expand Up @@ -107,12 +118,14 @@
"prettier-plugin-astro": "^0.14.0",
"prettier-plugin-pkg": "^0.19.0",
"prettier-plugin-svelte": "^3.0",
"publint": "^0.3.12",
"semver": "^7.3.5",
"svelte": "^4.0.0",
"svelte-eslint-parser": "^1.0.0",
"svelte2tsx": "^0.7.0",
"tsup": "^8.0.0",
"tsdown": "https://pkg.pr.new/tsdown@03230c4",
Copy link
Contributor Author

@lishaduck lishaduck Apr 28, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"typescript": "~5.8.0",
"unplugin-unused": "^0.4.4",
"vue": "^3.2.41",
"vue-eslint-parser": "^10.0.0"
},
Expand Down
3 changes: 1 addition & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ import { TSServiceManager } from "./ts";
import * as tsEslintParser from "@typescript-eslint/parser";
import { getProjectConfigFiles } from "./utils/get-project-config-files";
import { resolveProjectList } from "./utils/resolve-project-list";
export * as meta from "./meta";
export { name } from "./meta";
export { default as meta, name } from "./meta";

const DEFAULT_EXTRA_FILE_EXTENSIONS = [".vue", ".svelte", ".astro"];
const tsServiceManager = new TSServiceManager();
Expand Down
9 changes: 8 additions & 1 deletion src/meta.ts
Original file line number Diff line number Diff line change
@@ -1 +1,8 @@
export { name, version } from "../package.json";
import { name as pkgName, version } from "../package.json";
import { TSESLint } from "@typescript-eslint/utils";

const meta: TSESLint.FlatConfig.PluginMeta = { name: pkgName, version };

export default meta;

export const name: string = pkgName;
6 changes: 4 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@
"target": "es2015",
"strict": true,
"lib": ["es2020", "DOM"],
"module": "Node16",
"moduleResolution": "Node16",
"module": "Preserve",
"moduleResolution": "Bundler",
"declaration": true,
"isolatedModules": true,
"isolatedDeclarations": true,
"noImplicitAny": true,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true,
Expand Down
11 changes: 11 additions & 0 deletions tsdown.config.mts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { defineConfig } from "tsdown";

export default defineConfig({
entry: ["src/index.ts"],
format: ["cjs", "esm"],
target: ["node16"],
outDir: "lib",
skipNodeModulesBundle: true,
publint: { strict: true, pack: "npm" },
unused: true,
});
9 changes: 0 additions & 9 deletions tsup.config.ts

This file was deleted.

Loading