Skip to content

Commit

Permalink
chore: cleanup (#80)
Browse files Browse the repository at this point in the history
* chore: cleanup media
* feat: added Tailwind icons plugin
* fix: eslint config
* chore: include vscode config
* chore: fix packages, vite config
* chore: update gitignore
* chore: bump version
  • Loading branch information
Uninen authored Nov 16, 2024
1 parent 3bf2680 commit b848bee
Show file tree
Hide file tree
Showing 21 changed files with 1,688 additions and 461 deletions.
67 changes: 67 additions & 0 deletions .eslintrc-auto-import.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
{
"globals": {
"Component": true,
"ComponentPublicInstance": true,
"ComputedRef": true,
"EffectScope": true,
"InjectionKey": true,
"PropType": true,
"Ref": true,
"VNode": true,
"computed": true,
"createApp": true,
"customRef": true,
"defineAsyncComponent": true,
"defineComponent": true,
"effectScope": true,
"getCurrentInstance": true,
"getCurrentScope": true,
"h": true,
"inject": true,
"isProxy": true,
"isReactive": true,
"isReadonly": true,
"isRef": true,
"markRaw": true,
"nextTick": true,
"onActivated": true,
"onBeforeMount": true,
"onBeforeUnmount": true,
"onBeforeUpdate": true,
"onDeactivated": true,
"onErrorCaptured": true,
"onMounted": true,
"onRenderTracked": true,
"onRenderTriggered": true,
"onScopeDispose": true,
"onServerPrefetch": true,
"onUnmounted": true,
"onUpdated": true,
"provide": true,
"reactive": true,
"readonly": true,
"ref": true,
"resolveComponent": true,
"shallowReactive": true,
"shallowReadonly": true,
"shallowRef": true,
"toRaw": true,
"toRef": true,
"toRefs": true,
"triggerRef": true,
"unref": true,
"useAttrs": true,
"useCssModule": true,
"useCssVars": true,
"useSlots": true,
"watch": true,
"watchEffect": true,
"watchPostEffect": true,
"watchSyncEffect": true,
"toValue": true,
"ExtractDefaultPropTypes": true,
"ExtractPropTypes": true,
"ExtractPublicPropTypes": true,
"WritableComputedRef": true
}
}
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ dist-ssr
*.local

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
Expand Down
21 changes: 21 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "lldb",
"request": "launch",
"name": "Debug Tauri",
"program": "cargo",
"args": [
"run",
"--manifest-path=./src-tauri/Cargo.toml",
"--no-default-features"
],
"cwd": "${workspaceFolder}",
"preLaunchTask": "ui:dev"
}
]
}
7 changes: 7 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"explorer.fileNesting.enabled": true,
"explorer.fileNesting.patterns": {
"env.d.ts": "auto-imports.d.ts, components.d.ts, interface-extensions.d.ts",
"tsconfig.json": "tsconfig.*.json"
}
}
20 changes: 20 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "ui:dev",
"type": "shell",
// `dev` keeps running in the background
// ideally you should also configure a `problemMatcher`
// see https://code.visualstudio.com/docs/editor/tasks#_can-a-background-task-be-used-as-a-prelaunchtask-in-launchjson
"isBackground": true,
// Why do I get "command not found" when running a task?
// see https://code.visualstudio.com/docs/editor/tasks#_why-do-i-get-command-not-found-when-running-a-task
// or https://stackoverflow.com/a/70243581
"command": "pnpm",
"args": ["vite:dev"]
}
]
}
7 changes: 7 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Changelog

## 2.0.2 (2024-11-16)

- Feat: added `@egoist/tailwindcss-icons` plugin.
- Enhancement: added optimization settings to Tauri config.
- Chore: clean up v1->v2 leftovers.
- Fix: Vite, Eslint configs..

## 2.0.0 (2024-11-07)

- Feat: upgraded the template to Tauri v2.
Expand Down
3 changes: 2 additions & 1 deletion auto-imports.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ declare global {
export type { Component, ComponentPublicInstance, ComputedRef, DirectiveBinding, ExtractDefaultPropTypes, ExtractPropTypes, ExtractPublicPropTypes, InjectionKey, PropType, Ref, MaybeRef, MaybeRefOrGetter, VNode, WritableComputedRef } from 'vue'
import('vue')
}

