fix: Fix Typescript config and add babel preset to support transpiling Typescript
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
This commit is contained in:
Родитель
3c8e03f1ee
Коммит
40ce0d2097
|
@ -1,3 +1,5 @@
|
|||
const babelConfig = require('@nextcloud/babel-config')
|
||||
|
||||
babelConfig.presets.push('@babel/preset-typescript')
|
||||
|
||||
module.exports = babelConfig
|
||||
|
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -88,16 +88,17 @@
|
|||
"npm": "^9.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/preset-typescript": "^7.22.5",
|
||||
"@cypress/vue2": "^2.0.1",
|
||||
"@fontsource/roboto": "^5.0.0",
|
||||
"@mdi/svg": "^7.0.96",
|
||||
"@nextcloud/babel-config": "^1.0.0",
|
||||
"@nextcloud/browserslist-config": "^2.3.0",
|
||||
"@nextcloud/eslint-config": "^8.2.1",
|
||||
"@nextcloud/eslint-config": "^8.3.0-beta.0",
|
||||
"@nextcloud/stylelint-config": "^2.3.0",
|
||||
"@nextcloud/webpack-vue-config": "github:nextcloud/webpack-vue-config#master",
|
||||
"@vue/test-utils": "^1.3.0",
|
||||
"@vue/tsconfig": "^0.1.3",
|
||||
"@vue/tsconfig": "^0.4.0",
|
||||
"@vue/vue2-jest": "^29.0.0",
|
||||
"babel-jest": "^29.0.1",
|
||||
"babel-loader-exclude-node-modules-except": "^1.2.1",
|
||||
|
@ -114,6 +115,7 @@
|
|||
"jest-transform-stub": "^2.0.0",
|
||||
"resolve-url-loader": "^5.0.0",
|
||||
"sanitize-filename": "^1.6.3",
|
||||
"typescript": "^5.0.4",
|
||||
"url-loader": "^4.1.1",
|
||||
"vue-eslint-parser": "^9.0.3",
|
||||
"vue-styleguidist": "~4.72.0",
|
||||
|
|
|
@ -27,11 +27,11 @@
|
|||
*
|
||||
* @return {boolean}
|
||||
*/
|
||||
export const isA11yActivation = (event) => {
|
||||
export const isA11yActivation = (event: Event) => {
|
||||
if (event.type === 'click') {
|
||||
return true
|
||||
}
|
||||
if (event.type === 'keydown' && event.key === 'Enter') {
|
||||
if (event.type === 'keydown' && (event as KeyboardEvent).key === 'Enter') {
|
||||
return true
|
||||
}
|
||||
return false
|
|
@ -1,3 +1,3 @@
|
|||
export * from './a11y/index.js'
|
||||
export * from './a11y/index.ts'
|
||||
export * from './emoji/index.js'
|
||||
export { default as usernameToColor } from './usernameToColor/index.js'
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"extends": "@vue/tsconfig/tsconfig.json",
|
||||
"include": ["./lib/**/*.ts"],
|
||||
"exclude": ["./lib/**/*.cy.ts"],
|
||||
"extends": "@vue/tsconfig",
|
||||
"include": ["./src/**/*.ts"],
|
||||
"exclude": ["./src/**/*.cy.ts"],
|
||||
"compilerOptions": {
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"moduleResolution": "node",
|
||||
|
|
Загрузка…
Ссылка в новой задаче