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",
"yaml",
"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 withNuxt from "./.nuxt/eslint.config.mjs";
import eslintConfig from "@antfu/eslint-config";
import nuxtConfig from "./.nuxt/eslint.config.mjs";
export default withNuxt(
eslintConfig(
export default eslintConfig(
// General
{
typescript: true,
@@ -39,6 +38,7 @@ export default withNuxt(
rules: {
"style/indent": "off"
}
}
)
)
},
nuxtConfig()
);

View File

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

View File

@@ -2,20 +2,25 @@
name = "nuxtor"
version = "1.0.0"
description = "Starter template for Nuxt 3 with Tauri"
authors = ["NicolaSpadari"]
authors = [ "NicolaSpadari" ]
license = "MIT"
repository = "https://github.com/NicolaSpadari/nuxtor"
edition = "2021"
[lib]
name = "nuxtor_lib"
crate-type = ["staticlib", "cdylib", "rlib", "lib"]
crate-type = [
"staticlib",
"cdylib",
"rlib",
"lib"
]
[build-dependencies]
tauri-build = { version = "2.0.0-beta", features = [] }
[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"
serde = { version = "1", features = ["derive"] }
serde = { version = "1", features = [ "derive" ] }
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>
<style lang="scss">
html {
html {
-webkit-tap-highlight-color: transparent;
scroll-behavior: smooth;
@apply min-h-screen;

View File

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