// for vue template auto import
import { UnwrapRef } from 'vue'
declare module 'vue' {
Expand Down Expand Up @@ -167,4 +168,4 @@ declare module 'vue' {
readonly watchPostEffect: UnwrapRef<typeof import('vue')['watchPostEffect']>
readonly watchSyncEffect: UnwrapRef<typeof import('vue')['watchSyncEffect']>
}
}
}
27 changes: 19 additions & 8 deletions eslint.config.cjs
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import pluginVitest from '@vitest/eslint-plugin'
import skipFormatting from '@vue/eslint-config-prettier/skip-formatting'
import vueTsEslintConfig from '@vue/eslint-config-typescript'
import security from 'eslint-plugin-security'
import pluginVue from 'eslint-plugin-vue'
const pluginVitest = require('@vitest/eslint-plugin')
const skipFormatting = require('@vue/eslint-config-prettier/skip-formatting')
const vueTsEslintConfig = require('@vue/eslint-config-typescript')
const security = require('eslint-plugin-security')
const pluginVue = require('eslint-plugin-vue')

/** @type {import('eslint').Linter.Config[]} */
export default [
module.exports = [
{
name: 'app/files-to-lint',
files: ['**/*.{ts,mts,tsx,vue}'],
Expand All @@ -23,8 +23,19 @@ export default [
'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
'comma-dangle': ['error', 'only-multiline'],
'id-length': [2, { exceptions: ['i', 'j', '_'] }],
'@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '_' }],
'id-length': [2, { exceptions: ['i', 'j', 'e', 'z', '_'] }],
'@typescript-eslint/no-unused-vars': [
'error',
{
args: 'all',
argsIgnorePattern: '^_',
caughtErrors: 'all',
caughtErrorsIgnorePattern: '^_',
destructuredArrayIgnorePattern: '^_',
varsIgnorePattern: '^_',
ignoreRestSiblings: true,
},
],
},
},

Expand Down
27 changes: 16 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "tauri-app",
"private": true,
"version": "2.0.1",
"version": "2.0.2",
"type": "module",
"scripts": {
"dev": "concurrently --kill-others \"pnpm vite:dev\" \"pnpm devtools\"",
Expand All @@ -18,11 +18,14 @@
"dependencies": {
"@tauri-apps/api": "2.1.1",
"@tauri-apps/plugin-shell": "2.0.1",
"@vue/devtools": "^7.6.3",
"@vue/devtools": "7.6.4",
"pinia": "2.2.6",
"vue": "3.5.12"
"vue": "3.5.13"
},
"devDependencies": {
"@egoist/tailwindcss-icons": "1.8.1",
"@iconify/json": "2.2.273",
"@iconify/types": "2.0.0",
"@pinia/testing": "0.1.7",
"@tauri-apps/cli": "2.1.0",
"@tsconfig/node22": "22.0.0",
Expand All @@ -34,22 +37,24 @@
"@vue/test-utils": "2.4.6",
"@vue/tsconfig": "0.6.0",
"autoprefixer": "10.4.20",
"concurrently": "^9.1.0",
"concurrently": "9.1.0",
"cross-env": "7.0.3",
"eslint": "9.14.0",
"eslint": "9.15.0",
"eslint-plugin-security": "3.0.1",
"eslint-plugin-vue": "9.31.0",
"lodash-es": "4.17.21",
"postcss": "8.4.47",
"postcss": "8.4.49",
"postcss-nesting": "13.0.1",
"prettier": "3.3.3",
"tailwindcss": "3.4.14",
"tailwindcss": "3.4.15",
"typescript": "5.6.3",
"unplugin-auto-import": "0.18.3",
"unplugin-auto-import": "0.18.4",
"unplugin-vue-components": "0.27.4",
"vite": "5.4.10",
"vite-plugin-vue-devtools": "7.6.3",
"vitest": "2.1.4",
"vite": "5.4.11",
"vite-plugin-node-polyfills": "0.22.0",
"vite-plugin-top-level-await": "1.4.4",
"vite-plugin-vue-devtools": "7.6.4",
"vitest": "2.1.5",
"vue-tsc": "2.1.10"
}
}
Loading

0 comments on commit b848bee

Please sign in to comment.