Skip to content
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

fix: 🐛 correctly export meta for ESM types #374

Merged
Show file tree
Hide file tree
Changes from all 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
5 changes: 5 additions & 0 deletions .changeset/long-rats-divide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"eslint-plugin-astro": patch
---

fix: 🐛 correctly export `meta` for ESM types
4 changes: 2 additions & 2 deletions src/plugin.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { rules as ruleList } from "./utils/rules"
import * as processorsDefines from "./processor"
import type { Rule } from "eslint"
import * as meta from "./meta"
import { name, version } from "./meta"
import { environments } from "./environments"

const rules = ruleList.reduce(
Expand All @@ -17,7 +17,7 @@ const processors = {
"client-side-ts": processorsDefines.clientSideTsProcessor,
}
export const plugin = {
meta,
meta: { name, version },
environments,
rules,
processors,
Expand Down
9 changes: 9 additions & 0 deletions tests/fixtures/integration/config/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"compilerOptions": {
"target": "ESNext",
"module": "ESNext",
"moduleResolution": "Bundler",
"noEmit": true,
"allowJs": true
}
}
4 changes: 4 additions & 0 deletions tests/integration/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,5 +65,9 @@ for (const dirent of fs.readdirSync(TEST_FIXTURES_ROOT, {
}
}
})

it("should NOT fail when running tsc", () => {
cp.execSync(`npx tsc`, { cwd: TEST_CWD })
})
})
}
Loading