Skip to content

Commit

Permalink
Merge pull request #1136 from Gabb-c/feat/tests-refactor
Browse files Browse the repository at this point in the history
Feat - tests refactor
  • Loading branch information
Gabb-c authored Jun 23, 2024
2 parents c9e28c6 + 512be7b commit 2c40318
Show file tree
Hide file tree
Showing 71 changed files with 5,936 additions and 4,095 deletions.
93 changes: 7 additions & 86 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,90 +1,11 @@
# Automatically detect text files and handle line endings appropriately
* text=auto

# DOCUMENTS
*.bibtex text diff=bibtex
*.doc diff=astextplain
*.DOC diff=astextplain
*.docx diff=astextplain
*.DOCX diff=astextplain
*.dot diff=astextplain
*.DOT diff=astextplain
*.pdf diff=astextplain
*.PDF diff=astextplain
*.rtf diff=astextplain
*.RTF diff=astextplain
*.md text diff=markdown
*.tex text diff=tex
*.adoc text
*.textile text
*.mustache text
*.csv text
*.tab text
*.tsv text
*.txt text eol=lf
*.sql text
*.ps1 text eol=crlf

# CUSTOM
# Use LF as EOL for these files
.editorconfig text eol=lf
.gitignore text eol=lf
*.css text eol=lf
*.df text eol=lf
*.htm text eol=lf
*.html text eol=lf
*.java text eol=lf
*.js text eol=lf
*.json text eol=lf
*.ts text eol=lf
*.jsp text eol=lf
*.jspf text eol=lf
*.properties text eol=lf
*.scss text eol=lf
*.tld text eol=lf
*.ts text eol=lf
*.xml text eol=lf

# GRAPHICS
*.png binary
*.jpg binary
*.jpeg binary
*.gif binary
*.tif binary
*.tiff binary
*.ico binary
# SVG treated as an asset (binary) by default.
*.svg text
# If you want to treat it as binary,
# use the following line instead.
# *.svg binary
*.eps binary

# SCRIPTS
*.bash text eol=lf
*.fish text eol=lf
*.sh text eol=lf
# These are explicitly windows files and should use CRLF
*.bat text eol=crlf
*.cmd text eol=crlf

# SERIALIZATION
*.json text
*.toml text
*.xml text
*.yaml text
*.yml text

# ARCHIVES
*.7z binary
*.gz binary
*.tar binary
*.tgz binary
*.zip binary
# Ignore the .gitattributes file itself when exporting or archiving the repository
.gitattributes export-ignore

# TEXT FILES WHERE LINE ENDINGS SHOULD BE PRESERVED
*.patch -text
# Ignore the .gitignore file when exporting or archiving the repository
.gitignore export-ignore

# EXCLUDE FILES FROM EXPORTING
.gitattributes export-ignore
.gitignore export-ignore
.gitkeep export-ignore
# Ignore the .gitkeep file when exporting or archiving the repository
.gitkeep export-ignore
5 changes: 4 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,8 @@ jobs:
- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Run tests
- name: Run tests (Unit)
run: pnpm test

- name: Run tests (Typecheck)
run: pnpm test:types
1 change: 1 addition & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
echo 'Linting commit message...'
npx --no -- commitlint --edit $1
5 changes: 3 additions & 2 deletions .lintstagedrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"*.{js,ts,cjs,mjs,d.cts,d.mts,jsx,tsx,json,jsonc}": [
"biome check --apply-unsafe --no-errors-on-unmatched"
]
"biome check --staged --apply-unsafe --no-errors-on-unmatched"
],
"src/**/*.ts": ["tsc --noEmit"]
}
2 changes: 1 addition & 1 deletion .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"tasks": [
{
"type": "npm",
"script": "build",
"script": "size",
"group": {
"kind": "build",
"isDefault": true
Expand Down
7 changes: 4 additions & 3 deletions biome.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "https://biomejs.dev/schemas/1.6.4/schema.json",
"$schema": "https://biomejs.dev/schemas/1.7.3/schema.json",
"organizeImports": {
"enabled": true
},
Expand All @@ -8,14 +8,15 @@
"rules": {
"recommended": true
},
"ignore": ["lib"]
"ignore": ["node_modules", "lib"]
},
"formatter": {
"enabled": true,
"formatWithErrors": true,
"indentStyle": "space",
"indentWidth": 2,
"lineWidth": 100,
"ignore": ["lib"]
"lineEnding": "lf",
"ignore": ["node_modules", "lib"]
}
}
1 change: 0 additions & 1 deletion commitlint.config.cjs

This file was deleted.

3 changes: 3 additions & 0 deletions commitlint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export default {
extends: ["@commitlint/config-conventional"],
};
52 changes: 0 additions & 52 deletions docs/.vitepress/assets/siteLogo.svg

This file was deleted.

90 changes: 0 additions & 90 deletions docs/.vitepress/components/ReloadPrompt.vue

This file was deleted.

13 changes: 0 additions & 13 deletions docs/.vitepress/components/theme/index.ts

This file was deleted.

25 changes: 16 additions & 9 deletions docs/.vitepress/config.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { defineConfig } from "vitepress";
import { author, license, description as packageDescription, repository } from "../../package.json";
import { headConfig } from "./head-config";
import { navbarItems, sidebarRoutes } from "./routes";
import { SOCIAL_LINKS } from "./social-links";

import { readFileSync } from "node:fs";
import { resolve } from "node:path";
import { defineConfig } from "vitepress";

import { author, license, description as packageDescription } from "../../package.json";
import { headConfig } from "./meta/head-config";
import { navbarItems, sidebarRoutes } from "./meta/routes";
import { SOCIAL_LINKS } from "./meta/social-links";

const readSvg = (fileName: string): string =>
readFileSync(resolve(`./docs/.vitepress/assets/${fileName}`), "utf-8");
Expand All @@ -17,11 +17,14 @@ export default defineConfig({
srcDir: "./src",
lastUpdated: true,
head: headConfig,
sitemap: {
hostname: "https://pokenode-ts.vercel.app",
},
themeConfig: {
nav: navbarItems,
sidebar: sidebarRoutes,
siteTitle: "Pokenode-ts",
logo: "/siteLogo.svg",
logo: { src: "/site-logo.svg", width: 24, height: 24 },
footer: {
message: `Made with ❤️<br/>Released under the ${license} License`,
copyright: `Copyright © 2021-${new Date().getFullYear()} ${author.name}`,
Expand All @@ -43,12 +46,16 @@ export default defineConfig({
},
],
editLink: {
pattern: `${repository.url}/vitepress/edit/main/docs/src/:path`,
text: "Edit this page on GitHub",
pattern: "https://github.com/Gabb-c/pokenode-ts/edit/main/docs/src/:path",
text: "Suggest changes to this page",
},
search: {
provider: "local",
},
carbonAds: {
code: "CEBDT27Y",
placement: "vuejsorg",
},
},
cleanUrls: true,
});
Loading

0 comments on commit 2c40318

Please sign in to comment.