Skip to content

Commit 6b8331a

Browse files
committed
Use eslint to check for missing file extensions in imports
1 parent de7728e commit 6b8331a

File tree

3 files changed

+12
-4
lines changed

3 files changed

+12
-4
lines changed

.eslintrc.cjs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,14 @@ module.exports = {
2323
' * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.',
2424
' * For licensing, see LICENSE.md.',
2525
' */'
26-
] } ],
26+
]
27+
} ],
28+
'ckeditor5-rules/require-file-extensions-in-imports': [
29+
'error',
30+
{
31+
extensions: [ '.ts', '.js', '.json' ]
32+
}
33+
],
2734
'ckeditor5-rules/prevent-license-key-leak': 'error',
2835
'vue/multi-word-component-names': 'off',
2936
'no-unused-vars': 'off',

demos/editor-cdn/App.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838

3939
<script setup lang="ts">
4040
import { ref, reactive, computed } from 'vue';
41-
import useCKEditorCloud from '../../src/useCKEditorCloud';
41+
import useCKEditorCloud from '../../src/useCKEditorCloud.js';
4242
import type { EventInfo, ClassicEditor } from 'https://cdn.ckeditor.com/typings/ckeditor5.d.ts';
4343
4444
// Load CKEditor from the CDN

tsconfig.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"compilerOptions": {
33
"target": "ES2019",
44
"useDefineForClassFields": true,
5-
"module": "NodeNext",
5+
"module": "ESNext",
66
"lib": [
77
"ES2019", // Must match the "target"
88
"ES2020.String",
@@ -11,7 +11,8 @@
1111
],
1212
"skipLibCheck": true,
1313

14-
"moduleResolution": "NodeNext",
14+
/* Bundler mode */
15+
"moduleResolution": "bundler",
1516
"isolatedModules": true,
1617
"moduleDetection": "force",
1718

0 commit comments

Comments
 (0)