Skip to content

Commit

Permalink
format code & add entries to prettier ignore file
Browse files Browse the repository at this point in the history
  • Loading branch information
powerpaul17 committed Oct 18, 2024
1 parent b64c904 commit 7d583b6
Show file tree
Hide file tree
Showing 14 changed files with 47 additions and 86 deletions.
28 changes: 6 additions & 22 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,41 +13,25 @@
],
"overrides": [
{
"files": [
"*.vue"
],
"files": ["*.vue"],
"rules": {
"@typescript-eslint/indent": "off"
}
}
],
"ignorePatterns": [
"src/theme/**/*.js"
],
"ignorePatterns": ["src/theme/**/*.js"],
"parser": "vue-eslint-parser",
"parserOptions": {
"parser": "@typescript-eslint/parser",
"project": "./tsconfig.json",
"ecmaVersion": "latest",
"sourceType": "module",
"extraFileExtensions": [
".vue"
]
"extraFileExtensions": [".vue"]
},
"plugins": [
"@typescript-eslint",
"vue",
"tailwindcss"
],
"plugins": ["@typescript-eslint", "vue", "tailwindcss"],
"rules": {
"max-len": [
"warn",
120
],
"one-var": [
"error",
"never"
],
"max-len": ["warn", 120],
"one-var": ["error", "never"],
"no-unused-vars": "off",
"default-case": "error",
"@typescript-eslint/explicit-function-return-type": "error",
Expand Down
5 changes: 5 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
android
electron/app
electron/build
CHANGELOG.md
LICENSE.md
4 changes: 1 addition & 3 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
{
"plugins": [
"prettier-plugin-tailwindcss"
],
"plugins": ["prettier-plugin-tailwindcss"],
"singleAttributePerLine": true,
"singleQuote": true,
"trailingComma": "none",
Expand Down
12 changes: 2 additions & 10 deletions electron/electron-builder.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,9 @@
"buildResources": "resources"
},
"artifactName": "${productName}.${ext}",
"files": [
"assets/**/*",
"build/**/*",
"capacitor.config.*",
"app/**/*"
],
"files": ["assets/**/*", "build/**/*", "capacitor.config.*", "app/**/*"],
"linux": {
"target": [
"AppImage",
"flatpak"
]
"target": ["AppImage", "flatpak"]
},
"flatpak": {
"artifactName": "${productName}-${arch}.${ext}"
Expand Down
4 changes: 2 additions & 2 deletions electron/live-runner.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const reloadWatcher = {
debouncer: null,
ready: false,
watcher: null,
restarting: false,
restarting: false
};

///*
Expand Down Expand Up @@ -45,7 +45,7 @@ function setupReloadWatcher() {
reloadWatcher.watcher = chokidar
.watch('./src/**/*', {
ignored: /[/\\]\./,
persistent: true,
persistent: true
})
.on('ready', () => {
reloadWatcher.ready = true;
Expand Down
3 changes: 1 addition & 2 deletions electron/src/rt/electron-plugins.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable @typescript-eslint/no-var-requires */

module.exports = {
}
module.exports = {};
10 changes: 2 additions & 8 deletions electron/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,14 @@
{
"compileOnSave": true,
"include": [
"./src/**/*",
"./capacitor.config.ts",
"./capacitor.config.js"
],
"include": ["./src/**/*", "./capacitor.config.ts", "./capacitor.config.js"],
"compilerOptions": {
"outDir": "./build",
"importHelpers": true,
"target": "ES2017",
"module": "CommonJS",
"moduleResolution": "node",
"esModuleInterop": true,
"typeRoots": [
"./node_modules/@types"
],
"typeRoots": ["./node_modules/@types"],
"allowJs": true,
"rootDir": ".",
"skipLibCheck": true
Expand Down
32 changes: 14 additions & 18 deletions src/components/ListTransition.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,25 +8,21 @@
</template>

<style>
.list-move,
.list-enter-active,
.list-leave-active {
transition: all 0.35s ease;
}
.list-move,
.list-enter-active,
.list-leave-active {
transition: all 0.35s ease;
}
.list-enter-from,
.list-leave-to {
opacity: 0;
transform: translateX(30px);
}
.list-leave-active {
position: absolute;
}
.list-enter-from,
.list-leave-to {
opacity: 0;
transform: translateX(30px);
}
.list-leave-active {
position: absolute;
}
</style>

<script setup lang="ts">
</script>
<script setup lang="ts"></script>
5 changes: 4 additions & 1 deletion src/index.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
<html>
<head>
<meta name="viewport" content="initial-scale=1.0">
<meta
name="viewport"
content="initial-scale=1.0"
/>
</head>
<body class="overflow-hidden">
<div id="app"></div>
Expand Down
4 changes: 1 addition & 3 deletions src/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
}

@layer base {

:root {
--primary-50: 236 254 255;
--primary-100: 207 250 254;
Expand Down Expand Up @@ -38,14 +37,13 @@
--surface-950: 8 8 8;
}

:root[data-theme="dark"] {
:root[data-theme='dark'] {
color-scheme: dark !important;
}

dialog {
color: inherit;
}

}

#app {
Expand Down
2 changes: 1 addition & 1 deletion src/stores/todoStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ export const ZodTodoSchema = ZodEntitySchema.extend({
description: z.string(),

done: z.boolean(),
doneAt: z.number().nullable(),
doneAt: z.number().nullable()
});

export type Todo = z.infer<typeof ZodTodoSchema>;
9 changes: 3 additions & 6 deletions tailwind.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@ const colors = require('tailwindcss/colors');

/** @type {import('tailwindcss').Config} */
export default {
content: [
"./src/index.html",
"./src/**/*.{ts,vue,js}",
],
content: ['./src/index.html', './src/**/*.{ts,vue,js}'],
theme: {
extend: {
colors: {
Expand All @@ -32,10 +29,10 @@ export default {
'surface-700': 'rgb(var(--surface-700))',
'surface-800': 'rgb(var(--surface-800))',
'surface-900': 'rgb(var(--surface-900))',
'surface-950': 'rgb(var(--surface-950))',
'surface-950': 'rgb(var(--surface-950))'
}
}
},
darkMode: ['class', '[data-theme="dark"]'],
plugins: []
}
};
5 changes: 1 addition & 4 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,7 @@
"compilerOptions": {
"types": [],
"noEmit": true,
"lib": [
"esnext",
"dom"
],
"lib": ["esnext", "dom"],
"module": "esnext",
"target": "esnext",
"moduleResolution": "bundler",
Expand Down
10 changes: 4 additions & 6 deletions vitest.config.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
import {defineConfig} from 'vitest/config';
import vue from '@vitejs/plugin-vue'
import { defineConfig } from 'vitest/config';
import vue from '@vitejs/plugin-vue';

export default defineConfig({
plugins: [
vue()
],
plugins: [vue()],
test: {
globals: true,
environment: 'happy-dom'
}
})
});

0 comments on commit 7d583b6

Please sign in to comment.