From d4ee785c31c5815cee15a36fb23eccbe6293c122 Mon Sep 17 00:00:00 2001
From: crazywoola
Date: Tue, 30 May 2023 10:25:12 +0800
Subject: [PATCH] fix: config file lint error
---
web/.vscode/settings.json | 4 +++-
web/middleware.ts | 5 +++--
web/next.config.js | 12 ++++++------
web/sentry.client.config.js | 6 +++---
web/sentry.edge.config.js | 6 +++---
web/sentry.server.config.js | 6 +++---
web/tailwind.config.js | 11 +++++------
7 files changed, 26 insertions(+), 24 deletions(-)
diff --git a/web/.vscode/settings.json b/web/.vscode/settings.json
index 0b5ecc7e77..34b49e2708 100644
--- a/web/.vscode/settings.json
+++ b/web/.vscode/settings.json
@@ -19,5 +19,7 @@
},
"[jsonc]": {
"editor.defaultFormatter": "vscode.json-language-features"
- }
+ },
+ "typescript.tsdk": "node_modules/typescript/lib",
+ "typescript.enablePromptUseWorkspaceTsdk": true
}
\ No newline at end of file
diff --git a/web/middleware.ts b/web/middleware.ts
index 39ae80ee76..7d616d0f93 100644
--- a/web/middleware.ts
+++ b/web/middleware.ts
@@ -23,11 +23,12 @@ export const getLocale = (request: NextRequest): Locale => {
}
// match locale
- let matchedLocale:Locale = i18n.defaultLocale
+ let matchedLocale: Locale = i18n.defaultLocale
try {
// If languages is ['*'], Error would happen in match function.
matchedLocale = match(languages, locales, i18n.defaultLocale) as Locale
- } catch(e) {}
+ }
+ catch (e) {}
return matchedLocale
}
diff --git a/web/next.config.js b/web/next.config.js
index f4bb94eddb..3851933bc9 100644
--- a/web/next.config.js
+++ b/web/next.config.js
@@ -1,4 +1,4 @@
-const { withSentryConfig } = require("@sentry/nextjs")
+const { withSentryConfig } = require('@sentry/nextjs')
const withMDX = require('@next/mdx')({
extension: /\.mdx?$/,
@@ -32,7 +32,7 @@ const nextConfig = {
ignoreBuildErrors: true,
},
sentry: {
- hideSourceMaps: true
+ hideSourceMaps: true,
},
async redirects() {
return [
@@ -47,12 +47,12 @@ const nextConfig = {
// https://docs.sentry.io/platforms/javascript/guides/nextjs/manual-setup
const sentryWebpackPluginOptions = {
- org: "perfectworld",
- project: "javascript-nextjs",
+ org: 'perfectworld',
+ project: 'javascript-nextjs',
silent: true, // Suppresses all logs
sourcemaps: {
- assets: "./**",
- ignore: ["./node_modules/**"],
+ assets: './**',
+ ignore: ['./node_modules/**'],
},
// https://github.com/getsentry/sentry-webpack-plugin#options.
diff --git a/web/sentry.client.config.js b/web/sentry.client.config.js
index 2827b49a7b..257704bc09 100644
--- a/web/sentry.client.config.js
+++ b/web/sentry.client.config.js
@@ -1,7 +1,7 @@
-import * as Sentry from "@sentry/nextjs";
+import * as Sentry from '@sentry/nextjs'
Sentry.init({
- dsn: "https://6bf48a450f054d749398c02a61bae343@o4505264807215104.ingest.sentry.io/4505264809115648",
+ dsn: 'https://6bf48a450f054d749398c02a61bae343@o4505264807215104.ingest.sentry.io/4505264809115648',
// Replay may only be enabled for the client-side
integrations: [new Sentry.Replay()],
@@ -20,4 +20,4 @@ Sentry.init({
// Note: if you want to override the automatic release value, do not set a
// `release` value here - use the environment variable `SENTRY_RELEASE`, so
// that it will also get attached to your source maps
-});
\ No newline at end of file
+})
diff --git a/web/sentry.edge.config.js b/web/sentry.edge.config.js
index d923d3fcd4..166610cd4f 100644
--- a/web/sentry.edge.config.js
+++ b/web/sentry.edge.config.js
@@ -1,7 +1,7 @@
-import * as Sentry from "@sentry/nextjs";
+import * as Sentry from '@sentry/nextjs'
Sentry.init({
- dsn: "https://6bf48a450f054d749398c02a61bae343@o4505264807215104.ingest.sentry.io/4505264809115648",
+ dsn: 'https://6bf48a450f054d749398c02a61bae343@o4505264807215104.ingest.sentry.io/4505264809115648',
// Set tracesSampleRate to 1.0 to capture 100%
// of transactions for performance monitoring.
@@ -13,4 +13,4 @@ Sentry.init({
// Note: if you want to override the automatic release value, do not set a
// `release` value here - use the environment variable `SENTRY_RELEASE`, so
// that it will also get attached to your source maps
-});
\ No newline at end of file
+})
diff --git a/web/sentry.server.config.js b/web/sentry.server.config.js
index 78bee0116f..f82445b07e 100644
--- a/web/sentry.server.config.js
+++ b/web/sentry.server.config.js
@@ -1,10 +1,10 @@
-import * as Sentry from "@sentry/nextjs";
+import * as Sentry from '@sentry/nextjs'
Sentry.init({
- dsn: "https://6bf48a450f054d749398c02a61bae343@o4505264807215104.ingest.sentry.io/4505264809115648",
+ dsn: 'https://6bf48a450f054d749398c02a61bae343@o4505264807215104.ingest.sentry.io/4505264809115648',
// Set tracesSampleRate to 1.0 to capture 100%
// of transactions for performance monitoring.
// We recommend adjusting this value in production
tracesSampleRate: 1.0,
-});
\ No newline at end of file
+})
diff --git a/web/tailwind.config.js b/web/tailwind.config.js
index 72bb550360..32a5339d61 100644
--- a/web/tailwind.config.js
+++ b/web/tailwind.config.js
@@ -50,21 +50,20 @@ module.exports = {
indigo: {
25: '#F5F8FF',
100: '#E0EAFF',
- 600: '#444CE7'
- }
+ 600: '#444CE7',
+ },
},
screens: {
- 'mobile': '100px',
+ mobile: '100px',
// => @media (min-width: 100px) { ... }
- 'tablet': '640px', // 391
+ tablet: '640px', // 391
// => @media (min-width: 600px) { ... }
- 'pc': '769px',
+ pc: '769px',
// => @media (min-width: 769px) { ... }
},
},
},
plugins: [
require('@tailwindcss/typography'),
- require('@tailwindcss/line-clamp'),
],
}