Skip to content

Commit

Permalink
Merge pull request #836 from Gabb-c/master
Browse files Browse the repository at this point in the history
  • Loading branch information
Gabb-c authored May 28, 2023
2 parents 18425f0 + cf07c25 commit e52922e
Show file tree
Hide file tree
Showing 109 changed files with 4,624 additions and 3,935 deletions.
9 changes: 0 additions & 9 deletions .eslintignore

This file was deleted.

39 changes: 0 additions & 39 deletions .eslintrc.json

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,4 @@ jobs:
run: pnpm install --frozen-lockfile

- name: Build
run: pnpm build
run: pnpm size
5 changes: 4 additions & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,11 @@ jobs:
- name: Audit installed dependencies
run: pnpm audit

- name: Lint (ESLint)
- name: Lint (Rome)
run: pnpm lint

- name: Format (Rome)
run: pnpm format

- name: Typecheck (tsc)
run: pnpm lint:tsc
7 changes: 5 additions & 2 deletions .github/workflows/stable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,12 @@ jobs:
- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Lint
- name: Lint (Rome)
run: pnpm lint

- name: Format (Rome)
run: pnpm format

- name: Build
run: pnpm build

Expand All @@ -56,7 +59,7 @@ jobs:
run: pnpm install --frozen-lockfile

- name: Semantic Release
uses: cycjimmy/[email protected].0
uses: cycjimmy/[email protected].2
with:
extra_plugins: |
@semantic-release/git
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -146,3 +146,6 @@ lib

# VitePress
**/.vitepress/cache

# SWC
.swc
1 change: 0 additions & 1 deletion .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
. "$(dirname "$0")/common.sh"

echo "Checking commit message 📝"
pnpm commitlint --edit $1
8 changes: 0 additions & 8 deletions .husky/common.sh

This file was deleted.

11 changes: 3 additions & 8 deletions .husky/pre-commit
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
. "$(dirname "$0")/common.sh"
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

echo "Linting files 📝"
pnpm lint:fix

echo "Typecheck 📝"
pnpm lint:tsc
pnpm lint-staged
5 changes: 5 additions & 0 deletions .lintstagedrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"src/**/*": ["pnpm lint:fix", "pnpm format:fix"],
"pnpm-lock.yaml": ["pnpm audit"],
"package.json": ["pnpm sort-package-json"]
}
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
16.13.1
lts/hydrogen
6 changes: 0 additions & 6 deletions .prettierignore

This file was deleted.

5 changes: 0 additions & 5 deletions .prettierrc.json

This file was deleted.

15 changes: 8 additions & 7 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
{
"recommendations": [
"christian-kohler.path-intellisense",
"dbaeumer.vscode-eslint",
"editorconfig.editorconfig",
"eamodio.gitlens",
"EditorConfig.EditorConfig",
"ms-vscode.vscode-typescript-next",
"VisualStudioExptTeam.vscodeintellicode",
"wix.vscode-import-cost",
"xabikos.JavaScriptSnippets",
"yzhang.markdown-all-in-one"
"visualstudioexptteam.vscodeintellicode",
"xabikos.javascriptsnippets",
"ms-vscode.vscode-typescript-next",
"ms-vscode.js-debug-nightly",
"yzhang.markdown-all-in-one",
"christian-kohler.path-intellisense",
"rome.rome"
],
}
47 changes: 6 additions & 41 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,43 +1,8 @@
{
"files.autoSave": "off",
"explorer.confirmDelete": false,
"explorer.confirmDragAndDrop": false,
"javascript.updateImportsOnFileMove.enabled": "always",
"window.zoomLevel": 0,
"eslint.format.enable": true, // This is super important
"editor.suggestSelection": "first",
"editor.fontLigatures": true,
"editor.semanticHighlighting.enabled": false,
"editor.tabSize": 2,
"editor.codeActionsOnSave": { // This is super important
"source.fixAll.eslint": true
},
"workbench.startupEditor": "newUntitledFile",
"eslint.run": "onSave", // This is super important
"eslint.alwaysShowStatus": true, // This is super important
"eslint.codeAction.showDocumentation": {
"enable": true
},
"typescript.tsserver.log": "verbose",
"javascript.suggest.autoImports": true,
"typescript.suggest.autoImports": true,
"screencastMode.onlyKeyboardShortcuts": true,
"breadcrumbs.enabled": true,
"editor.parameterHints.enabled": false,
"eslint.packageManager": "yarn", // If you're working with npm, just change this to "eslint.packageManager": "npm"
"files.associations": {
".sequelizerc": "javascript",
".stylelintrc": "json",
".prettierrc": "json",
"*.tsx": "typescriptreact"
},
"files.watcherExclude": {
"**/.git/objects/**": true,
"**/node_modules/**": true
},
"emmet.showSuggestionsAsSnippets": true,
"emmet.includeLanguages": {
"javascript": "javascriptreact",
"typescript": "typescriptreact"
"explorer.confirmDelete": false,
"workbench.startupEditor": "none",
"typescript.tsserver.log": "off",
"editor.defaultFormatter": "rome.rome",
"editor.formatOnSave": true,
"explorer.confirmDragAndDrop": false
}
}
15 changes: 0 additions & 15 deletions banner.js

