mirror of
https://github.com/mickael-kerjean/filestash.git
synced 2025-10-31 01:58:11 +08:00
fix (linter): linter setup
This commit is contained in:
2
Jenkinsfile
vendored
2
Jenkinsfile
vendored
@ -49,7 +49,7 @@ pipeline {
|
||||
// test frontend
|
||||
docker.image("node:20").inside("--user=root") {
|
||||
sh "cd public && npm install"
|
||||
// sh "cd public && npm run lint"
|
||||
sh "cd public && npm run lint"
|
||||
sh "cd public && npm run check"
|
||||
// sh "cd public && npm run test"
|
||||
}
|
||||
|
||||
@ -38,7 +38,7 @@ export async function loadWorker(baseURL, path, opts = {}) {
|
||||
// at application_table.js:58:50
|
||||
let code = await fetch(new URL(path, baseURL)).then((res) => res.text());
|
||||
const importPathRE = new RegExp("import\\s+(?:[^'\";]*?\\s+from\\s+)?[\"']([^\"']+)[\"']", "gm");
|
||||
code = code.replaceAll("import.meta.url", `"${baseURL}"`)
|
||||
code = code.replaceAll("import.meta.url", `"${baseURL}"`);
|
||||
code.matchAll(importPathRE).forEach(([_, path]) => {
|
||||
code = code.replaceAll(path, new URL(path, baseURL));
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user