Skip to content

Commit

Permalink
fix: eslint config
Browse files Browse the repository at this point in the history
  • Loading branch information
Virenbar committed Apr 13, 2024
1 parent 89801d5 commit 4ac1f78
Show file tree
Hide file tree
Showing 9 changed files with 1,538 additions and 795 deletions.
2 changes: 0 additions & 2 deletions .eslintignore

This file was deleted.

30 changes: 0 additions & 30 deletions .eslintrc

This file was deleted.

5 changes: 4 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
"editor.tabSize": 2,
"typescript.tsdk": "node_modules/typescript/lib",
"html.format.extraLiners": "body, /html", // Conflicts with <Head/>
"html.format.wrapAttributes": "preserve",
"html.format.wrapLineLength": 150,
"[vue]": {
"editor.defaultFormatter": "Vue.volar",
},
Expand All @@ -20,5 +22,6 @@
"eslint.validate": [
"javascript",
"typescript"
]
],
"eslint.experimental.useFlatConfig": true
}
2 changes: 1 addition & 1 deletion app.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ useHead({
"data-bs-theme": "dark"
}
});
useSeoMeta({
useServerSeoMeta({
ogType: "website",
ogTitle: "Каналы радио Record",
ogSiteName: "Каналы радио Record",
Expand Down
27 changes: 11 additions & 16 deletions components/Page/Footer.vue
Original file line number Diff line number Diff line change
@@ -1,35 +1,30 @@
<script setup lang="ts">
const config = useRuntimeConfig();
const repository = config.public.repository;
const { repository, branch, hash, date } = useRuntimeConfig().public;
const branch = config.public.branch;
const branchURL = `${repository}/tree/${branch}`;
const tree = config.public.hash.substring(0, 7);
const treeURL = `${repository}/tree/${config.public.hash}`;
const date = formatDate(new Date(config.public.date)).replaceAll(".", "");
const tree = hash.substring(0, 7);
const treeURL = `${repository}/tree/${hash}`;
</script>
<template>
<footer class="container-fluid py-1 px-3 d-flex justify-content-between font-monospace">
<div>
Made with
<a href="https://nuxt.com/" target="_blank">
<NuxtLink href="https://nuxt.com/" target="_blank">
Nuxt
</a>
</NuxtLink>
and
<a href="https://pages.github.com/" target="_blank">
<NuxtLink href="https://pages.github.com/" target="_blank">
GitHub Pages
</a>
</NuxtLink>
</div>

<div class="d-none d-md-block">
Version:
Build:
<a :href="branchURL" target="_blank">
{{ config.public.branch }}
{{ branch }}
</a>
<span v-if="tree != 'unknown'">@<a :href="treeURL" target="_blank"> {{ tree }} </a></span>
<span>#{{ date }}</span>
<span v-if="tree != 'unknown'">@<NuxtLink :to="treeURL" target="_blank"> {{ tree }} </NuxtLink></span>
<span v-else>#{{ formatDate(new Date(date)).replaceAll(".", "") }}</span>
</div>
</footer>
</template>
33 changes: 33 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
// @ts-check
import withNuxt from "./.nuxt/eslint.config.mjs";

export default withNuxt(
{
"rules": {
"@typescript-eslint/type-annotation-spacing": "warn",
"quotes": "warn",
"eol-last": "warn",
"semi": "warn",
"no-multiple-empty-lines": [
"warn",
{
"max": 1
}
],
"padding-line-between-statements": [
"warn",
{
"blankLine": "always",
"prev": "*",
"next": "function"
}
],
// Conflicts
"vue/multi-word-component-names": "off",
"no-use-before-define": "off",
"space-before-function-paren": "off",
"vue/max-attributes-per-line": "off",
"vue/html-closing-bracket-newline": "off"
}
}
);
6 changes: 5 additions & 1 deletion nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@ export default defineNuxtConfig({
css: [
"@/assets/css/styles.scss"
],
modules: ["nuxt-gtag", "yandex-metrika-module-nuxt3"],
modules: [
"@nuxt/eslint",
"nuxt-gtag",
"@artmizu/yandex-metrika-nuxt"
],
gtag: { id: "G-J31NMXDD2E" },
yandexMetrika: { id: "87731504" },
runtimeConfig: {
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
"lodash-es": "^4.17.21"
},
"devDependencies": {
"@nuxt/eslint-config": "^0.2.0",
"@artmizu/yandex-metrika-nuxt": "^1.0.4",
"@nuxt/eslint": "^0.3.6",
"@types/bootstrap": "^5.2.10",
"@types/lodash-es": "^4.17.12",
"@types/node": "^20.12.3",
Expand All @@ -31,8 +32,7 @@
"sass-loader": "^14.1.1",
"tsx": "^4.7.1",
"typescript": "^5.4.3",
"webpack": "^5.91.0",
"yandex-metrika-module-nuxt3": "^1.5.3"
"webpack": "^5.91.0"
},
"type": "module",
"private": true
Expand Down
Loading

0 comments on commit 4ac1f78

Please sign in to comment.