This file was deleted.

96 changes: 50 additions & 46 deletions docs/.vitepress/config.ts
Original file line number Diff line number Diff line change
@@ -1,53 +1,57 @@
import { defineConfig } from 'vitepress';
import { readFileSync } from 'node:fs';
import { author, license, repository, description as packageDescription } from '../../package.json';
import { navbarItems, sidebarRoutes } from './routes';
import { SOCIAL_LINKS } from './social-links';
import { headConfig } from './head-config';
import { defineConfig } from "vitepress";
import { withPwa } from "@vite-pwa/vitepress";
import { readFileSync } from "node:fs";
import { author, license, repository, description as packageDescription } from "../../package.json";
import { navbarItems, sidebarRoutes } from "./routes";
import { SOCIAL_LINKS } from "./social-links";
import { headConfig } from "./head-config";

import * as dotenv from 'dotenv';
import * as dotenv from "dotenv";
dotenv.config();

const readSvg = (path: string): string => readFileSync(require.resolve(path), 'utf-8');
const readSvg = (path: string): string => readFileSync(require.resolve(path), "utf-8");

export default defineConfig({
title: 'Pokenode-ts',
description: packageDescription,
lang: 'en-US',
srcDir: './src',
lastUpdated: true,
head: headConfig,
themeConfig: {
nav: navbarItems,
sidebar: sidebarRoutes,
siteTitle: 'Pokenode-ts',
logo: '/siteLogo.svg',
footer: {
message: `Made with ❤️<br/>Released under the ${license} License`,
copyright: `Copyright © 2021-${new Date().getFullYear()} ${author.name}`,
},
socialLinks: [
{ icon: 'github', link: SOCIAL_LINKS.GITHUB },
{ icon: { svg: readSvg('../src/public/npm-icon.svg') }, link: SOCIAL_LINKS.NPM },
{ icon: { svg: readSvg('../src/public/jsdelivr-icon.svg') }, link: SOCIAL_LINKS.JSDELIVR },
{
icon: { svg: readSvg('../src/public/bundlephobia-icon.svg') },
link: SOCIAL_LINKS.BUNDLEPHOBIA,
export default withPwa(
defineConfig({
title: "Pokenode-ts",
description: packageDescription,
lang: "en-US",
srcDir: "./src",
lastUpdated: true,
head: headConfig,
themeConfig: {
nav: navbarItems,
sidebar: sidebarRoutes,
siteTitle: "Pokenode-ts",
logo: "/siteLogo.svg",
footer: {
message: `Made with ❤️<br/>Released under the ${license} License`,
copyright: `Copyright © 2021-${new Date().getFullYear()} ${author.name}`,
},
{
icon: { svg: readSvg('../src/public/packagephobia-icon.svg') },
link: SOCIAL_LINKS.PACKAGEPHOBIA,
socialLinks: [
{ icon: "github", link: SOCIAL_LINKS.GITHUB },
{ icon: { svg: readSvg("../src/public/npm-icon.svg") }, link: SOCIAL_LINKS.NPM },
{ icon: { svg: readSvg("../src/public/jsdelivr-icon.svg") }, link: SOCIAL_LINKS.JSDELIVR },
{
icon: { svg: readSvg("../src/public/bundlephobia-icon.svg") },
link: SOCIAL_LINKS.BUNDLEPHOBIA,
},
{
icon: { svg: readSvg("../src/public/packagephobia-icon.svg") },
link: SOCIAL_LINKS.PACKAGEPHOBIA,
},
],
editLink: {
pattern: `${repository.url}/vitepress/edit/main/docs/src/:path`,
text: "Edit this page on GitHub",
},
algolia: {
apiKey: process.env.API_KEY as string,
appId: process.env.APP_ID as string,
indexName: process.env.INDEX_NAME as string,
},
],
editLink: {
pattern: `${repository.url}/vitepress/edit/main/docs/src/:path`,
text: 'Edit this page on GitHub',
},
algolia: {
apiKey: process.env.API_KEY as string,
appId: process.env.APP_ID as string,
indexName: process.env.INDEX_NAME as string,
},
},
cleanUrls: true,
});
cleanUrls: true,
pwa: {},
}),
);
Loading

0 comments on commit e52922e

Please sign in to comment.