diff --git a/.eslintrc.cjs b/.eslintrc.cjs index 0fa5544..806e868 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -6,5 +6,11 @@ module.exports = { extends: [ '@codingame/eslint-config', '@codingame/eslint-config-react' - ] + ], + rules: { + 'import/extensions': [ + 'error', + 'ignorePackages' + ] + } } diff --git a/src/MonacoEditor.tsx b/src/MonacoEditor.tsx index e3611dd..e2a2290 100644 --- a/src/MonacoEditor.tsx +++ b/src/MonacoEditor.tsx @@ -5,8 +5,8 @@ import { createEditor, getMonacoLanguage, updateEditorKeybindingsMode, registerE import { IEditorOptions, IResolvedTextEditorModel } from '@codingame/monaco-vscode-editor-service-override' import { DisposableStore, IReference, ITextFileEditorModel } from 'vscode/monaco' import type { ITextFileEditorModelSaveEvent } from 'vscode/vscode/vs/workbench/services/textfile/common/textfiles' -import { useDeepMemo, useLastValueRef, useLastVersion, useThemeColor } from './hooks' -import './style' +import { useDeepMemo, useLastValueRef, useLastVersion, useThemeColor } from './hooks.js' +import './style.js' const STATUS_BAR_HEIGHT = 20 diff --git a/src/index.ts b/src/index.ts index 1103364..4ed6f99 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,8 +1,8 @@ import { loadLanguage, monaco, updateKeybindings, updateUserConfiguration } from '@codingame/monaco-editor-wrapper' import { IEditorOptions, IResolvedTextEditorModel } from '@codingame/monaco-vscode-editor-service-override' -import { IReference } from 'vscode/monaco' -import { useThemeColor, useUserConfiguration } from './hooks' -import MonacoEditor, { MonacoEditorProps } from './MonacoEditor' +import type { IReference } from 'vscode/monaco' +import { useThemeColor, useUserConfiguration } from './hooks.js' +import MonacoEditor, { MonacoEditorProps } from './MonacoEditor.js' export default MonacoEditor export { diff --git a/src/vscodeParts.tsx b/src/vscodeParts.tsx index 575bf35..069c47d 100644 --- a/src/vscodeParts.tsx +++ b/src/vscodeParts.tsx @@ -1,6 +1,6 @@ import React, { Fragment, ReactNode, useEffect, useRef, useState } from 'react' import * as monaco from 'monaco-editor' -import { attachPart, Parts, onPartVisibilityChange, registerCustomView, ViewContainerLocation, CustomViewOption, isPartVisibile } from '@codingame/monaco-vscode-views-service-override/views' +import { attachPart, Parts, onPartVisibilityChange, registerCustomView, ViewContainerLocation, CustomViewOption, isPartVisibile } from '@codingame/monaco-vscode-views-service-override' import { createPortal } from 'react-dom' import { initializePromise } from '@codingame/monaco-editor-wrapper' import { DisposableStore } from 'vscode/monaco' diff --git a/tsconfig.json b/tsconfig.json index 0996e44..ff74c98 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -22,7 +22,7 @@ "sourceMap": true, "target": "ES2022" }, - "include": ["src"], + "include": ["src", ".eslintrc.cjs"], "exclude": [ "dist", "node_modules"