plan/react-rewrite #1
+1
-1
@@ -162,7 +162,7 @@ export default [
|
||||
// window.localStorage / window.sessionStorage: only src/shared/storage.ts
|
||||
{
|
||||
files: ["src/**/*.{ts,tsx}"],
|
||||
ignores: ["src/shared/storage.ts"],
|
||||
ignores: ["src/shared/storage.ts", "src/shared/storage.test.ts"],
|
||||
rules: {
|
||||
"no-restricted-globals": [
|
||||
"error",
|
||||
|
||||
@@ -37,7 +37,7 @@ describe("cspMiddleware", () => {
|
||||
middleware(req, res, vi.fn());
|
||||
const csp = res.headers.get("Content-Security-Policy") ?? "";
|
||||
const match = csp.match(/nonce-([^']+)/);
|
||||
if (match) nonces.push(match[1]!);
|
||||
if (match?.[1]) nonces.push(match[1]);
|
||||
}
|
||||
|
||||
const unique = new Set(nonces);
|
||||
|
||||
Reference in New Issue
Block a user