From 206f576e0d577622af3c144a5716693c2438e3e9 Mon Sep 17 00:00:00 2001 From: Torsten Brendgen Date: Mon, 24 Aug 2026 13:09:37 +0200 Subject: [PATCH] Refactor import statements to use ES6 module syntax and remove unused declarations --- package.json | 2 +- src/declarations.d.ts | 4 ---- src/webparts/recurringEvents/RecurringEventsWebPart.ts | 2 +- src/webparts/recurringEvents/components/RecurringEvents.tsx | 2 +- 4 files changed, 3 insertions(+), 7 deletions(-) delete mode 100644 src/declarations.d.ts diff --git a/package.json b/package.json index 16474b1..bf44054 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "scripts": { "build": "gulp bundle", "clean": "gulp clean", - "test": "tsc --noEmit -p . && tsc -p tests/tsconfig.json && node temp/tests/tests/RecurringEventsCore.test.js && node tests/validate-project.js", + "test": "tsc -p tests/tsconfig.json && node temp/tests/tests/RecurringEventsCore.test.js && node tests/validate-project.js", "package": "npm test && gulp clean && gulp bundle --ship && gulp package-solution --ship" }, "dependencies": { diff --git a/src/declarations.d.ts b/src/declarations.d.ts deleted file mode 100644 index dc8c2f7..0000000 --- a/src/declarations.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -declare module '*.module.scss' { - const styles: { [className: string]: string }; - export = styles; -} diff --git a/src/webparts/recurringEvents/RecurringEventsWebPart.ts b/src/webparts/recurringEvents/RecurringEventsWebPart.ts index 136bdd7..4225215 100644 --- a/src/webparts/recurringEvents/RecurringEventsWebPart.ts +++ b/src/webparts/recurringEvents/RecurringEventsWebPart.ts @@ -15,7 +15,7 @@ import { RecurringEventsDataService } from './RecurringEventsDataService'; import { EventsLayout, IEventDateRange, IEventsListOption, IRecurringEvent } from './RecurringEventsTypes'; import RecurringEvents from './components/RecurringEvents'; import { IRecurringEventsProps } from './components/IRecurringEventsProps'; -import styles = require('./components/RecurringEvents.module.scss'); +import styles from './components/RecurringEvents.module.scss'; export interface IRecurringEventsWebPartProps { title: string; diff --git a/src/webparts/recurringEvents/components/RecurringEvents.tsx b/src/webparts/recurringEvents/components/RecurringEvents.tsx index bd67c92..b11275f 100644 --- a/src/webparts/recurringEvents/components/RecurringEvents.tsx +++ b/src/webparts/recurringEvents/components/RecurringEvents.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import { IRecurringEvent } from '../RecurringEventsTypes'; -import styles = require('./RecurringEvents.module.scss'); +import styles from './RecurringEvents.module.scss'; import { IRecurringEventsProps } from './IRecurringEventsProps'; export default class RecurringEvents extends React.Component {