Skip to content

Commit

Permalink
configure webpack and babel for typescript
Browse files Browse the repository at this point in the history
  • Loading branch information
jabberwoc committed May 10, 2024
1 parent e1368d7 commit 57ed7c5
Show file tree
Hide file tree
Showing 11 changed files with 344 additions and 355 deletions.
9 changes: 0 additions & 9 deletions .babelrc

This file was deleted.

5 changes: 3 additions & 2 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@
// SPDX-License-Identifier: AGPL-3.0-or-later
module.exports = {
extends: [
'@nextcloud',
'@nextcloud/eslint-config/typescript',
],
rules: {
'n/no-missing-import': 'off',
'no-unused-vars': 'off',
'@typescript-eslint/no-unused-vars': ['error'],
},
}
9 changes: 9 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,13 @@
// SPDX-License-Identifier: AGPL-3.0-or-later
const babelConfig = require('@nextcloud/babel-config')

babelConfig.presets = [...babelConfig.presets, '@babel/typescript']
babelConfig.plugins = [
...babelConfig.plugins,
'@babel/transform-typescript',
'@babel/proposal-class-properties',
'@babel/transform-async-to-generator',
'@babel/plugin-transform-object-rest-spread',
]

module.exports = babelConfig
Loading

0 comments on commit 57ed7c5

Please sign in to comment.