mirror of
https://github.com/nextcloud/spreed.git
synced 2025-07-22 06:48:21 +00:00
chore(eslint): lint config files
Signed-off-by: Grigorii K. Shartsev <me@shgk.me>
This commit is contained in:
@ -3,11 +3,10 @@
|
|||||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
const nextcloudWebpackRules = require('@nextcloud/webpack-vue-config/rules')
|
||||||
const BabelLoaderExcludeNodeModulesExcept = require('babel-loader-exclude-node-modules-except')
|
const BabelLoaderExcludeNodeModulesExcept = require('babel-loader-exclude-node-modules-except')
|
||||||
const { mergeWithRules } = require('webpack-merge')
|
const { mergeWithRules } = require('webpack-merge')
|
||||||
|
|
||||||
const nextcloudWebpackRules = require('@nextcloud/webpack-vue-config/rules')
|
|
||||||
|
|
||||||
// Replace rules with the same modules
|
// Replace rules with the same modules
|
||||||
module.exports = mergeWithRules({
|
module.exports = mergeWithRules({
|
||||||
module: {
|
module: {
|
||||||
@ -18,62 +17,64 @@ module.exports = mergeWithRules({
|
|||||||
use: 'replace',
|
use: 'replace',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
})({
|
})(
|
||||||
module: {
|
{
|
||||||
|
module: {
|
||||||
// Reuse @nextcloud/webpack-vue-config/rules
|
// Reuse @nextcloud/webpack-vue-config/rules
|
||||||
rules: Object.values(nextcloudWebpackRules),
|
rules: Object.values(nextcloudWebpackRules),
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
{
|
||||||
{
|
module: {
|
||||||
module: {
|
rules: [
|
||||||
rules: [
|
{
|
||||||
{
|
test: /\.js$/,
|
||||||
test: /\.js$/,
|
|
||||||
loader: 'esbuild-loader',
|
|
||||||
options: {
|
|
||||||
// Implicitly set as JS loader for only JS parts of Vue SFCs will be transpiled
|
|
||||||
loader: 'js',
|
|
||||||
target: 'es2020',
|
|
||||||
},
|
|
||||||
exclude: BabelLoaderExcludeNodeModulesExcept([
|
|
||||||
'@nextcloud/event-bus',
|
|
||||||
'ansi-regex',
|
|
||||||
'fast-xml-parser',
|
|
||||||
'hot-patcher',
|
|
||||||
'nextcloud-vue-collections',
|
|
||||||
'semver',
|
|
||||||
'strip-ansi',
|
|
||||||
'tributejs',
|
|
||||||
'webdav',
|
|
||||||
]),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
test: /\.tsx?$/,
|
|
||||||
use: [{
|
|
||||||
loader: 'esbuild-loader',
|
loader: 'esbuild-loader',
|
||||||
options: {
|
options: {
|
||||||
// Implicitly set as TS loader so only <script lang="ts"> Vue SFCs will be transpiled
|
// Implicitly set as JS loader for only JS parts of Vue SFCs will be transpiled
|
||||||
loader: 'ts',
|
loader: 'js',
|
||||||
target: 'es2020',
|
target: 'es2020',
|
||||||
},
|
},
|
||||||
}]
|
exclude: BabelLoaderExcludeNodeModulesExcept([
|
||||||
},
|
'@nextcloud/event-bus',
|
||||||
{
|
'ansi-regex',
|
||||||
test: /\.wasm$/i,
|
'fast-xml-parser',
|
||||||
type: 'asset/resource',
|
'hot-patcher',
|
||||||
},
|
'nextcloud-vue-collections',
|
||||||
{
|
'semver',
|
||||||
test: /\.tflite$/i,
|
'strip-ansi',
|
||||||
type: 'asset/resource',
|
'tributejs',
|
||||||
},
|
'webdav',
|
||||||
{
|
]),
|
||||||
test: /\.worker\.js$/,
|
},
|
||||||
use: { loader: 'worker-loader' },
|
{
|
||||||
},
|
test: /\.tsx?$/,
|
||||||
{
|
use: [{
|
||||||
resourceQuery: /raw/,
|
loader: 'esbuild-loader',
|
||||||
type: 'asset/source',
|
options: {
|
||||||
}
|
// Implicitly set as TS loader so only <script lang="ts"> Vue SFCs will be transpiled
|
||||||
],
|
loader: 'ts',
|
||||||
|
target: 'es2020',
|
||||||
|
},
|
||||||
|
}],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
test: /\.wasm$/i,
|
||||||
|
type: 'asset/resource',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
test: /\.tflite$/i,
|
||||||
|
type: 'asset/resource',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
test: /\.worker\.js$/,
|
||||||
|
use: { loader: 'worker-loader' },
|
||||||
|
},
|
||||||
|
{
|
||||||
|
resourceQuery: /raw/,
|
||||||
|
type: 'asset/source',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
},
|
},
|
||||||
})
|
)
|
||||||
|
@ -1,15 +1,12 @@
|
|||||||
|
const nextcloudWebpackConfig = require('@nextcloud/webpack-vue-config')
|
||||||
|
const { EsbuildPlugin } = require('esbuild-loader')
|
||||||
/**
|
/**
|
||||||
* SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors
|
* SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors
|
||||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
*/
|
*/
|
||||||
const path = require('node:path')
|
const path = require('node:path')
|
||||||
|
|
||||||
const { EsbuildPlugin } = require('esbuild-loader')
|
|
||||||
const webpack = require('webpack')
|
const webpack = require('webpack')
|
||||||
const { mergeWithRules } = require('webpack-merge')
|
const { mergeWithRules } = require('webpack-merge')
|
||||||
|
|
||||||
const nextcloudWebpackConfig = require('@nextcloud/webpack-vue-config')
|
|
||||||
|
|
||||||
const commonWebpackConfig = require('./webpack.common.config.js')
|
const commonWebpackConfig = require('./webpack.common.config.js')
|
||||||
|
|
||||||
module.exports = mergeWithRules({
|
module.exports = mergeWithRules({
|
||||||
|
Reference in New Issue
Block a user