Skip to content

Commit

Permalink
cleanup: wip 6
Browse files Browse the repository at this point in the history
  • Loading branch information
mochaaP committed Jan 19, 2025
1 parent ea5be50 commit d9df2f2
Show file tree
Hide file tree
Showing 240 changed files with 5,338 additions and 6,130 deletions.
5 changes: 2 additions & 3 deletions .devcontainer/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,9 @@ services:
# Update 'VARIANT' to pick a version of PHP version: 8, 8.1, 8.0, 7, 7.4
# Append -bullseye or -buster to pin to an OS version.
# Use -bullseye variants on local arm64/Apple Silicon.
VARIANT: "8-bullseye"
VARIANT: 8-bullseye
# Optional Node.js version
NODE_VERSION: "lts/*"

NODE_VERSION: 'lts/*'

volumes:
- ..:/workspace:cached
Expand Down
9 changes: 0 additions & 9 deletions .eslintignore

This file was deleted.

27 changes: 7 additions & 20 deletions .gitpod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,28 +13,15 @@ tasks:
php artisan serve --host=0.0.0.0
- command: gp ports await 8080 && gp preview $(gp url 8000)

github:
prebuilds:
# enable for the master/default branch (defaults to true)
master: true
# enable for all branches in this repo (defaults to false)
branches: false
# enable for pull requests coming from this repo (defaults to true)
pullRequests: true
# add a check to pull requests (defaults to true)
addCheck: true
# add a "Review in Gitpod" button as a comment to pull requests (defaults to false)
addComment: false

vscode:
extensions:
- 'editorconfig.editorconfig'
- 'eamodio.gitlens'
- 'bmewburn.vscode-intelephense-client'
- 'esbenp.prettier-vscode'
- 'jpoissonnier.vscode-styled-components'
- 'mblode.twig-language-2'
- 'felixfbecker.php-debug'
- editorconfig.editorconfig
- eamodio.gitlens
- bmewburn.vscode-intelephense-client
- esbenp.prettier-vscode
- jpoissonnier.vscode-styled-components
- mblode.twig-language-2
- felixfbecker.php-debug

ports:
- port: 8080
Expand Down
72 changes: 36 additions & 36 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -1,38 +1,38 @@
{
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Launch Jest Tests",
"program": "${workspaceFolder}/node_modules/.bin/jest",
"args": ["${file}"],
"internalConsoleOptions": "openOnSessionStart",
"skipFiles": [
"<node_internals>/**"
]
},
{
"type": "php",
"request": "launch",
"name": "Launch with XDebug",
"ignore": [
"**/vendor/**/*.php"
]
},
{
"type": "firefox",
"request": "launch",
"reAttach": true,
"name": "Launch with Firefox Debugger",
"url": "http://localhost/",
"webRoot": "${workspaceFolder}",
"pathMappings": [
{
"url": "webpack:///",
"path": "${workspaceFolder}/"
}
]
}
]
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Launch Jest Tests",
"program": "${workspaceFolder}/node_modules/.bin/jest",
"args": ["${file}"],
"internalConsoleOptions": "openOnSessionStart",
"skipFiles": [
"<node_internals>/**"
]
},
{
"type": "php",
"request": "launch",
"name": "Launch with XDebug",
"ignore": [
"**/vendor/**/*.php"
]
},
{
"type": "firefox",
"request": "launch",
"reAttach": true,
"name": "Launch with Firefox Debugger",
"url": "http://localhost/",
"webRoot": "${workspaceFolder}",
"pathMappings": [
{
"url": "webpack:///",
"path": "${workspaceFolder}/"
}
]
}
]
}
11 changes: 11 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import {configBuilder} from '@mochaa/eslintrc';

