Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: configure linter & lint files #92

Merged
merged 1 commit into from
Mar 11, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# editorconfig.org
root = true

[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.md]
indent_style = space
indent_size = 4

[*.scss]
indent_style = space
indent_size = 4

[*.vue]
indent_style = space
indent_size = 4

[*.ts]
indent_style = space
indent_size = 4

[*.js]
indent_style = space
indent_size = 4

[*.md]
trim_trailing_whitespace = false
10 changes: 10 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,17 @@ import prettierPlugin from "eslint-plugin-prettier/recommended";
import typescriptConfig from "@vue/eslint-config-typescript";
import prettierConfig from "@vue/eslint-config-prettier";

import { includeIgnoreFile } from "@eslint/compat";
import path from "node:path";
import { fileURLToPath } from "node:url";

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const gitignorePath = path.resolve(__dirname, ".gitignore");

export default [
// include ignore .gitignore patterns
includeIgnoreFile(gitignorePath),
// add more generic rulesets here
...vuePlugin.configs["flat/recommended"],
// ...vueA11yPlugin.configs["flat/recommended"],
Expand Down
19 changes: 19 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
"@oruga-ui/oruga-next": "^0.9.0"
},
"devDependencies": {
"@eslint/compat": "^1.2.7",
"@oruga-ui/examples": "0.9.3",
"@oruga-ui/oruga-next": "0.9.3",
"@vitejs/plugin-vue": "5.2.1",
Expand Down
172 changes: 86 additions & 86 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,109 +3,109 @@ import components from "@/components";
</script>

<template>
<div id="app">
<aside id="nav">
<router-link to="/" class="theme-label">
<img
class="image__oruga"
src="https://oruga-ui.com/logo.png"
alt="Logo Oruga Default Theme" />
<b>Oruga Default Theme</b>
</router-link>

<hr />

<router-link
v-for="component in components"
:key="component"
:to="{ name: component }">
{{ component }}
</router-link>
</aside>

<main class="main">
<router-view />
</main>
</div>
<div id="app">
<aside id="nav">
<router-link to="/" class="theme-label">
<img
class="image__oruga"
src="https://oruga-ui.com/logo.png"
alt="Logo Oruga Default Theme" />
<b>Oruga Default Theme</b>
</router-link>

<hr />

<router-link
v-for="component in components"
:key="component"
:to="{ name: component }">
{{ component }}
</router-link>
</aside>

<main class="main">
<router-view />
</main>
</div>
</template>

<style lang="scss">
@import "./assets/scss/utils/variables";

#app {
display: flex;
width: 100%;

main {
flex-grow: 1;
width: 100%;
height: 100vh;
padding: 2rem;
padding-bottom: 6rem;
padding-left: calc(var(--vp-sidebar-width) + 2rem);

> section {
margin: 1rem 0;

h3 {
font-size: 1.75rem;
}

.buttons > *:not(:last-child) {
margin-right: 0.5rem;
margin-bottom: 0.5rem;
}
}
}

#nav {
position: fixed;
left: 0;
display: flex;
flex-direction: column;
height: 100vh;
min-width: var(--vp-sidebar-width);
padding: 20px;
padding-top: 0px;
overflow-y: scroll;
background-color: var(--vp-sidebar-bg-color);

.theme-label {
font-size: 1.25rem;
text-align: center;
padding: 1rem 0;
}
width: 100%;

hr {
width: 100%;
margin-top: 0;
main {
flex-grow: 1;
width: 100%;
height: 100vh;
padding: 2rem;
padding-bottom: 6rem;
padding-left: calc(var(--vp-sidebar-width) + 2rem);

> section {
margin: 1rem 0;

h3 {
font-size: 1.75rem;
}

.buttons > *:not(:last-child) {
margin-right: 0.5rem;
margin-bottom: 0.5rem;
}
}
}

a {
font-weight: 500;
color: var(--vp-c-text-1);
text-decoration: none;
padding: 5px;
font-size: 1rem;

&.router-link-exact-active {
color: var(--vp-c-brand-1);
}
#nav {
position: fixed;
left: 0;
display: flex;
flex-direction: column;
height: 100vh;
min-width: var(--vp-sidebar-width);
padding: 20px;
padding-top: 0px;
overflow-y: scroll;
background-color: var(--vp-sidebar-bg-color);

.theme-label {
font-size: 1.25rem;
text-align: center;
padding: 1rem 0;
}

hr {
width: 100%;
margin-top: 0;
}

a {
font-weight: 500;
color: var(--vp-c-text-1);
text-decoration: none;
padding: 5px;
font-size: 1rem;

&.router-link-exact-active {
color: var(--vp-c-brand-1);
}
}
}
}
}

.image__oruga {
height: 64px;
display: flex;
margin: 0 auto;
height: 64px;
display: flex;
margin: 0 auto;
}

@media (max-width: 576px) {
#app {
#nav {
display: none;
#app {
#nav {
display: none;
}
}
}
}
</style>
28 changes: 14 additions & 14 deletions src/assets/scss/components/_autocomplete.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,21 @@ $autocomplete-item-hover-background-color: #f5f5f5 !default;
/* @docs */

.o-acp {
&__item {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
&__item {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;

&-group-title,
&--empty {
@extend .o-drop--disabled;
}
&-group-title,
&--empty {
@extend .o-drop--disabled;
}

&--hover {
background-color: var(
--#{$prefix}autocomplete-item-hover-background-color,
$autocomplete-item-hover-background-color
);
&--hover {
background-color: var(
--#{$prefix}autocomplete-item-hover-background-color,
$autocomplete-item-hover-background-color
);
}
}
}
}
Loading