mirror of
https://github.com/chenasraf/cospend-nc.git
synced 2026-05-17 17:38:10 +00:00
add eslint and stylelint on vite build
Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
This commit is contained in:
83
package-lock.json
generated
83
package-lock.json
generated
@@ -41,7 +41,9 @@
|
||||
"@nextcloud/vite-config": "^1.4.2",
|
||||
"eslint-webpack-plugin": "^4.0.0",
|
||||
"stylelint": "^16.5.0",
|
||||
"stylelint-webpack-plugin": "^5.0.0"
|
||||
"stylelint-webpack-plugin": "^5.0.0",
|
||||
"vite-plugin-eslint": "^1.8.1",
|
||||
"vite-plugin-stylelint": "^5.3.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^16.0.0",
|
||||
@@ -16194,6 +16196,52 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/vite-plugin-eslint": {
|
||||
"version": "1.8.1",
|
||||
"resolved": "https://registry.npmjs.org/vite-plugin-eslint/-/vite-plugin-eslint-1.8.1.tgz",
|
||||
"integrity": "sha512-PqdMf3Y2fLO9FsNPmMX+//2BF5SF8nEWspZdgl4kSt7UvHDRHVVfHvxsD7ULYzZrJDGRxR81Nq7TOFgwMnUang==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@rollup/pluginutils": "^4.2.1",
|
||||
"@types/eslint": "^8.4.5",
|
||||
"rollup": "^2.77.2"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"eslint": ">=7",
|
||||
"vite": ">=2"
|
||||
}
|
||||
},
|
||||
"node_modules/vite-plugin-eslint/node_modules/@rollup/pluginutils": {
|
||||
"version": "4.2.1",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-4.2.1.tgz",
|
||||
"integrity": "sha512-iKnFXr7NkdZAIHiIWE+BX5ULi/ucVFYWD6TbAV+rZctiRTY2PL6tsIKhoIOaoskiWAkgu+VsbXgUVDNLHf+InQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"estree-walker": "^2.0.1",
|
||||
"picomatch": "^2.2.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 8.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/vite-plugin-eslint/node_modules/rollup": {
|
||||
"version": "2.79.1",
|
||||
"resolved": "https://registry.npmjs.org/rollup/-/rollup-2.79.1.tgz",
|
||||
"integrity": "sha512-uKxbd0IhMZOhjAiD5oAFp7BqvkA4Dv47qpOCtaNvng4HBwdbWtdOh8f5nZNuk2rp51PMGk3bzfWu5oayNEuYnw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"bin": {
|
||||
"rollup": "dist/bin/rollup"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=10.0.0"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"fsevents": "~2.3.2"
|
||||
}
|
||||
},
|
||||
"node_modules/vite-plugin-node-polyfills": {
|
||||
"version": "0.22.0",
|
||||
"resolved": "https://registry.npmjs.org/vite-plugin-node-polyfills/-/vite-plugin-node-polyfills-0.22.0.tgz",
|
||||
@@ -16211,6 +16259,39 @@
|
||||
"vite": "^2.0.0 || ^3.0.0 || ^4.0.0 || ^5.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/vite-plugin-stylelint": {
|
||||
"version": "5.3.1",
|
||||
"resolved": "https://registry.npmjs.org/vite-plugin-stylelint/-/vite-plugin-stylelint-5.3.1.tgz",
|
||||
"integrity": "sha512-M/hSdfOwnOVghbJDeuuYIU2xO/MMukYR8QcEyNKFPG8ro1L+DlTdViix2B2d/FvAw14WPX88ckA5A7NvUjJz8w==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@rollup/pluginutils": "^5.1.0",
|
||||
"chokidar": "^3.5.3",
|
||||
"debug": "^4.3.4"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=14.18"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@types/stylelint": "^13.0.0",
|
||||
"postcss": "^7.0.0 || ^8.0.0",
|
||||
"rollup": "^2.0.0 || ^3.0.0 || ^4.0.0",
|
||||
"stylelint": "^13.0.0 || ^14.0.0 || ^15.0.0 || ^16.0.0",
|
||||
"vite": "^2.0.0 || ^3.0.0 || ^4.0.0 || ^5.0.0"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"@types/stylelint": {
|
||||
"optional": true
|
||||
},
|
||||
"postcss": {
|
||||
"optional": true
|
||||
},
|
||||
"rollup": {
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/vite/node_modules/@esbuild/aix-ppc64": {
|
||||
"version": "0.21.5",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.21.5.tgz",
|
||||
|
||||
@@ -70,6 +70,8 @@
|
||||
"@nextcloud/vite-config": "^1.4.2",
|
||||
"eslint-webpack-plugin": "^4.0.0",
|
||||
"stylelint": "^16.5.0",
|
||||
"stylelint-webpack-plugin": "^5.0.0"
|
||||
"stylelint-webpack-plugin": "^5.0.0",
|
||||
"vite-plugin-eslint": "^1.8.1",
|
||||
"vite-plugin-stylelint": "^5.3.1"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,11 +9,11 @@
|
||||
* @copyright Julien Veyssier 2020
|
||||
*/
|
||||
|
||||
import { linkTo } from '@nextcloud/router'
|
||||
import { getRequestToken } from '@nextcloud/auth'
|
||||
// import { linkTo } from '@nextcloud/router'
|
||||
// import { getRequestToken } from '@nextcloud/auth'
|
||||
|
||||
//__webpack_nonce__ = btoa(getRequestToken()) // eslint-disable-line
|
||||
//__webpack_public_path__ = linkTo('cospend', 'js/') // eslint-disable-line
|
||||
// __webpack_nonce__ = btoa(getRequestToken()) // eslint-disable-line
|
||||
// __webpack_public_path__ = linkTo('cospend', 'js/') // eslint-disable-line
|
||||
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
OCA.Dashboard.register('cospend_activity', async (el, { widget }) => {
|
||||
|
||||
@@ -14,8 +14,8 @@ import './bootstrap.js'
|
||||
import App from './App.vue'
|
||||
import { showError } from '@nextcloud/dialogs'
|
||||
import '@nextcloud/dialogs/style.css'
|
||||
import { getRequestToken } from '@nextcloud/auth'
|
||||
import { generateFilePath } from '@nextcloud/router'
|
||||
// import { getRequestToken } from '@nextcloud/auth'
|
||||
// import { generateFilePath } from '@nextcloud/router'
|
||||
import { loadState } from '@nextcloud/initial-state'
|
||||
import Tooltip from '@nextcloud/vue/dist/Directives/Tooltip.js'
|
||||
import vueAwesomeCountdown from 'vue-awesome-countdown'
|
||||
@@ -31,8 +31,8 @@ Vue.use(VueClipboard)
|
||||
Vue.use(SmartTable)
|
||||
Vue.directive('tooltip', Tooltip)
|
||||
|
||||
//__webpack_nonce__ = btoa(getRequestToken()) // eslint-disable-line
|
||||
//__webpack_public_path__ = generateFilePath('cospend', '', 'js/') // eslint-disable-line
|
||||
// __webpack_nonce__ = btoa(getRequestToken()) // eslint-disable-line
|
||||
// __webpack_public_path__ = generateFilePath('cospend', '', 'js/') // eslint-disable-line
|
||||
|
||||
function restoreOptions() {
|
||||
network.getOptionValues().then((response) => {
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
import { createAppConfig } from '@nextcloud/vite-config'
|
||||
import eslint from 'vite-plugin-eslint'
|
||||
import stylelint from 'vite-plugin-stylelint'
|
||||
|
||||
export default createAppConfig({
|
||||
main: 'src/main.js',
|
||||
@@ -16,6 +18,7 @@ export default createAppConfig({
|
||||
localsConvention: 'camelCase',
|
||||
},
|
||||
},
|
||||
plugins: [eslint(), stylelint()],
|
||||
},
|
||||
inlineCSS: { relativeCSSInjection: true },
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user