add css linter

This commit is contained in:
2026-07-20 22:47:37 +07:00
parent 301cfcd61b
commit c314e4f329
11 changed files with 1556 additions and 41 deletions
+1497
View File
File diff suppressed because it is too large Load Diff
+4
View File
@@ -10,6 +10,7 @@
"build-only": "vite build", "build-only": "vite build",
"type-check": "vue-tsc --build", "type-check": "vue-tsc --build",
"lint": "eslint . --fix", "lint": "eslint . --fix",
"lint:css": "stylelint \"src/**/*.{css,scss,vue}\" --fix",
"format": "prettier --write src/", "format": "prettier --write src/",
"proto:gen": "protoc --typescript-http_out=src/api/generated --proto_path=proto proto/main.proto" "proto:gen": "protoc --typescript-http_out=src/api/generated --proto_path=proto proto/main.proto"
}, },
@@ -42,7 +43,10 @@
"jiti": "^2.7.0", "jiti": "^2.7.0",
"naive-ui": "^2.44.1", "naive-ui": "^2.44.1",
"npm-run-all2": "^9.0.2", "npm-run-all2": "^9.0.2",
"postcss-html": "^1.8.1",
"prettier": "3.9.4", "prettier": "3.9.4",
"stylelint": "^17.14.1",
"stylelint-config-standard-scss": "^17.0.0",
"ts-proto": "^2.12.0", "ts-proto": "^2.12.0",
"typescript": "~6.0.3", "typescript": "~6.0.3",
"vfonts": "^0.0.3", "vfonts": "^0.0.3",
+9 -18
View File
@@ -1,24 +1,20 @@
/* color palette from <https://github.com/vuejs/theme> */ /* color palette from <https://github.com/vuejs/theme> */
:root { :root {
--vt-c-white: #ffffff; --vt-c-white: #fff;
--vt-c-white-soft: #f8f8f8; --vt-c-white-soft: #f8f8f8;
--vt-c-white-mute: #f2f2f2; --vt-c-white-mute: #f2f2f2;
--vt-c-black: #181818; --vt-c-black: #181818;
--vt-c-black-soft: #222222; --vt-c-black-soft: #222;
--vt-c-black-mute: #282828; --vt-c-black-mute: #282828;
--vt-c-indigo: #2c3e50; --vt-c-indigo: #2c3e50;
--vt-c-divider-light-1: rgb(60 60 60 / 29%);
--vt-c-divider-light-1: rgba(60, 60, 60, 0.29); --vt-c-divider-light-2: rgb(60 60 60 / 12%);
--vt-c-divider-light-2: rgba(60, 60, 60, 0.12); --vt-c-divider-dark-1: rgb(84 84 84 / 65%);
--vt-c-divider-dark-1: rgba(84, 84, 84, 0.65); --vt-c-divider-dark-2: rgb(84 84 84 / 48%);
--vt-c-divider-dark-2: rgba(84, 84, 84, 0.48);
--vt-c-text-light-1: var(--vt-c-indigo); --vt-c-text-light-1: var(--vt-c-indigo);
--vt-c-text-light-2: rgba(60, 60, 60, 0.66); --vt-c-text-light-2: rgb(60 60 60 / 66%);
--vt-c-text-dark-1: var(--vt-c-white); --vt-c-text-dark-1: var(--vt-c-white);
--vt-c-text-dark-2: rgba(235, 235, 235, 0.64); --vt-c-text-dark-2: rgb(235 235 235 / 64%);
} }
/* semantic color variables for this project */ /* semantic color variables for this project */
@@ -26,13 +22,10 @@
--color-background: var(--vt-c-white); --color-background: var(--vt-c-white);
--color-background-soft: var(--vt-c-white-soft); --color-background-soft: var(--vt-c-white-soft);
--color-background-mute: var(--vt-c-white-mute); --color-background-mute: var(--vt-c-white-mute);
--color-border: var(--vt-c-divider-light-2); --color-border: var(--vt-c-divider-light-2);
--color-border-hover: var(--vt-c-divider-light-1); --color-border-hover: var(--vt-c-divider-light-1);
--color-heading: var(--vt-c-text-light-1); --color-heading: var(--vt-c-text-light-1);
--color-text: var(--vt-c-text-light-1); --color-text: var(--vt-c-text-light-1);
--section-gap: 160px; --section-gap: 160px;
} }
@@ -41,10 +34,8 @@
--color-background: var(--vt-c-black); --color-background: var(--vt-c-black);
--color-background-soft: var(--vt-c-black-soft); --color-background-soft: var(--vt-c-black-soft);
--color-background-mute: var(--vt-c-black-mute); --color-background-mute: var(--vt-c-black-mute);
--color-border: var(--vt-c-divider-dark-2); --color-border: var(--vt-c-divider-dark-2);
--color-border-hover: var(--vt-c-divider-dark-1); --color-border-hover: var(--vt-c-divider-dark-1);
--color-heading: var(--vt-c-text-dark-1); --color-heading: var(--vt-c-text-dark-1);
--color-text: var(--vt-c-text-dark-2); --color-text: var(--vt-c-text-dark-2);
} }
@@ -80,7 +71,7 @@ body {
'Helvetica Neue', 'Helvetica Neue',
sans-serif; sans-serif;
font-size: 15px; font-size: 15px;
text-rendering: optimizeLegibility; text-rendering: optimizelegibility;
-webkit-font-smoothing: antialiased; -webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale; -moz-osx-font-smoothing: grayscale;
} }
+10 -6
View File
@@ -2,30 +2,34 @@
body { body {
overflow: hidden; overflow: hidden;
color: #eeeeee; color: #eee;
background-color: #111111; background-color: #111;
scrollbar-width: none; scrollbar-width: none;
} }
@font-face { @font-face {
font-family: font_old_typer; font-family: "font_old_typer";
src: url('@/assets/fonts/a_OldTyper.ttf'); src: url('@/assets/fonts/a_OldTyper.ttf');
} }
.center-message { .center-message {
display: flex; display: flex;
justify-content: center; justify-content: center;
/* горизонтальное центрирование */ /* горизонтальное центрирование */
align-items: center; align-items: center;
/* вертикальное центрирование */ /* вертикальное центрирование */
height: calc(100dvh - 100px); height: calc(100dvh - 100px);
text-align: center; text-align: center;
/* центрирование текста */ /* центрирование текста */
} }
.content-block { .content-block {
margin-top: 70px; margin-top: 70px;
padding: 0; padding: 0;
/* background-color: #553333; */ /* background-color: #553333; */
} }
@@ -33,15 +37,15 @@ body {
height: 80vh; height: 80vh;
} }
@media (min-width: 1024px) { @media (width >= 1024px) {
.center-block-custom { .center-block-custom {
width: 700px; width: 700px;
margin: 70px auto 0 auto; margin: 70px auto 0;
} }
.center-block-custom-big { .center-block-custom-big {
width: 1200px; width: 1200px;
margin: 70px auto 0 auto; margin: 70px auto 0;
} }
.center-middle-block-custom { .center-middle-block-custom {
+2 -2
View File
@@ -116,10 +116,10 @@ const goToLogout = () => {
left: 0; left: 0;
width: 100%; width: 100%;
height: 70px; height: 70px;
/* background-color: brown; */ /* background-color: brown; */
padding: 20px; padding: 20px;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
@@ -129,7 +129,7 @@ const goToLogout = () => {
display: inline-block; display: inline-block;
margin-left: 10px; margin-left: 10px;
cursor: pointer; cursor: pointer;
padding: 5px 5px; padding: 5px;
font-size: 1.1em; font-size: 1.1em;
} }
+2 -2
View File
@@ -117,7 +117,7 @@ async function signup() {
<style scoped> <style scoped>
.sign-card { .sign-card {
background-color: rgb(29, 29, 29); background-color: rgb(29 29 29);
} }
.form-label { .form-label {
@@ -137,7 +137,7 @@ async function signup() {
color: #63e2b7; color: #63e2b7;
} }
@media (min-width: 1024px) { @media (width >= 1024px) {
.sign-card { .sign-card {
width: 380px; width: 380px;
} }
+2 -2
View File
@@ -129,7 +129,7 @@ function onCreateKey(): Key {
margin: 20px; margin: 20px;
padding: 20px; padding: 20px;
border-radius: 10px; border-radius: 10px;
border: 1px solid #444444; border: 1px solid #444;
} }
.place-block:hover { .place-block:hover {
@@ -139,7 +139,7 @@ function onCreateKey(): Key {
.place-block-plus { .place-block-plus {
margin: 20px; margin: 20px;
border-radius: 10px; border-radius: 10px;
border: 1px solid #444444; border: 1px solid #444;
} }
.place-block-plus:hover { .place-block-plus:hover {
+5 -4
View File
@@ -258,6 +258,7 @@ async function deletePlace(place: Place) {
<style scoped> <style scoped>
.settings-block { .settings-block {
height: 40px; height: 40px;
/* background-color: brown; */ /* background-color: brown; */
} }
@@ -272,7 +273,7 @@ async function deletePlace(place: Place) {
.name-text { .name-text {
padding: 3px; padding: 3px;
border-radius: 3px; border-radius: 3px;
background-color: rgba(255, 255, 255, 0.1); background-color: rgb(255 255 255 / 10%);
} }
.settings-header { .settings-header {
@@ -285,15 +286,15 @@ async function deletePlace(place: Place) {
.places-container { .places-container {
display: flex; display: flex;
flex-direction: column; flex-flow: column nowrap;
flex-wrap: nowrap;
overflow-y: auto; overflow-y: auto;
padding: 20px 0; padding: 20px 0;
height: calc(100vh - 150px); height: calc(100vh - 150px);
/* border: 1px solid red; */ /* border: 1px solid red; */
} }
@media (min-width: 1024px) { @media (width >= 1024px) {
.places-container { .places-container {
padding: 20px 250px; padding: 20px 250px;
height: calc(100vh - 70px); height: calc(100vh - 70px);
+5 -4
View File
@@ -87,12 +87,12 @@ getScenarios()
<style scoped> <style scoped>
.scenarios-container { .scenarios-container {
display: flex; display: flex;
flex-direction: row; flex-flow: row wrap;
flex-wrap: wrap;
justify-content: center; justify-content: center;
overflow-y: auto; overflow-y: auto;
padding: 40px 0; padding: 40px 0;
height: calc(100vh - 150px); height: calc(100vh - 150px);
/* border: 1px solid red; */ /* border: 1px solid red; */
} }
@@ -100,6 +100,7 @@ getScenarios()
margin: 10px; margin: 10px;
width: 150px; width: 150px;
cursor: pointer; cursor: pointer;
/* background-color: #553333; */ /* background-color: #553333; */
} }
@@ -122,7 +123,7 @@ getScenarios()
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
background-color: #333333; background-color: #333;
} }
.scenario-image { .scenario-image {
@@ -134,7 +135,7 @@ getScenarios()
padding: 5px 0; padding: 5px 0;
} }
@media (min-width: 1024px) { @media (width >= 1024px) {
.scenarios-container { .scenarios-container {
height: calc(100vh - 70px); height: calc(100vh - 70px);
} }
+3 -3
View File
@@ -36,13 +36,13 @@ const keyColorClass = computed(() => {
<style lang="css"> <style lang="css">
.font-text { .font-text {
font-family: font_old_typer; font-family: "font_old_typer";
} }
.content-text { .content-text {
position: relative; position: relative;
top: 100px; top: 100px;
right: 0px; right: 0;
float: right; float: right;
} }
@@ -56,7 +56,7 @@ const keyColorClass = computed(() => {
color: gold; color: gold;
} }
@media (min-width: 1024px) { @media (width >= 1024px) {
.font-text { .font-text {
position: relative; position: relative;
left: -50px; left: -50px;
+17
View File
@@ -0,0 +1,17 @@
export default {
extends: [
'stylelint-config-standard-scss', // Базовые правила для SCSS и CSS
],
// Добавляем поддержку Vue файлов
overrides: [
{
files: ['**/*.vue'],
customSyntax: 'postcss-html',
},
],
rules: {
// Здесь можно переопределить правила
'order/properties-alphabetical-order': true, // Сортировка свойств
// 'selector-class-pattern': '^[a-z][a-zA-Z0-9]+$', // Названия классов в camelCase
},
};