Skip to content

Commit 736a90d

Browse files
committed
feat: ts template support js
1 parent 2f3b94d commit 736a90d

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

template/eslint/eslint.config.js.ejs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ const config = [
2626
languageOptions: {
2727
globals: {
2828
...globals.node,
29+
wx: 'readonly',
30+
getApp: 'readonly',
31+
getCurrentPages: 'readonly',
2932
},
3033
},
3134
<%_ if (needsPrettier) { _%>

template/typescript/build.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ async function processStyle(filePath) {
264264
}
265265

266266
const cb = async (filePath) => {
267-
if (filePath.endsWith('.ts')) {
267+
if (filePath.endsWith('.ts') || filePath.endsWith('.js')) {
268268
await processScript(filePath);
269269
return;
270270
}

0 commit comments

Comments
 (0)