Skip to content
This repository has been archived by the owner on Jun 23, 2024. It is now read-only.

Commit

Permalink
Merge branch 'eslint'
Browse files Browse the repository at this point in the history
  • Loading branch information
screendriver committed Jun 14, 2024
2 parents eef88a4 + 3a58ea3 commit 28acaf9
Show file tree
Hide file tree
Showing 10 changed files with 143 additions and 23 deletions.
7 changes: 5 additions & 2 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
{
"parser": "@typescript-eslint/parser",
"parser": "vue-eslint-parser",
"parserOptions": {
"parser": "@typescript-eslint/parser",
"sourceType": "module",
"ecmaVersion": 2021,
"project": "tsconfig.json"
"project": "tsconfig.json",
"extraFileExtensions": [".vue"]
},
"extends": [
"prettier",
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking",
"plugin:vue/vue3-recommended",
"plugin:functional/external-typescript-recommended",
"plugin:ava/recommended",
"plugin:prettier/recommended"
Expand Down
2 changes: 1 addition & 1 deletion justfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ lint:
npx astro sync
npx astro check
npx prettier --check source
npx eslint . --ext ".ts"
npx eslint . --ext ".ts,.vue"
npx jscpd source

@compile:
Expand Down
115 changes: 115 additions & 0 deletions package-lock.json

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

2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
"eslint-plugin-ava": "14.0.0",
"eslint-plugin-functional": "6.5.1",
"eslint-plugin-prettier": "5.1.3",
"eslint-plugin-vue": "9.26.0",
"fastify": "4.27.0",
"fishery": "2.2.2",
"get-port": "7.1.0",
Expand All @@ -72,6 +73,7 @@
"tailwindcss": "3.4.4",
"tsx": "4.15.4",
"typescript": "5.4.5",
"vue-eslint-parser": "9.4.3",
"vue-tsc": "2.0.21",
"wait-on": "7.2.0",
"zx": "8.1.2"
Expand Down
12 changes: 6 additions & 6 deletions source/statistics/GitHubRepositories.vue
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<script setup lang="ts">
import type { Maybe } from "true-myth";
import type { GitHubStatistics } from "../github-statistics/github-statistics-schema";
import Figure from "./Figure.vue";
import StatisticsFigure from "./StatisticsFigure.vue";
import LoadingSpinner from "./LoadingSpinner.vue";
import Cite from "./Cite.vue";
import StatisticsCite from "./StatisticsCite.vue";
interface Properties {
readonly isFetching: boolean;
Expand All @@ -14,10 +14,10 @@ const { isFetching, gitHubStatistics } = defineProps<Properties>();
</script>

<template>
<Figure description="GitHub Repos">
<StatisticsFigure description="GitHub Repos">
<LoadingSpinner v-if="isFetching" />
<Cite v-if="!isFetching" ariaLabel="GitHub Repos">
<StatisticsCite v-if="!isFetching" ariaLabel="GitHub Repos">

Check warning on line 19 in source/statistics/GitHubRepositories.vue

View workflow job for this annotation

GitHub Actions / Tests

Attribute 'ariaLabel' must be hyphenated
{{ gitHubStatistics.get("user").get("repositories").get("totalCount").unwrapOr(0) }}
</Cite>
</Figure>
</StatisticsCite>
</StatisticsFigure>
</template>
12 changes: 6 additions & 6 deletions source/statistics/GitHubStars.vue
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<script setup lang="ts">
import type { Maybe } from "true-myth";
import type { GitHubStatistics } from "../github-statistics/github-statistics-schema";
import Figure from "./Figure.vue";
import StatisticsFigure from "./StatisticsFigure.vue";
import LoadingSpinner from "./LoadingSpinner.vue";
import Cite from "./Cite.vue";
import StatisticsCite from "./StatisticsCite.vue";
interface Properties {
readonly isFetching: boolean;
Expand All @@ -14,10 +14,10 @@ const { isFetching, gitHubStatistics } = defineProps<Properties>();
</script>

<template>
<Figure description="GitHub Stars">
<StatisticsFigure description="GitHub Stars">
<LoadingSpinner v-if="isFetching" />
<Cite v-if="!isFetching" ariaLabel="GitHub Stars">
<StatisticsCite v-if="!isFetching" ariaLabel="GitHub Stars">

Check warning on line 19 in source/statistics/GitHubStars.vue

View workflow job for this annotation

GitHub Actions / Tests

Attribute 'ariaLabel' must be hyphenated
{{ gitHubStatistics.get("user").get("starredRepositories").get("totalCount").unwrapOr(0) }}
</Cite>
</Figure>
</StatisticsCite>
</StatisticsFigure>
</template>
File renamed without changes.
6 changes: 3 additions & 3 deletions source/statistics/StatisticsData.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { Maybe } from "true-myth";
import YearsInBusiness from "./YearsInBusiness.vue";
import GitHubRepositories from "./GitHubRepositories.vue";
import GitHubStars from "./GitHubStars.vue";
import Figure from "./Figure.vue";
import StatisticsFigure from "./StatisticsFigure.vue";
import { gitHubStatisticsSchema, type GitHubStatistics } from "../github-statistics/github-statistics-schema";
const currentYear = import.meta.env.PROD ? new Date() : new Date(2022, 2, 23);
Expand All @@ -30,7 +30,7 @@ const barChartIcon = icons["bar-chart"].toSvg({ class: "text-dracula-green w-6 h
<YearsInBusiness :years-of-experience="yearsOfExperience" />
<GitHubRepositories :is-fetching="isFetching" :gitHubStatistics="gitHubStatistics" />

Check warning on line 31 in source/statistics/StatisticsData.vue

View workflow job for this annotation

GitHub Actions / Tests

Attribute ':gitHubStatistics' must be hyphenated
<GitHubStars :is-fetching="isFetching" :gitHubStatistics="gitHubStatistics" />

Check warning on line 32 in source/statistics/StatisticsData.vue

View workflow job for this annotation

GitHub Actions / Tests

Attribute ':gitHubStatistics' must be hyphenated
<Figure description="Lines of Code">
<StatisticsFigure description="Lines of Code">
<figure v-html="barChartIcon" />

Check warning on line 34 in source/statistics/StatisticsData.vue

View workflow job for this annotation

GitHub Actions / Tests

'v-html' directive can lead to XSS attack
</Figure>
</StatisticsFigure>
</template>
File renamed without changes.
10 changes: 5 additions & 5 deletions source/statistics/YearsInBusiness.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script setup lang="ts">
import Figure from "./Figure.vue";
import Cite from "./Cite.vue";
import StatisticsFigure from "./StatisticsFigure.vue";
import StatisticsCite from "./StatisticsCite.vue";
interface Properties {
readonly yearsOfExperience: number;
Expand All @@ -10,7 +10,7 @@ const { yearsOfExperience } = defineProps<Properties>();
</script>

<template>
<Figure description="Experience">
<Cite ariaLabel="Years of experience">{{ yearsOfExperience }} yrs</Cite>
</Figure>
<StatisticsFigure description="Experience">
<StatisticsCite ariaLabel="Years of experience">{{ yearsOfExperience }} yrs</StatisticsCite>

Check warning on line 14 in source/statistics/YearsInBusiness.vue

View workflow job for this annotation

GitHub Actions / Tests

Attribute 'ariaLabel' must be hyphenated
</StatisticsFigure>
</template>

0 comments on commit 28acaf9

Please sign in to comment.