mirror of
https://github.com/TeamPiped/Piped.git
synced 2026-03-27 19:07:02 +00:00
Upgrade eslint and vite.
This commit is contained in:
@@ -4,4 +4,3 @@ dist/
|
|||||||
.*
|
.*
|
||||||
*.md
|
*.md
|
||||||
!.prettier*
|
!.prettier*
|
||||||
!.eslintrc.cjs
|
|
||||||
|
|||||||
@@ -1,12 +0,0 @@
|
|||||||
module.exports = {
|
|
||||||
root: true,
|
|
||||||
env: {
|
|
||||||
node: true,
|
|
||||||
},
|
|
||||||
extends: ["plugin:vue/vue3-recommended", "eslint:recommended", "@unocss", "plugin:prettier/recommended"],
|
|
||||||
rules: {
|
|
||||||
"vue/no-undef-components": ["error", {
|
|
||||||
ignorePatterns: ["router-link", "router-view", "i18n-t", "ErrorHandler"]
|
|
||||||
}],
|
|
||||||
},
|
|
||||||
};
|
|
||||||
2
.github/workflows/reviewdog.yml
vendored
2
.github/workflows/reviewdog.yml
vendored
@@ -22,4 +22,4 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
reporter: github-pr-review
|
reporter: github-pr-review
|
||||||
eslint_flags: "--ignore-path .gitignore --ext .js,.vue ."
|
eslint_flags: "."
|
||||||
|
|||||||
42
eslint.config.js
Normal file
42
eslint.config.js
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
import js from "@eslint/js";
|
||||||
|
import unoConfig from "@unocss/eslint-config/flat";
|
||||||
|
import { defineConfig } from "eslint/config";
|
||||||
|
import prettierRecommended from "eslint-plugin-prettier/recommended";
|
||||||
|
import vue from "eslint-plugin-vue";
|
||||||
|
import globals from "globals";
|
||||||
|
|
||||||
|
export default defineConfig([
|
||||||
|
{
|
||||||
|
ignores: ["**/.*", "node_modules/**", "dist/**", "dist-ci/**"],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
files: ["**/*.{js,mjs,cjs,vue}"],
|
||||||
|
languageOptions: {
|
||||||
|
ecmaVersion: "latest",
|
||||||
|
sourceType: "module",
|
||||||
|
globals: {
|
||||||
|
...globals.browser,
|
||||||
|
...globals.node,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
...js.configs.recommended,
|
||||||
|
files: ["**/*.{js,mjs,cjs,vue}"],
|
||||||
|
},
|
||||||
|
...vue.configs["flat/recommended"],
|
||||||
|
{
|
||||||
|
...unoConfig,
|
||||||
|
files: ["**/*.{js,mjs,cjs,vue}"],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
files: ["**/*.vue"],
|
||||||
|
rules: {
|
||||||
|
"no-useless-assignment": "off",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
...prettierRecommended,
|
||||||
|
files: ["**/*.{js,mjs,cjs,vue}"],
|
||||||
|
},
|
||||||
|
]);
|
||||||
15
package.json
15
package.json
@@ -8,7 +8,7 @@
|
|||||||
"build": "vite build",
|
"build": "vite build",
|
||||||
"preview": "vite preview",
|
"preview": "vite preview",
|
||||||
"format": "prettier -w --ignore-path .gitignore **/**.{js,vue,json}",
|
"format": "prettier -w --ignore-path .gitignore **/**.{js,vue,json}",
|
||||||
"lint": "eslint --fix --color --ignore-path .gitignore --ext .js,.vue ."
|
"lint": "eslint --fix --color ."
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"dompurify": "3.3.3",
|
"dompurify": "3.3.3",
|
||||||
@@ -17,13 +17,14 @@
|
|||||||
"javascript-time-ago": "2.6.4",
|
"javascript-time-ago": "2.6.4",
|
||||||
"linkify-html": "4.3.2",
|
"linkify-html": "4.3.2",
|
||||||
"linkifyjs": "4.3.2",
|
"linkifyjs": "4.3.2",
|
||||||
"qrcode": "^1.5.3",
|
"qrcode": "^1.5.4",
|
||||||
"shaka-player": "5.0.8",
|
"shaka-player": "5.0.8",
|
||||||
"vue": "3.5.31",
|
"vue": "3.5.31",
|
||||||
"vue-i18n": "11.3.0",
|
"vue-i18n": "11.3.0",
|
||||||
"vue-router": "5.0.4"
|
"vue-router": "5.0.4"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
"@eslint/js": "10.0.1",
|
||||||
"@iconify-json/fa6-brands": "1.2.6",
|
"@iconify-json/fa6-brands": "1.2.6",
|
||||||
"@iconify-json/fa6-solid": "1.2.4",
|
"@iconify-json/fa6-solid": "1.2.4",
|
||||||
"@intlify/unplugin-vue-i18n": "11.1.1",
|
"@intlify/unplugin-vue-i18n": "11.1.1",
|
||||||
@@ -34,19 +35,21 @@
|
|||||||
"@unocss/reset": "66.4.1",
|
"@unocss/reset": "66.4.1",
|
||||||
"@unocss/transformer-directives": "66.4.1",
|
"@unocss/transformer-directives": "66.4.1",
|
||||||
"@unocss/transformer-variant-group": "66.4.1",
|
"@unocss/transformer-variant-group": "66.4.1",
|
||||||
"@vitejs/plugin-legacy": "7.2.1",
|
"@vitejs/plugin-legacy": "8.0.1",
|
||||||
"@vitejs/plugin-vue": "6.0.5",
|
"@vitejs/plugin-vue": "6.0.5",
|
||||||
"@vue/compiler-sfc": "3.5.31",
|
"@vue/compiler-sfc": "3.5.31",
|
||||||
"eslint": "8.57.1",
|
"eslint": "10.1.0",
|
||||||
"eslint-config-prettier": "10.1.8",
|
"eslint-config-prettier": "10.1.8",
|
||||||
"eslint-plugin-prettier": "5.5.5",
|
"eslint-plugin-prettier": "5.5.5",
|
||||||
"eslint-plugin-vue": "9.33.0",
|
"eslint-plugin-vue": "10.8.0",
|
||||||
|
"globals": "17.4.0",
|
||||||
"lightningcss": "1.32.0",
|
"lightningcss": "1.32.0",
|
||||||
"prettier": "3.8.1",
|
"prettier": "3.8.1",
|
||||||
"unocss": "66.4.1",
|
"unocss": "66.4.1",
|
||||||
"vite": "7.3.1",
|
"vite": "8.0.3",
|
||||||
"vite-plugin-eslint": "1.8.1",
|
"vite-plugin-eslint": "1.8.1",
|
||||||
"vite-plugin-pwa": "1.2.0",
|
"vite-plugin-pwa": "1.2.0",
|
||||||
|
"vue-eslint-parser": "10.3.0",
|
||||||
"workbox-window": "7.4.0"
|
"workbox-window": "7.4.0"
|
||||||
},
|
},
|
||||||
"browserslist": [
|
"browserslist": [
|
||||||
|
|||||||
1071
pnpm-lock.yaml
generated
1071
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@@ -170,7 +170,7 @@ function importSubscriptionsLocally(newChannels) {
|
|||||||
subs.sort();
|
subs.sort();
|
||||||
try {
|
try {
|
||||||
localStorage.setItem("localSubscriptions", JSON.stringify(subs));
|
localStorage.setItem("localSubscriptions", JSON.stringify(subs));
|
||||||
} catch (e) {
|
} catch {
|
||||||
alert(t("info.local_storage"));
|
alert(t("info.local_storage"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -600,7 +600,7 @@ onMounted(async () => {
|
|||||||
countryMap.value = await import(`../utils/CountryMaps/${selectedLanguage.value}.json`).then(
|
countryMap.value = await import(`../utils/CountryMaps/${selectedLanguage.value}.json`).then(
|
||||||
val => val.default,
|
val => val.default,
|
||||||
);
|
);
|
||||||
} catch (e) {
|
} catch {
|
||||||
console.error("Countries not translated into " + selectedLanguage.value);
|
console.error("Countries not translated into " + selectedLanguage.value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -105,7 +105,7 @@ async function copyURL(mytext) {
|
|||||||
try {
|
try {
|
||||||
await navigator.clipboard.writeText(mytext);
|
await navigator.clipboard.writeText(mytext);
|
||||||
alert(t("info.copied"));
|
alert(t("info.copied"));
|
||||||
} catch ($e) {
|
} catch {
|
||||||
alert(t("info.cannot_copy"));
|
alert(t("info.cannot_copy"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -181,7 +181,7 @@ function setSpeedFromInput() {
|
|||||||
try {
|
try {
|
||||||
const newSpeed = Number(playbackSpeedInput.value);
|
const newSpeed = Number(playbackSpeedInput.value);
|
||||||
adjustPlaybackSpeed(newSpeed);
|
adjustPlaybackSpeed(newSpeed);
|
||||||
} catch (err) {
|
} catch {
|
||||||
alert(t("actions.invalid_input"));
|
alert(t("actions.invalid_input"));
|
||||||
}
|
}
|
||||||
showSpeedModal.value = false;
|
showSpeedModal.value = false;
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
/* eslint-disable no-console */
|
|
||||||
|
|
||||||
import { registerSW } from "virtual:pwa-register";
|
import { registerSW } from "virtual:pwa-register";
|
||||||
|
|
||||||
if (process.env.NODE_ENV === "production") {
|
if (process.env.NODE_ENV === "production") {
|
||||||
|
|||||||
Reference in New Issue
Block a user