Some FIxes
This commit is contained in:
parent
8c37242abd
commit
1c2651382f
7 changed files with 689 additions and 902 deletions
|
|
@ -88,7 +88,7 @@ export default tseslint.config(
|
||||||
"@stylistic/no-extra-semi": "error",
|
"@stylistic/no-extra-semi": "error",
|
||||||
|
|
||||||
// TS Rules
|
// TS Rules
|
||||||
"@/func-call-spacing": ["error", "never"],
|
"@stylistic/func-call-spacing": ["error", "never"],
|
||||||
|
|
||||||
// ESLint Rules
|
// ESLint Rules
|
||||||
"yoda": "error",
|
"yoda": "error",
|
||||||
|
|
|
||||||
64
package.json
64
package.json
|
|
@ -38,11 +38,11 @@
|
||||||
"testTsc": "tsc --noEmit"
|
"testTsc": "tsc --noEmit"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@ffmpeg/ffmpeg": "^0.12.15",
|
"@ffmpeg/ffmpeg": "^0.12.10",
|
||||||
"@ffmpeg/util": "^0.12.2",
|
"@ffmpeg/util": "^0.12.1",
|
||||||
"@intrnl/xxhash64": "^0.1.2",
|
"@intrnl/xxhash64": "^0.1.2",
|
||||||
"@types/less": "^3.0.8",
|
"@types/less": "^3.0.6",
|
||||||
"@types/stylus": "^0.48.43",
|
"@types/stylus": "^0.48.42",
|
||||||
"@types/tinycolor2": "^1.4.6",
|
"@types/tinycolor2": "^1.4.6",
|
||||||
"@vap/core": "0.0.12",
|
"@vap/core": "0.0.12",
|
||||||
"@vap/shiki": "0.10.5",
|
"@vap/shiki": "0.10.5",
|
||||||
|
|
@ -50,51 +50,53 @@
|
||||||
"gifenc": "github:mattdesl/gifenc#64842fca317b112a8590f8fef2bf3825da8f6fe3",
|
"gifenc": "github:mattdesl/gifenc#64842fca317b112a8590f8fef2bf3825da8f6fe3",
|
||||||
"idb": "8.0.3",
|
"idb": "8.0.3",
|
||||||
"jsqr": "1.4.0",
|
"jsqr": "1.4.0",
|
||||||
"monaco-editor": "^0.53.0",
|
"monaco-editor": "^0.52.2",
|
||||||
"nanoid": "^5.1.5",
|
"nanoid": "^5.1.5",
|
||||||
"usercss-meta": "^0.12.0",
|
"usercss-meta": "^0.12.0",
|
||||||
"virtual-merge": "^1.0.2"
|
"virtual-merge": "^1.0.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@electron/asar": "^4.0.1",
|
"@electron/asar": "^4.0.1",
|
||||||
"@stylistic/eslint-plugin": "^5.3.1",
|
"@stylistic/eslint-plugin": "^4.2.0",
|
||||||
"@types/adm-zip": "^0.5.7",
|
"@types/adm-zip": "^0.5.7",
|
||||||
"@types/chrome": "^0.1.9",
|
"@types/chrome": "^0.0.312",
|
||||||
"@types/lodash": "^4.17.20",
|
"@types/diff": "^7.0.2",
|
||||||
"@types/node": "^24.3.1",
|
"@types/lodash": "^4.17.14",
|
||||||
"@types/react": "^19.1.12",
|
"@types/node": "^22.13.13",
|
||||||
"@types/react-dom": "^19.1.9",
|
"@types/react": "^19.0.10",
|
||||||
"@types/yazl": "^3.3.0",
|
"@types/react-dom": "^19.0.4",
|
||||||
|
"@types/yazl": "^2.4.5",
|
||||||
"@vencord/discord-types": "link:packages/discord-types",
|
"@vencord/discord-types": "link:packages/discord-types",
|
||||||
"adm-zip": "^0.5.16",
|
"adm-zip": "^0.5.16",
|
||||||
"diff": "^8.0.2",
|
"diff": "^7.0.0",
|
||||||
"esbuild": "^0.25.9",
|
"esbuild": "^0.25.1",
|
||||||
"eslint": "9.35.0",
|
"eslint": "9.20.1",
|
||||||
"eslint-import-resolver-alias": "^1.1.2",
|
"eslint-import-resolver-alias": "^1.1.2",
|
||||||
"eslint-plugin-react": "^7.37.5",
|
"eslint-plugin-react": "^7.37.3",
|
||||||
"eslint-plugin-simple-header": "^1.2.2",
|
"eslint-plugin-simple-header": "^1.2.1",
|
||||||
"eslint-plugin-simple-import-sort": "^12.1.1",
|
"eslint-plugin-simple-import-sort": "^12.1.1",
|
||||||
"eslint-plugin-unused-imports": "^4.2.0",
|
"eslint-plugin-unused-imports": "^4.1.4",
|
||||||
"highlight.js": "11.11.1",
|
"highlight.js": "11.11.1",
|
||||||
"html-minifier-terser": "^7.2.0",
|
"html-minifier-terser": "^7.2.0",
|
||||||
"moment": "^2.30.1",
|
"moment": "^2.22.2",
|
||||||
"puppeteer-core": "^24.19.0",
|
"puppeteer-core": "^24.4.0",
|
||||||
"standalone-electron-types": "^34.2.0",
|
"standalone-electron-types": "^34.2.0",
|
||||||
"stylelint": "^16.24.0",
|
"stylelint": "^16.17.0",
|
||||||
"stylelint-config-standard": "^39.0.0",
|
"stylelint-config-standard": "^37.0.0",
|
||||||
"ts-patch": "^3.3.0",
|
"ts-patch": "^3.3.0",
|
||||||
"ts-pattern": "^5.8.0",
|
"ts-pattern": "^5.6.0",
|
||||||
"tsx": "^4.20.5",
|
"tsx": "^4.19.3",
|
||||||
"type-fest": "^4.41.0",
|
"type-fest": "^4.38.0",
|
||||||
"typescript": "^5.9.2",
|
"typescript": "^5.8.2",
|
||||||
"typescript-eslint": "^8.43.0",
|
"typescript-eslint": "^8.28.0",
|
||||||
"typescript-transform-paths": "^3.5.5"
|
"typescript-transform-paths": "^3.5.5",
|
||||||
|
"zip-local": "^0.3.5"
|
||||||
},
|
},
|
||||||
"packageManager": "pnpm@10.14.0",
|
"packageManager": "pnpm@10.14.0",
|
||||||
"pnpm": {
|
"pnpm": {
|
||||||
"patchedDependencies": {
|
"patchedDependencies": {
|
||||||
"eslint@9.35.0": "patches/eslint@9.35.0.patch",
|
"eslint@9.20.1": "patches/eslint@9.20.1.patch",
|
||||||
"@types/less@3.0.8": "patches/@types__less@3.0.8.patch"
|
"@types/less@3.0.6": "patches/@types__less@3.0.6.patch"
|
||||||
},
|
},
|
||||||
"peerDependencyRules": {
|
"peerDependencyRules": {
|
||||||
"ignoreMissing": [
|
"ignoreMissing": [
|
||||||
|
|
|
||||||
49
patches/eslint@9.20.1.patch
Normal file
49
patches/eslint@9.20.1.patch
Normal file
|
|
@ -0,0 +1,49 @@
|
||||||
|
diff --git a/lib/rules/no-useless-escape.js b/lib/rules/no-useless-escape.js
|
||||||
|
index 0e0f6f09f2c35f3276173c08f832cde9f2cf56a0..7dc22851715f3574d935f513c1b5e35552985711 100644
|
||||||
|
--- a/lib/rules/no-useless-escape.js
|
||||||
|
+++ b/lib/rules/no-useless-escape.js
|
||||||
|
@@ -65,13 +65,31 @@ module.exports = {
|
||||||
|
escapeBackslash: "Replace the `\\` with `\\\\` to include the actual backslash character."
|
||||||
|
},
|
||||||
|
|
||||||
|
- schema: []
|
||||||
|
+ schema: [{
|
||||||
|
+ type: "object",
|
||||||
|
+ properties: {
|
||||||
|
+ extra: {
|
||||||
|
+ type: "string",
|
||||||
|
+ default: ""
|
||||||
|
+ },
|
||||||
|
+ extraCharClass: {
|
||||||
|
+ type: "string",
|
||||||
|
+ default: ""
|
||||||
|
+ },
|
||||||
|
+ },
|
||||||
|
+ additionalProperties: false
|
||||||
|
+ }]
|
||||||
|
},
|
||||||
|
|
||||||
|
create(context) {
|
||||||
|
+ const options = context.options[0] || {};
|
||||||
|
+ const { extra, extraCharClass } = options;
|
||||||
|
const sourceCode = context.sourceCode;
|
||||||
|
const parser = new RegExpParser();
|
||||||
|
|
||||||
|
+ const NON_CHARCLASS_ESCAPES = union(REGEX_NON_CHARCLASS_ESCAPES, new Set(extra));
|
||||||
|
+ const CHARCLASS_ESCAPES = union(REGEX_GENERAL_ESCAPES, new Set(extraCharClass));
|
||||||
|
+
|
||||||
|
/**
|
||||||
|
* Reports a node
|
||||||
|
* @param {ASTNode} node The node to report
|
||||||
|
@@ -200,9 +218,9 @@ module.exports = {
|
||||||
|
let allowedEscapes;
|
||||||
|
|
||||||
|
if (characterClassStack.length) {
|
||||||
|
- allowedEscapes = unicodeSets ? REGEX_CLASSSET_CHARACTER_ESCAPES : REGEX_GENERAL_ESCAPES;
|
||||||
|
+ allowedEscapes = unicodeSets ? REGEX_CLASSSET_CHARACTER_ESCAPES : CHARCLASS_ESCAPES;
|
||||||
|
} else {
|
||||||
|
- allowedEscapes = REGEX_NON_CHARCLASS_ESCAPES;
|
||||||
|
+ allowedEscapes = NON_CHARCLASS_ESCAPES;
|
||||||
|
}
|
||||||
|
if (allowedEscapes.has(escapedChar)) {
|
||||||
|
return;
|
||||||
|
|
@ -1,105 +0,0 @@
|
||||||
diff --git a/lib/rules/no-useless-escape.js b/lib/rules/no-useless-escape.js
|
|
||||||
index 480b51597..3e8cdbaf1 100644
|
|
||||||
--- a/lib/rules/no-useless-escape.js
|
|
||||||
+++ b/lib/rules/no-useless-escape.js
|
|
||||||
@@ -95,6 +95,14 @@ module.exports = {
|
|
||||||
},
|
|
||||||
uniqueItems: true,
|
|
||||||
},
|
|
||||||
+ extra: {
|
|
||||||
+ type: "string",
|
|
||||||
+ default: ""
|
|
||||||
+ },
|
|
||||||
+ extraCharClass: {
|
|
||||||
+ type: "string",
|
|
||||||
+ default: ""
|
|
||||||
+ }
|
|
||||||
},
|
|
||||||
additionalProperties: false,
|
|
||||||
},
|
|
||||||
@@ -102,10 +110,15 @@ module.exports = {
|
|
||||||
},
|
|
||||||
|
|
||||||
create(context) {
|
|
||||||
+ const options = context.options[0] || {};
|
|
||||||
+ const { extra, extraCharClass } = options;
|
|
||||||
const sourceCode = context.sourceCode;
|
|
||||||
const [{ allowRegexCharacters }] = context.options;
|
|
||||||
const parser = new RegExpParser();
|
|
||||||
|
|
||||||
+ const NON_CHARCLASS_ESCAPES = union(REGEX_NON_CHARCLASS_ESCAPES, new Set(extra));
|
|
||||||
+ const CHARCLASS_ESCAPES = union(REGEX_GENERAL_ESCAPES, new Set(extraCharClass));
|
|
||||||
+
|
|
||||||
/**
|
|
||||||
* Reports a node
|
|
||||||
* @param {ASTNode} node The node to report
|
|
||||||
@@ -145,16 +158,16 @@ module.exports = {
|
|
||||||
...(disableEscapeBackslashSuggest
|
|
||||||
? []
|
|
||||||
: [
|
|
||||||
- {
|
|
||||||
- messageId: "escapeBackslash",
|
|
||||||
- fix(fixer) {
|
|
||||||
- return fixer.insertTextBeforeRange(
|
|
||||||
- range,
|
|
||||||
- "\\",
|
|
||||||
- );
|
|
||||||
- },
|
|
||||||
+ {
|
|
||||||
+ messageId: "escapeBackslash",
|
|
||||||
+ fix(fixer) {
|
|
||||||
+ return fixer.insertTextBeforeRange(
|
|
||||||
+ range,
|
|
||||||
+ "\\",
|
|
||||||
+ );
|
|
||||||
},
|
|
||||||
- ]),
|
|
||||||
+ },
|
|
||||||
+ ]),
|
|
||||||
],
|
|
||||||
});
|
|
||||||
}
|
|
||||||
@@ -238,7 +251,7 @@ module.exports = {
|
|
||||||
|
|
||||||
if (
|
|
||||||
escapedChar !==
|
|
||||||
- String.fromCodePoint(characterNode.value) ||
|
|
||||||
+ String.fromCodePoint(characterNode.value) ||
|
|
||||||
allowRegexCharacters.includes(escapedChar)
|
|
||||||
) {
|
|
||||||
// It's a valid escape.
|
|
||||||
@@ -247,11 +260,9 @@ module.exports = {
|
|
||||||
let allowedEscapes;
|
|
||||||
|
|
||||||
if (characterClassStack.length) {
|
|
||||||
- allowedEscapes = unicodeSets
|
|
||||||
- ? REGEX_CLASSSET_CHARACTER_ESCAPES
|
|
||||||
- : REGEX_GENERAL_ESCAPES;
|
|
||||||
+ allowedEscapes = unicodeSets ? REGEX_CLASSSET_CHARACTER_ESCAPES : CHARCLASS_ESCAPES;
|
|
||||||
} else {
|
|
||||||
- allowedEscapes = REGEX_NON_CHARCLASS_ESCAPES;
|
|
||||||
+ allowedEscapes = NON_CHARCLASS_ESCAPES;
|
|
||||||
}
|
|
||||||
if (allowedEscapes.has(escapedChar)) {
|
|
||||||
return;
|
|
||||||
@@ -287,9 +298,9 @@ module.exports = {
|
|
||||||
*/
|
|
||||||
if (
|
|
||||||
characterClassNode.start + 1 !==
|
|
||||||
- characterNode.start &&
|
|
||||||
+ characterNode.start &&
|
|
||||||
characterNode.end !==
|
|
||||||
- characterClassNode.end - 1
|
|
||||||
+ characterClassNode.end - 1
|
|
||||||
) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
@@ -334,7 +345,7 @@ module.exports = {
|
|
||||||
|
|
||||||
if (
|
|
||||||
characterNode.parent.type ===
|
|
||||||
- "ClassIntersection" ||
|
|
||||||
+ "ClassIntersection" ||
|
|
||||||
characterNode.parent.type === "ClassSubtraction"
|
|
||||||
) {
|
|
||||||
disableEscapeBackslashSuggest = true;
|
|
||||||
1370
pnpm-lock.yaml
generated
1370
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load diff
|
|
@ -212,7 +212,6 @@ if (!process.argv.includes("--skip-extension")) {
|
||||||
firefoxZip.addLocalFolder("dist/browser/firefox-unpacked");
|
firefoxZip.addLocalFolder("dist/browser/firefox-unpacked");
|
||||||
firefoxZip.writeZip(path.resolve("dist/extension-firefox.zip"));
|
firefoxZip.writeZip(path.resolve("dist/extension-firefox.zip"));
|
||||||
console.info("Packed Firefox Extension written to dist/extension-firefox.zip");
|
console.info("Packed Firefox Extension written to dist/extension-firefox.zip");
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
await appendCssRuntime;
|
await appendCssRuntime;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue