From 31695306bfed44409f03006ea717fd2cceff8f87 Mon Sep 17 00:00:00 2001 From: Armand Philippot Date: Mon, 25 Sep 2023 12:33:00 +0200 Subject: build(eslint): improve ESlint rules In my opinion, next/core-web-vitals rules are too loose so I added a custom config to improve code consistency and to enforce best practices. --- next.config.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'next.config.js') diff --git a/next.config.js b/next.config.js index 04802f1..d590934 100644 --- a/next.config.js +++ b/next.config.js @@ -71,9 +71,9 @@ const securityHeaders = [ { key: 'Content-Security-Policy', value: - process.env.NODE_ENV !== 'development' - ? contentSecurityPolicy.replace(/\s{2,}/g, ' ').trim() - : contentSecurityPolicyDev.replace(/\s{2,}/g, ' ').trim(), + process.env.NODE_ENV === 'development' + ? contentSecurityPolicyDev.replace(/\s{2,}/g, ' ').trim() + : contentSecurityPolicy.replace(/\s{2,}/g, ' ').trim(), }, ]; @@ -82,7 +82,7 @@ const nextConfig = { experimental: { scrollRestoration: true, }, - async headers() { + headers() { return [ { // Apply these headers to all routes in your application. @@ -101,7 +101,7 @@ const nextConfig = { output: 'standalone', poweredByHeader: false, reactStrictMode: true, - async rewrites() { + rewrites() { return [ { source: '/feed', -- cgit v1.2.3