mirror of
https://github.com/Frooodle/Stirling-PDF.git
synced 2025-09-08 17:51:20 +02:00
Enable ESLint no-useless-escape rule (#4344)
# Description of Changes Enable ESLint [no-useless-escape rule](https://eslint.org/docs/latest/rules/no-useless-escape)
This commit is contained in:
parent
6d3b08d9b6
commit
003285506f
@ -17,7 +17,6 @@ export default defineConfig(
|
|||||||
rules: {
|
rules: {
|
||||||
"no-empty-pattern": "off", // Temporarily disabled until codebase conformant
|
"no-empty-pattern": "off", // Temporarily disabled until codebase conformant
|
||||||
"no-undef": "off", // Temporarily disabled until codebase conformant
|
"no-undef": "off", // Temporarily disabled until codebase conformant
|
||||||
"no-useless-escape": "off", // Temporarily disabled until codebase conformant
|
|
||||||
"no-case-declarations": "off", // Temporarily disabled until codebase conformant
|
"no-case-declarations": "off", // Temporarily disabled until codebase conformant
|
||||||
"prefer-const": "off", // Temporarily disabled until codebase conformant
|
"prefer-const": "off", // Temporarily disabled until codebase conformant
|
||||||
"@typescript-eslint/ban-ts-comment": "off", // Temporarily disabled until codebase conformant
|
"@typescript-eslint/ban-ts-comment": "off", // Temporarily disabled until codebase conformant
|
||||||
|
@ -224,7 +224,7 @@ function getLicenseUrl(licenseType) {
|
|||||||
// Handle complex SPDX expressions like "(MIT AND Zlib)" or "(MIT OR CC0-1.0)"
|
// Handle complex SPDX expressions like "(MIT AND Zlib)" or "(MIT OR CC0-1.0)"
|
||||||
if (licenseType.includes('AND') || licenseType.includes('OR')) {
|
if (licenseType.includes('AND') || licenseType.includes('OR')) {
|
||||||
// Extract the first license from compound expressions for URL
|
// Extract the first license from compound expressions for URL
|
||||||
const match = licenseType.match(/\(?\s*([A-Za-z0-9\-\.]+)/);
|
const match = licenseType.match(/\(?\s*([A-Za-z0-9\-.]+)/);
|
||||||
if (match && licenseUrls[match[1]]) {
|
if (match && licenseUrls[match[1]]) {
|
||||||
return licenseUrls[match[1]];
|
return licenseUrls[match[1]];
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user