Fix eslint setup

This commit is contained in:
Nicola Spadari
2024-06-16 11:48:40 +02:00
parent 7b71c8bca9
commit 5a2ad3948b
14 changed files with 4977 additions and 4941 deletions

View File

@@ -22,10 +22,5 @@
"jsonc", "jsonc",
"yaml", "yaml",
"toml" "toml"
], ]
// Use .config directory
"eslint.options": {
"overrideConfigFile": ".config/eslint.mjs"
}
} }

View File

@@ -1,8 +1,7 @@
import { antfu as eslintConfig } from "@antfu/eslint-config"; import eslintConfig from "@antfu/eslint-config";
import withNuxt from "./.nuxt/eslint.config.mjs"; import nuxtConfig from "./.nuxt/eslint.config.mjs";
export default withNuxt( export default eslintConfig(
eslintConfig(
// General // General
{ {
typescript: true, typescript: true,
@@ -39,6 +38,7 @@ export default withNuxt(
rules: { rules: {
"style/indent": "off" "style/indent": "off"
} }
} },
)
) nuxtConfig()
);

View File

@@ -56,11 +56,13 @@ export default defineNuxtConfig({
envPrefix: ["VITE_", "TAURI_"], envPrefix: ["VITE_", "TAURI_"],
server: { server: {
strictPort: true, strictPort: true,
hmr: mobile ? { hmr: mobile
? {
protocol: "ws", protocol: "ws",
host: await internalIpV4(), host: await internalIpV4(),
port: 3001, port: 3001
} : undefined, }
: undefined,
watch: { watch: {
ignored: ["**/src-tauri/**"] ignored: ["**/src-tauri/**"]
} }
@@ -81,8 +83,9 @@ export default defineNuxtConfig({
routes: ["/"] routes: ["/"]
} }
}, },
// sourcemap: { eslint: {
// server: true, config: {
// client: false standalone: false
// } }
}
}); });

View File

@@ -2,20 +2,25 @@
name = "nuxtor" name = "nuxtor"
version = "1.0.0" version = "1.0.0"
description = "Starter template for Nuxt 3 with Tauri" description = "Starter template for Nuxt 3 with Tauri"
authors = ["NicolaSpadari"] authors = [ "NicolaSpadari" ]
license = "MIT" license = "MIT"
repository = "https://github.com/NicolaSpadari/nuxtor" repository = "https://github.com/NicolaSpadari/nuxtor"
edition = "2021" edition = "2021"
[lib] [lib]
name = "nuxtor_lib" name = "nuxtor_lib"
crate-type = ["staticlib", "cdylib", "rlib", "lib"] crate-type = [
"staticlib",
"cdylib",
"rlib",
"lib"
]
[build-dependencies] [build-dependencies]
tauri-build = { version = "2.0.0-beta", features = [] } tauri-build = { version = "2.0.0-beta", features = [] }
[dependencies] [dependencies]
tauri = { version = "2.0.0-beta", features = ["tray-icon"] } tauri = { version = "2.0.0-beta", features = [ "tray-icon" ] }
tauri-plugin-shell = "2.0.0-beta" tauri-plugin-shell = "2.0.0-beta"
serde = { version = "1", features = ["derive"] } serde = { version = "1", features = [ "derive" ] }
serde_json = "1" serde_json = "1"

File diff suppressed because one or more lines are too long

View File

@@ -1 +1,34 @@
{"main":{"identifier":"main","description":"Capabilities for the main window","local":true,"windows":["main"],"permissions":["path:default","event:default","window:default","app:default","resources:default","menu:default",{"identifier":"shell:allow-execute","allow":[{"args":["-c",{"validator":"\\S+"}],"cmd":"sh","name":"exec-sh","sidecar":false}]}]}} {
"main": {
"identifier": "main",
"description": "Capabilities for the main window",
"local": true,
"windows": [
"main"
],
"permissions": [
"path:default",
"event:default",
"window:default",
"app:default",
"resources:default",
"menu:default",
{
"identifier": "shell:allow-execute",
"allow": [
{
"args": [
"-c",
{
"validator": "\\S+"
}
],
"cmd": "sh",
"name": "exec-sh",
"sidecar": false
}
]
}
]
}
}

View File

@@ -5,7 +5,7 @@
</template> </template>
<style lang="scss"> <style lang="scss">
html { html {
-webkit-tap-highlight-color: transparent; -webkit-tap-highlight-color: transparent;
scroll-behavior: smooth; scroll-behavior: smooth;
@apply min-h-screen; @apply min-h-screen;

View File

@@ -9,8 +9,8 @@
<script lang="ts" setup> <script lang="ts" setup>
const version = await getTauriVersion(); const version = await getTauriVersion();
const result = await Command.create('exec-sh', [ const result = await Command.create("exec-sh", [
'-c', "-c",
"echo 'Hello World!'", "echo 'Hello World!'"
]).execute(); ]).execute();
</script> </script>