Fix eslint setup
This commit is contained in:
7
.vscode/settings.json
vendored
7
.vscode/settings.json
vendored
@@ -22,10 +22,5 @@
|
|||||||
"jsonc",
|
"jsonc",
|
||||||
"yaml",
|
"yaml",
|
||||||
"toml"
|
"toml"
|
||||||
],
|
]
|
||||||
|
|
||||||
// Use .config directory
|
|
||||||
"eslint.options": {
|
|
||||||
"overrideConfigFile": ".config/eslint.mjs"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@@ -23,4 +23,4 @@ $ pnpm run dev
|
|||||||
- Fix eslint
|
- Fix eslint
|
||||||
- Complete app
|
- Complete app
|
||||||
- Better readme
|
- Better readme
|
||||||
-->
|
-->
|
||||||
|
@@ -1,44 +1,44 @@
|
|||||||
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,
|
vue: true,
|
||||||
vue: true,
|
unocss: true,
|
||||||
unocss: true,
|
stylistic: {
|
||||||
stylistic: {
|
indent: "tab",
|
||||||
indent: "tab",
|
quotes: "double"
|
||||||
quotes: "double"
|
|
||||||
},
|
|
||||||
rules: {
|
|
||||||
curly: "off",
|
|
||||||
"no-console": "off",
|
|
||||||
"no-new-func": "off",
|
|
||||||
"style/semi": ["error", "always"],
|
|
||||||
"style/indent": ["error", "tab"],
|
|
||||||
"style/quote-props": ["warn", "as-needed"],
|
|
||||||
"style/comma-dangle": ["warn", "never"],
|
|
||||||
"style/brace-style": ["warn", "1tbs"],
|
|
||||||
"style/arrow-parens": ["error", "always"],
|
|
||||||
"vue/block-order": ["error", {
|
|
||||||
order: ["template", "script", "style"]
|
|
||||||
}],
|
|
||||||
"vue/script-indent": ["error", "tab", {
|
|
||||||
baseIndent: 1
|
|
||||||
}],
|
|
||||||
"antfu/top-level-function": "off",
|
|
||||||
"node/prefer-global/process": ["off"]
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
rules: {
|
||||||
// Vue
|
curly: "off",
|
||||||
{
|
"no-console": "off",
|
||||||
files: ["**/*.vue"],
|
"no-new-func": "off",
|
||||||
rules: {
|
"style/semi": ["error", "always"],
|
||||||
"style/indent": "off"
|
"style/indent": ["error", "tab"],
|
||||||
}
|
"style/quote-props": ["warn", "as-needed"],
|
||||||
|
"style/comma-dangle": ["warn", "never"],
|
||||||
|
"style/brace-style": ["warn", "1tbs"],
|
||||||
|
"style/arrow-parens": ["error", "always"],
|
||||||
|
"vue/block-order": ["error", {
|
||||||
|
order: ["template", "script", "style"]
|
||||||
|
}],
|
||||||
|
"vue/script-indent": ["error", "tab", {
|
||||||
|
baseIndent: 1
|
||||||
|
}],
|
||||||
|
"antfu/top-level-function": "off",
|
||||||
|
"node/prefer-global/process": ["off"]
|
||||||
}
|
}
|
||||||
)
|
},
|
||||||
)
|
|
||||||
|
// Vue
|
||||||
|
{
|
||||||
|
files: ["**/*.vue"],
|
||||||
|
rules: {
|
||||||
|
"style/indent": "off"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
nuxtConfig()
|
||||||
|
);
|
||||||
|
@@ -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",
|
? {
|
||||||
host: await internalIpV4(),
|
protocol: "ws",
|
||||||
port: 3001,
|
host: await internalIpV4(),
|
||||||
} : undefined,
|
port: 3001
|
||||||
|
}
|
||||||
|
: 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
|
||||||
// }
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
@@ -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"
|
||||||
|
@@ -29,4 +29,4 @@
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
File diff suppressed because one or more lines are too long
@@ -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
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,56 +1,56 @@
|
|||||||
{
|
{
|
||||||
"bundle": {
|
"bundle": {
|
||||||
"active": true,
|
"active": true,
|
||||||
"targets": "all",
|
"targets": "all",
|
||||||
"windows": {
|
"windows": {
|
||||||
"certificateThumbprint": null,
|
"certificateThumbprint": null,
|
||||||
"digestAlgorithm": "sha256",
|
"digestAlgorithm": "sha256",
|
||||||
"timestampUrl": ""
|
"timestampUrl": ""
|
||||||
},
|
},
|
||||||
"icon": [
|
"icon": [
|
||||||
"icons/32x32.png",
|
"icons/32x32.png",
|
||||||
"icons/128x128.png",
|
"icons/128x128.png",
|
||||||
"icons/128x128@2x.png",
|
"icons/128x128@2x.png",
|
||||||
"icons/icon.icns",
|
"icons/icon.icns",
|
||||||
"icons/icon.ico"
|
"icons/icon.ico"
|
||||||
],
|
],
|
||||||
"resources": [],
|
"resources": [],
|
||||||
"externalBin": [],
|
"externalBin": [],
|
||||||
"copyright": "",
|
"copyright": "",
|
||||||
"category": "DeveloperTool",
|
"category": "DeveloperTool",
|
||||||
"shortDescription": "",
|
"shortDescription": "",
|
||||||
"longDescription": "",
|
"longDescription": "",
|
||||||
"macOS": {},
|
"macOS": {},
|
||||||
"linux": {
|
"linux": {
|
||||||
"deb": {}
|
"deb": {}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"build": {
|
"build": {
|
||||||
"beforeBuildCommand": "pnpm generate",
|
"beforeBuildCommand": "pnpm generate",
|
||||||
"frontendDist": "../dist",
|
"frontendDist": "../dist",
|
||||||
"beforeDevCommand": "pnpm dev",
|
"beforeDevCommand": "pnpm dev",
|
||||||
"devUrl": "http://localhost:3000"
|
"devUrl": "http://localhost:3000"
|
||||||
},
|
},
|
||||||
"productName": "nuxtor",
|
"productName": "nuxtor",
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"identifier": "com.nicolaspadari.nuxtor",
|
"identifier": "com.nicolaspadari.nuxtor",
|
||||||
"plugins": {},
|
"plugins": {},
|
||||||
"app": {
|
"app": {
|
||||||
"windows": [
|
"windows": [
|
||||||
{
|
{
|
||||||
"title": "Nuxtor",
|
"title": "Nuxtor",
|
||||||
"width": 1920,
|
"width": 1920,
|
||||||
"height": 1080,
|
"height": 1080,
|
||||||
"resizable": true,
|
"resizable": true,
|
||||||
"fullscreen": false
|
"fullscreen": false
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"security": {
|
"security": {
|
||||||
"csp": null
|
"csp": null
|
||||||
},
|
},
|
||||||
"trayIcon": {
|
"trayIcon": {
|
||||||
"iconPath": "./icons/icon.png",
|
"iconPath": "./icons/icon.png",
|
||||||
"iconAsTemplate": true
|
"iconAsTemplate": true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -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;
|
||||||
|
@@ -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>
|
||||||
|
@@ -8,4 +8,4 @@
|
|||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
const { data } = await useFetch("https://jsonplaceholder.typicode.com/todos/1");
|
const { data } = await useFetch("https://jsonplaceholder.typicode.com/todos/1");
|
||||||
</script>
|
</script>
|
||||||
|
Reference in New Issue
Block a user