export default configBuilder({
ignores: [
'public/',
'vendor/',
'vendor/',
'plugins/',
'storage/',
],
});
132 changes: 44 additions & 88 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
{
"name": "blessing-skin-server",
"type": "module",
"version": "6.0.2",
"private": true,
"packageManager": "[email protected]+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e",
"description": "A web application brings your custom skins back in offline Minecraft servers.",
"author": "printempw",
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/bs-community/blessing-skin-server"
},
"license": "MIT",
"author": "printempw",
"type": "module",
"scripts": {
"build": "vite build",
"build:urls": "ts-node tools/generateUrls.ts",
Expand All @@ -22,109 +23,64 @@
"iOS >= 12.5",
"Chrome >= 87"
],
"eslintConfig": {
"env": {
"es2024": true
},
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module"
},
"extends": [
"xo",
"xo-react",
"plugin:react/jsx-runtime",
"./node_modules/xo/config/plugins.cjs"
],
"rules": {
"import/extensions": "off",
"import/no-named-as-default": "off",
"n/file-extension-in-import": "off",
"unicorn/filename-case": "off",
"n/prefer-global/process": "off"
},
"overrides": [
{
"files": [
"*.ts",
"*.tsx"
],
"extends": [
"xo-typescript"
],
"rules": {
"@typescript-eslint/ban-types": "off",
"@typescript-eslint/consistent-type-definitions": "warn",
"@typescript-eslint/naming-convention": "warn"
}
}
],
"ignorePatterns": [
"dist",
"public"
],
"root": true
},
"resolutions": {
"kleur": "^4.1.3"
},
"dependencies": {
"@emotion/react": "^11.11.4",
"@emotion/styled": "^11.0.0",
"@fortawesome/fontawesome-free": "^6.3.0",
"@tweenjs/tween.js": "^23.1.1",
"admin-lte": "next",
"@emotion/react": "^11.14.0",
"@emotion/styled": "^11.14.0",
"@fortawesome/fontawesome-free": "^6.7.2",
"@tweenjs/tween.js": "^25.0.0",
"admin-lte": "4.0.0-beta3",
"bootstrap": "^5.3.3",
"clsx": "^2.1.0",
"echarts": "^5.5.0",
"immer": "^10.0.3",
"clsx": "^2.1.1",
"downshift": "^9.0.8",
"echarts": "^5.6.0",
"immer": "^10.1.1",
"jquery": "^3.6.0",
"lodash-es": "^4.0.8",
"nanoid": "^5.0.6",
"nanoid": "^5.0.9",
"prompts": "^2.4.0",
"react": "^18.2.0",
"react-autosuggest": "^10.0.2",
"react-dom": "^18.2.0",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-draggable": "^4.4.2",
"react-loading-skeleton": "^3.4.0",
"react-use": "^17.5.0",
"react-loading-skeleton": "^3.5.0",
"react-use": "^17.6.0",
"reaptcha": "^1.7.2",
"rxjs": "^7.8.1",
"skinview-utils": "^0.7.1",
"skinview3d": "^3.0.0-alpha.1",
"spectre.css": "npm:@angular-package/spectre.css",
"use-immer": "^0.9.0"
"skinview3d": "^3.1.0",
"spectre.css": "github:angular-package/spectre.css",
"use-immer": "^0.11.0"
},
"devDependencies": {
"@testing-library/jest-dom": "^6.4.2",
"@testing-library/react": "^14.2.1",
"@tsconfig/vite-react": "^3.0.0",
"@eslint-react/eslint-plugin": "^1.23.2",
"@mochaa/eslintrc": "^0.1.12",
"@testing-library/jest-dom": "^6.6.3",
"@testing-library/react": "^16.2.0",
"@tsconfig/vite-react": "^3.4.0",
"@types/bootstrap": "^5.2.10",
"@types/jquery": "^3.5.13",
"@types/jquery": "^3.5.32",
"@types/js-yaml": "^4.0.9",
"@types/lodash-es": "^4.0.6",
"@types/prompts": "^2.0.9",
"@types/react": "^18.2.62",
"@types/react-autosuggest": "^10.1.11",
"@types/react-dom": "^18.2.19",
"@types/react": "^18",
"@types/react-dom": "^18",
"@types/tween.js": "^18.5.0",
"@vitejs/plugin-react-swc": "^3.6.0",
"autoprefixer": "^10.4.18",
"browserslist": "^4.23.0",
"@vitejs/plugin-react-swc": "^3.7.2",
"autoprefixer": "^10.4.20",
"browserslist": "^4.24.4",
"browserslist-to-esbuild": "^2.1.1",
"eslint-config-xo-react": "^0.27.0",
"eslint-plugin-react": "^7.34.0",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint": "^9.18.0",
"eslint-plugin-react-hooks": "^5.1.0",
"eslint-plugin-react-refresh": "^0.4.18",
"js-yaml": "^4.1.0",
"laravel-vite-plugin": "^1.0.2",
"postcss": "^8.4.35",
"sass": "^1.71.1",
"typescript": "^5.3.3",
"vite": "^5.1.5",
"vite-plugin-top-level-await": "^1.4.1",
"vite-plugin-wasm": "^3.3.0",
"vitest": "^1.3.1",
"xo": "^0.57.0"
"laravel-vite-plugin": "^1.1.1",
"postcss": "^8.5.1",
"sass": "^1.83.4",
"typescript": "^5.7.3",
"vite": "^6.0.7",
"vitest": "^3.0.2"
},
"resolutions": {
"kleur": "^4.1.3"
},
"postcss": {
"plugins": {
Expand Down
1 change: 1 addition & 0 deletions public/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
app/
build/
hot/
1 change: 1 addition & 0 deletions public/hot
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
http://[::1]:5173
18 changes: 9 additions & 9 deletions resources/assets/src/components/Alert.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

type AlertType = 'success' | 'info' | 'warning' | 'danger';

const icons = new Map<AlertType, string>([
Expand All @@ -13,16 +12,17 @@ type Properties = {
readonly children?: React.ReactNode;
};

const Alert: React.FC<Properties> = properties => {
const {type} = properties;
const Alert: React.FC<Properties> = ({type, children}) => {
const icon = icons.get(type);

return properties.children ? (
<div className={`alert alert-${type}`}>
<i className={`icon fas fa-${icon}`}/>
{properties.children}
</div>
) : null;
return children === ''
? null
: (
<div className={`alert alert-${type}`}>
<i className={`icon fas fa-${icon}`}/>
{children}
</div>
);
};

export default Alert;
5 changes: 2 additions & 3 deletions resources/assets/src/components/ButtonEdit.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@

type Properties = {
readonly title?: string;
readonly onClick: React.MouseEventHandler<HTMLAnchorElement>;
};

const ButtonEdit: React.FC<Properties> = properties => (
<a href='#' title={properties.title} className='ml-2' onClick={properties.onClick}>
const ButtonEdit: React.FC<Properties> = ({title, onClick}) => (
<a href='#' title={title} className='ml-2' onClick={onClick}>
<i className='fas fa-edit'/>
</a>
);
Expand Down
Loading

0 comments on commit d9df2f2

Please sign in to comment.