Skip to content

Commit

Permalink
migrate to new eslint and prettier + format
Browse files Browse the repository at this point in the history
  • Loading branch information
Percslol committed Oct 27, 2024
1 parent 8fec54c commit 99881ff
Show file tree
Hide file tree
Showing 13 changed files with 1,061 additions and 493 deletions.
1 change: 0 additions & 1 deletion .eslintignore

This file was deleted.

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

This file was deleted.

11 changes: 5 additions & 6 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,29 @@ name: Build and Push to Docker Hub

on:
push:
branches: [ main ]
branches: [main]
schedule:
- cron: "30 12 * * 0" # Run once every Sunday


jobs:
build_and_push_docker_images:
runs-on: ubuntu-latest
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERUSERNAME }}
password: ${{ secrets.DOCKERPASSWORD }}

- name: Build and push
uses: docker/build-push-action@v6
with:
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ secrets.DOCKERUSERNAME }}/ultraviolet-node:latest
tags: ${{ secrets.DOCKERUSERNAME }}/ultraviolet-node:latest
2 changes: 1 addition & 1 deletion .github/workflows/eslint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,4 @@ jobs:
uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: eslint-results.sarif
wait-for-processing: true
wait-for-processing: true
11 changes: 11 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/**
* @type {import("prettier").Config}
*/
const config = {
trailingComma: "es5",
useTabs: true,
semi: true,
singleQuote: false,
};

export default config;
4 changes: 0 additions & 4 deletions .prettierrc.json

This file was deleted.

3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ Support and updates can be found in our [Discord Server](discord.gg/unblock).
> Until deployed on a domain with a valid SSL certificate, Firefox will not be able to load the site. Use chromium for testing on localhost
### HTTP Transport
The example uses [EpoxyTransport](/~https://github.com/MercuryWorkshop/EpoxyTransport) to fetch proxied data encrypted.

The example uses [EpoxyTransport](/~https://github.com/MercuryWorkshop/EpoxyTransport) to fetch proxied data encrypted.

You may also want to use [CurlTransport](/~https://github.com/MercuryWorkshop/CurlTransport), a different way of fetching encrypted data, or [Bare-Client](/~https://github.com/MercuryWorkshop/Bare-as-module3), the legacy (unencrypted!) transport.

Expand Down
10 changes: 5 additions & 5 deletions app.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "Ultraviolet App",
"description": "Node.js Ultraviolet instance",
"repository": "/~https://github.com/titaniumnetwork-dev/Ultraviolet-App",
"logo": "https://raw.githubusercontent.com/titaniumnetwork-dev/Ultraviolet-Static/main/public/uv.png",
"keywords": ["tomp", "ultraviolet"]
"name": "Ultraviolet App",
"description": "Node.js Ultraviolet instance",
"repository": "/~https://github.com/titaniumnetwork-dev/Ultraviolet-App",
"logo": "https://raw.githubusercontent.com/titaniumnetwork-dev/Ultraviolet-Static/main/public/uv.png",
"keywords": ["tomp", "ultraviolet"]
}
4 changes: 2 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ services:
restart: unless-stopped
ports:
- "8080:8080"

networks:
default:
name: ultraviolet
name: ultraviolet
11 changes: 11 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
export default [
{
ignores: ["**/node_modules"],
},
{
languageOptions: {
ecmaVersion: "latest",
sourceType: "module",
},
},
];
65 changes: 34 additions & 31 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,33 +1,36 @@
{
"name": "uv-app",
"version": "1.0.0",
"description": "Ultraviolet instance",
"type": "module",
"engines": {
"npm": ">=7.0.0",
"node": ">=16.0.0"
},
"scripts": {
"start": "node src/index.js"
},
"keywords": [
"proxy"
],
"author": "",
"license": "GPL-3.0-or-later",
"dependencies": {
"@fastify/static": "^8.0.2",
"@mercuryworkshop/bare-mux": "^2.1.6",
"@mercuryworkshop/epoxy-transport": "^2.1.25",
"@titaniumnetwork-dev/ultraviolet": "^3.2.9",
"fastify": "^5.0.0",
"ultraviolet-static": "github:titaniumnetwork-dev/Ultraviolet-Static",
"wisp-server-node": "^1.1.7",
"ws": "^8.18.0"
},
"devDependencies": {
"eslint": "^9.13.0",
"prettier": "^3.3.3"
},
"packageManager": "pnpm@9.12.2"
"name": "uv-app",
"version": "1.0.0",
"description": "Ultraviolet instance",
"type": "module",
"engines": {
"npm": ">=7.0.0",
"node": ">=16.0.0"
},
"scripts": {
"start": "node src/index.js",
"format": "prettier --config .prettierrc.js --write .",
"lint": "eslint ./src/",
"lint:fix": "eslint ./src/ --fix"
},
"keywords": [
"proxy"
],
"author": "",
"license": "GPL-3.0-or-later",
"dependencies": {
"@fastify/static": "^8.0.2",
"@mercuryworkshop/bare-mux": "^2.1.6",
"@mercuryworkshop/epoxy-transport": "^2.1.25",
"@titaniumnetwork-dev/ultraviolet": "^3.2.10",
"fastify": "^5.0.0",
"ultraviolet-static": "github:titaniumnetwork-dev/Ultraviolet-Static",
"wisp-server-node": "^1.1.7",
"ws": "^8.18.0"
},
"devDependencies": {
"eslint": "^9.13.0",
"prettier": "^3.3.3"
},
"packageManager": "pnpm@9.12.2"
}
Loading

0 comments on commit 99881ff

Please sign in to comment.