Skip to content

Commit 861b761

Browse files
authored
Merge pull request #2274 from umbraco/v14/chore/tsconfig-module-syntax
Build: Add advanced module check
2 parents 4146dbc + ba483a2 commit 861b761

File tree

12 files changed

+24
-23
lines changed

12 files changed

+24
-23
lines changed

devops/tsconfig/index.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ DON'T EDIT THIS FILE DIRECTLY. It is generated by /devops/tsconfig/index.js
1818
const tsConfigBase = {
1919
compilerOptions: {
2020
module: 'esnext',
21+
moduleResolution: 'bundler',
22+
moduleDetection: 'force',
23+
verbatimModuleSyntax: true,
2124
target: 'es2022',
2225
lib: ['es2022', 'dom', 'dom.iterable'],
2326
outDir: './types',
@@ -29,8 +32,6 @@ const tsConfigBase = {
2932
incremental: true,
3033
skipLibCheck: true,
3134
noImplicitOverride: true,
32-
/* Bundler mode */
33-
moduleResolution: 'bundler',
3435
allowImportingTsExtensions: true,
3536
resolveJsonModule: true,
3637
isolatedModules: true,

examples/sorter-with-nested-containers/sorter-item.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { UmbTextStyles } from '@umbraco-cms/backoffice/style';
2-
import { css, html, customElement, LitElement, state, repeat, property } from '@umbraco-cms/backoffice/external/lit';
2+
import { css, html, customElement, LitElement, property } from '@umbraco-cms/backoffice/external/lit';
33
import { UmbElementMixin } from '@umbraco-cms/backoffice/element-api';
4-
import { UmbSorterConfig, UmbSorterController } from '@umbraco-cms/backoffice/sorter';
54

65
@customElement('example-sorter-item')
76
export class ExampleSorterItem extends UmbElementMixin(LitElement) {

examples/sorter-with-two-containers/sorter-group.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1+
import type ExampleSorterItem from './sorter-item.js';
12
import { UmbTextStyles } from '@umbraco-cms/backoffice/style';
23
import { css, html, customElement, LitElement, repeat, property } from '@umbraco-cms/backoffice/external/lit';
34
import { UmbElementMixin } from '@umbraco-cms/backoffice/element-api';
4-
import { UmbSorterConfig, UmbSorterController } from '@umbraco-cms/backoffice/sorter';
5+
import { UmbSorterController } from '@umbraco-cms/backoffice/sorter';
56

67
import './sorter-item.js';
7-
import ExampleSorterItem from './sorter-item.js';
88

99
export type ModelEntryType = {
1010
name: string;

examples/sorter-with-two-containers/sorter-item.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { UmbTextStyles } from '@umbraco-cms/backoffice/style';
2-
import { css, html, customElement, LitElement, state, repeat, property } from '@umbraco-cms/backoffice/external/lit';
2+
import { css, html, customElement, LitElement, property } from '@umbraco-cms/backoffice/external/lit';
33
import { UmbElementMixin } from '@umbraco-cms/backoffice/element-api';
4-
import { UmbSorterConfig, UmbSorterController } from '@umbraco-cms/backoffice/sorter';
54

65
@customElement('example-sorter-item')
76
export class ExampleSorterItem extends UmbElementMixin(LitElement) {

src/external/router-slot/config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { PathMatch } from './model.js';
1+
import type { PathMatch } from './model.js';
22

33
export const CATCH_ALL_WILDCARD: string = '**';
44
export const TRAVERSE_FLAG: string = '\\.\\.\\/';

src/external/router-slot/router-slot.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { GLOBAL_ROUTER_EVENTS_TARGET, ROUTER_SLOT_TAG_NAME } from './config.js';
2-
import {
2+
import type {
33
Cancel,
44
EventListenerSubscription,
55
GlobalRouterEvent,

src/external/router-slot/util/events.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { GLOBAL_ROUTER_EVENTS_TARGET } from '../config';
2-
import { EventListenerSubscription, GlobalRouterEvent, IRoute, IRoutingInfo } from '../model';
1+
import { GLOBAL_ROUTER_EVENTS_TARGET } from '../config.js';
2+
import type { EventListenerSubscription, GlobalRouterEvent, IRoute, IRoutingInfo } from '../model.js';
33

44
/**
55
* Dispatches a did change route event.

src/external/router-slot/util/history.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import { GLOBAL_ROUTER_EVENTS_TARGET, HISTORY_PATCH_NATIVE_KEY } from '../config';
2-
import { GlobalRouterEvent } from '../model';
3-
import { dispatchGlobalRouterEvent } from './events';
1+
import { GLOBAL_ROUTER_EVENTS_TARGET, HISTORY_PATCH_NATIVE_KEY } from '../config.js';
2+
import type { GlobalRouterEvent } from '../model.js';
3+
import { dispatchGlobalRouterEvent } from './events.js';
44

55
// Mapping a history functions to the events they are going to dispatch.
66
export const historyPatches: [string, GlobalRouterEvent[]][] = [

src/external/router-slot/util/router.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { CATCH_ALL_WILDCARD, DEFAULT_PATH_MATCH, PARAM_IDENTIFIER, TRAVERSE_FLAG } from '../config';
2-
import {
1+
import { CATCH_ALL_WILDCARD, DEFAULT_PATH_MATCH, PARAM_IDENTIFIER, TRAVERSE_FLAG } from '../config.js';
2+
import type {
33
IComponentRoute,
44
IRedirectRoute,
55
IResolverRoute,
@@ -12,8 +12,8 @@ import {
1212
PathFragment,
1313
RouterTree,
1414
IRoutingInfo,
15-
} from '../model';
16-
import { constructPathWithBasePath, path as getPath, queryString, stripSlash } from './url';
15+
} from '../model.js';
16+
import { constructPathWithBasePath, path as getPath, queryString, stripSlash } from './url.js';
1717

1818
/**
1919
* Determines whether the path is active.

src/external/router-slot/util/shadow.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { ROUTER_SLOT_TAG_NAME } from '../config';
2-
import { IRouterSlot } from '../model';
1+
import { ROUTER_SLOT_TAG_NAME } from '../config.js';
2+
import type { IRouterSlot } from '../model.js';
33

44
/**
55
* Queries the parent router.

0 commit comments

Comments
 (0)