Skip to content

Commit c694925

Browse files
committed
Linting works. UnoCSS works.
1 parent 678b73a commit c694925

File tree

10 files changed

+498
-9
lines changed

10 files changed

+498
-9
lines changed

eslint.config.ts

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,5 +47,24 @@ export default antfu({
4747
'vue/custom-event-name-casing': ['error', 'kebab-case'],
4848
'node/prefer-global/process': ['warn'],
4949
'no-console': ['warn'],
50+
51+
'perfectionist/sort-imports': [
52+
'error',
53+
{
54+
type: 'line-length',
55+
order: 'desc',
56+
groups: [
57+
'side-effect', // CSS imports first
58+
'builtin',
59+
'external',
60+
'internal-type',
61+
'internal',
62+
['parent-type', 'sibling-type', 'index-type'],
63+
['parent', 'sibling', 'index'],
64+
'object',
65+
'unknown',
66+
],
67+
},
68+
],
5069
},
5170
});

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
"dependencies": {
2525
"@vue/repl": "^4.6.3",
2626
"@vueuse/core": "^13.6.0",
27+
"unocss": "^66.4.2",
2728
"vue": "^3.5.18"
2829
},
2930
"devDependencies": {

pnpm-lock.yaml

Lines changed: 441 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/lessonFile.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
</script>
44

55
<template>
6-
<h1>hello world </h1>
6+
<h1>Hola Mundo! </h1>
77
</template>

server.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import fs from 'node:fs';
1+
import { fileURLToPath } from 'node:url';
22
import http from 'node:http';
33
import path from 'node:path';
4-
import { fileURLToPath } from 'node:url';
4+
import fs from 'node:fs';
55

66
const __filename = fileURLToPath(import.meta.url);
77
const __dirname = path.dirname(__filename);

src/App.vue

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
import { onMounted, ref } from 'vue'
22
<script setup lang="ts">
3-
import { Repl, useStore } from '@vue/repl';
3+
import '@vue/repl/style.css';
4+
45
import Monaco from '@vue/repl/monaco-editor';
6+
import { Repl, useStore } from '@vue/repl';
57
import { useStorage } from '@vueuse/core';
6-
78
import { onMounted, ref } from 'vue';
9+
810
import ReplHeader from './ReplHeader.vue';
9-
import '@vue/repl/style.css';
1011
1112
const preferDark = useStorage('vue-sfc-playground-prefer-dark', true);
1213
@@ -52,7 +53,7 @@ onMounted(async () => {
5253
</script>
5354

5455
<template>
55-
<div class="repl-container">
56+
<div class="repl-container font-sans text-primary">
5657
<div
5758
v-if="errormessage"
5859
class="error"

src/ReplHeader.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<script setup lang="ts">
22
import { onMounted } from 'vue';
3+
34
import Moon from '@/icons/MoonIcon.vue';
45
import Sun from '@/icons/SunIcon.vue';
56
@@ -26,7 +27,7 @@ onMounted(() => {
2627
<h1>
2728
<!-- TODO: maybe a logo would be cool -->
2829
<!-- <img alt="logo" src="/logo.svg" /> -->
29-
<span>Vue live playground</span>
30+
<span>yehyecoa-vue</span>
3031
</h1>
3132
<div class="links">
3233
<button

src/main.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1+
import 'virtual:uno.css';
2+
13
import { createApp } from 'vue';
4+
25
import App from './App.vue';
36

47
createApp(App).mount('#app');

uno.config.ts

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import { defineConfig, presetAttributify, presetTagify, presetTypography, presetWebFonts, presetWind4 } from 'unocss';
2+
3+
export default defineConfig({
4+
presets: [
5+
presetAttributify({
6+
prefix: 'uno-',
7+
}),
8+
presetWind4(),
9+
presetTypography(),
10+
presetWebFonts(),
11+
presetTagify(),
12+
],
13+
theme: {
14+
fontFamily: {
15+
sans: 'Roboto, sans-serif',
16+
},
17+
colors: {
18+
19+
},
20+
},
21+
});

vite.config.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
11
import { fileURLToPath, URL } from 'node:url';
22

3+
import vueDevTools from 'vite-plugin-vue-devtools';
34
import vue from '@vitejs/plugin-vue';
45
import { defineConfig } from 'vite';
5-
import vueDevTools from 'vite-plugin-vue-devtools';
6+
import UnoCSS from 'unocss/vite';
67

78
// https://vite.dev/config/
89
export default defineConfig({
910
plugins: [
1011
vue(),
1112
vueDevTools(),
13+
UnoCSS(),
1214
],
1315
resolve: {
1416
alias: {

0 commit comments

Comments
 (0)