mirror of
https://github.com/shoelace-style/shoelace.git
synced 2026-01-12 02:59:13 +00:00
Add missing extensions (#1770)
* fix(typescript): add missing extension to imports in typescript This is required for the types to work with the new `--module-resolution=node16`. The list of places to fix was obtained by a crude script: ```sh rg -g'**/*.ts' -g'!**/*.test.ts' ' from\s+.\.' | rg -v '\.js' ``` References #1765 * add missing extensions * revert tsconfig * prettier * fix test files for NodeNext * prettier * changelog entry * prettier * prettier * prettier --------- Co-authored-by: Andrey Lushnikov <aslushnikov@gmail.com>
This commit is contained in:
@@ -25,10 +25,10 @@ for await (const component of components) {
|
||||
const componentFile = path.join(componentDir, 'index.ts');
|
||||
const importPath = component.path.replace(/\.js$/, '.component.js');
|
||||
const eventImports = (component.events || [])
|
||||
.map(event => `import type { ${event.eventName} } from '../../events/events';`)
|
||||
.map(event => `import type { ${event.eventName} } from '../../events/events.js';`)
|
||||
.join('\n');
|
||||
const eventExports = (component.events || [])
|
||||
.map(event => `export type { ${event.eventName} } from '../../events/events';`)
|
||||
.map(event => `export type { ${event.eventName} } from '../../events/events.js';`)
|
||||
.join('\n');
|
||||
const eventNameImport = (component.events || []).length > 0 ? `import { type EventName } from '@lit/react';` : ``;
|
||||
const events = (component.events || [])
|
||||
|
||||
Reference in New Issue
Block a user