mirror of
https://github.com/makeplane/plane.git
synced 2025-12-16 20:07:56 +01:00
[WEB-4790] fix: moved typescript parser to the base eslint config (#7658)
* fix: moved typescript parser to the base eslint config * fix: eslint warning * fix: type config setting * fix: convert live eslint to cjs
This commit is contained in:
committed by
GitHub
parent
cfe710d492
commit
0e6fbaee3a
12
apps/admin/.eslintignore
Normal file
12
apps/admin/.eslintignore
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
.next/*
|
||||||
|
out/*
|
||||||
|
public/*
|
||||||
|
dist/*
|
||||||
|
node_modules/*
|
||||||
|
.turbo/*
|
||||||
|
.env*
|
||||||
|
.env
|
||||||
|
.env.local
|
||||||
|
.env.development
|
||||||
|
.env.production
|
||||||
|
.env.test
|
||||||
@@ -1,5 +1,4 @@
|
|||||||
module.exports = {
|
module.exports = {
|
||||||
root: true,
|
root: true,
|
||||||
extends: ["@plane/eslint-config/next.js"],
|
extends: ["@plane/eslint-config/next.js"],
|
||||||
parser: "@typescript-eslint/parser",
|
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import { useInstance } from "@/hooks/store";
|
|||||||
// components
|
// components
|
||||||
import { InstanceEmailForm } from "./email-config-form";
|
import { InstanceEmailForm } from "./email-config-form";
|
||||||
|
|
||||||
const InstanceEmailPage = observer(() => {
|
const InstanceEmailPage: React.FC = observer(() => {
|
||||||
// store
|
// store
|
||||||
const { fetchInstanceConfigurations, formattedConfig, disableEmail } = useInstance();
|
const { fetchInstanceConfigurations, formattedConfig, disableEmail } = useInstance();
|
||||||
|
|
||||||
@@ -29,7 +29,7 @@ const InstanceEmailPage = observer(() => {
|
|||||||
message: "Email feature has been disabled",
|
message: "Email feature has been disabled",
|
||||||
type: TOAST_TYPE.SUCCESS,
|
type: TOAST_TYPE.SUCCESS,
|
||||||
});
|
});
|
||||||
} catch (error) {
|
} catch (_error) {
|
||||||
setToast({
|
setToast({
|
||||||
title: "Error disabling email",
|
title: "Error disabling email",
|
||||||
message: "Failed to disable email feature. Please try again.",
|
message: "Failed to disable email feature. Please try again.",
|
||||||
|
|||||||
@@ -25,9 +25,8 @@ export const EmailCodesConfiguration: React.FC<Props> = observer((props) => {
|
|||||||
<ToggleSwitch
|
<ToggleSwitch
|
||||||
value={Boolean(parseInt(enableMagicLogin))}
|
value={Boolean(parseInt(enableMagicLogin))}
|
||||||
onChange={() => {
|
onChange={() => {
|
||||||
Boolean(parseInt(enableMagicLogin)) === true
|
const newEnableMagicLogin = Boolean(parseInt(enableMagicLogin)) === true ? "0" : "1";
|
||||||
? updateConfig("ENABLE_MAGIC_LINK_LOGIN", "0")
|
updateConfig("ENABLE_MAGIC_LINK_LOGIN", newEnableMagicLogin);
|
||||||
: updateConfig("ENABLE_MAGIC_LINK_LOGIN", "1");
|
|
||||||
}}
|
}}
|
||||||
size="sm"
|
size="sm"
|
||||||
disabled={disabled}
|
disabled={disabled}
|
||||||
|
|||||||
@@ -35,9 +35,8 @@ export const GithubConfiguration: React.FC<Props> = observer((props) => {
|
|||||||
<ToggleSwitch
|
<ToggleSwitch
|
||||||
value={Boolean(parseInt(enableGithubConfig))}
|
value={Boolean(parseInt(enableGithubConfig))}
|
||||||
onChange={() => {
|
onChange={() => {
|
||||||
Boolean(parseInt(enableGithubConfig)) === true
|
const newEnableGithubConfig = Boolean(parseInt(enableGithubConfig)) === true ? "0" : "1";
|
||||||
? updateConfig("IS_GITHUB_ENABLED", "0")
|
updateConfig("IS_GITHUB_ENABLED", newEnableGithubConfig);
|
||||||
: updateConfig("IS_GITHUB_ENABLED", "1");
|
|
||||||
}}
|
}}
|
||||||
size="sm"
|
size="sm"
|
||||||
disabled={disabled}
|
disabled={disabled}
|
||||||
|
|||||||
@@ -35,9 +35,8 @@ export const GitlabConfiguration: React.FC<Props> = observer((props) => {
|
|||||||
<ToggleSwitch
|
<ToggleSwitch
|
||||||
value={Boolean(parseInt(enableGitlabConfig))}
|
value={Boolean(parseInt(enableGitlabConfig))}
|
||||||
onChange={() => {
|
onChange={() => {
|
||||||
Boolean(parseInt(enableGitlabConfig)) === true
|
const newEnableGitlabConfig = Boolean(parseInt(enableGitlabConfig)) === true ? "0" : "1";
|
||||||
? updateConfig("IS_GITLAB_ENABLED", "0")
|
updateConfig("IS_GITLAB_ENABLED", newEnableGitlabConfig);
|
||||||
: updateConfig("IS_GITLAB_ENABLED", "1");
|
|
||||||
}}
|
}}
|
||||||
size="sm"
|
size="sm"
|
||||||
disabled={disabled}
|
disabled={disabled}
|
||||||
|
|||||||
@@ -35,9 +35,8 @@ export const GoogleConfiguration: React.FC<Props> = observer((props) => {
|
|||||||
<ToggleSwitch
|
<ToggleSwitch
|
||||||
value={Boolean(parseInt(enableGoogleConfig))}
|
value={Boolean(parseInt(enableGoogleConfig))}
|
||||||
onChange={() => {
|
onChange={() => {
|
||||||
Boolean(parseInt(enableGoogleConfig)) === true
|
const newEnableGoogleConfig = Boolean(parseInt(enableGoogleConfig)) === true ? "0" : "1";
|
||||||
? updateConfig("IS_GOOGLE_ENABLED", "0")
|
updateConfig("IS_GOOGLE_ENABLED", newEnableGoogleConfig);
|
||||||
: updateConfig("IS_GOOGLE_ENABLED", "1");
|
|
||||||
}}
|
}}
|
||||||
size="sm"
|
size="sm"
|
||||||
disabled={disabled}
|
disabled={disabled}
|
||||||
|
|||||||
@@ -25,9 +25,8 @@ export const PasswordLoginConfiguration: React.FC<Props> = observer((props) => {
|
|||||||
<ToggleSwitch
|
<ToggleSwitch
|
||||||
value={Boolean(parseInt(enableEmailPassword))}
|
value={Boolean(parseInt(enableEmailPassword))}
|
||||||
onChange={() => {
|
onChange={() => {
|
||||||
Boolean(parseInt(enableEmailPassword)) === true
|
const newEnableEmailPassword = Boolean(parseInt(enableEmailPassword)) === true ? "0" : "1";
|
||||||
? updateConfig("ENABLE_EMAIL_PASSWORD", "0")
|
updateConfig("ENABLE_EMAIL_PASSWORD", newEnableEmailPassword);
|
||||||
: updateConfig("ENABLE_EMAIL_PASSWORD", "1");
|
|
||||||
}}
|
}}
|
||||||
size="sm"
|
size="sm"
|
||||||
disabled={disabled}
|
disabled={disabled}
|
||||||
|
|||||||
@@ -209,7 +209,7 @@ export class InstanceStore implements IInstanceStore {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
await this.instanceService.disableEmail();
|
await this.instanceService.disableEmail();
|
||||||
} catch (error) {
|
} catch (_error) {
|
||||||
console.error("Error disabling the email");
|
console.error("Error disabling the email");
|
||||||
this.instanceConfigurations = instanceConfigurations;
|
this.instanceConfigurations = instanceConfigurations;
|
||||||
}
|
}
|
||||||
|
|||||||
4
apps/live/.eslintrc.cjs
Normal file
4
apps/live/.eslintrc.cjs
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
module.exports = {
|
||||||
|
root: true,
|
||||||
|
extends: ["@plane/eslint-config/server.js"],
|
||||||
|
};
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
{
|
|
||||||
"root": true,
|
|
||||||
"extends": ["@plane/eslint-config/server.js"],
|
|
||||||
"parser": "@typescript-eslint/parser"
|
|
||||||
}
|
|
||||||
@@ -1,20 +1,17 @@
|
|||||||
// Third-party libraries
|
|
||||||
import { Redis } from "ioredis";
|
|
||||||
// Hocuspocus extensions and core
|
|
||||||
import { Database } from "@hocuspocus/extension-database";
|
import { Database } from "@hocuspocus/extension-database";
|
||||||
import { Extension } from "@hocuspocus/server";
|
|
||||||
import { Logger } from "@hocuspocus/extension-logger";
|
import { Logger } from "@hocuspocus/extension-logger";
|
||||||
import { Redis as HocusPocusRedis } from "@hocuspocus/extension-redis";
|
import { Redis as HocusPocusRedis } from "@hocuspocus/extension-redis";
|
||||||
|
import { Extension } from "@hocuspocus/server";
|
||||||
|
import { Redis } from "ioredis";
|
||||||
// core helpers and utilities
|
// core helpers and utilities
|
||||||
import { manualLogger } from "@/core/helpers/logger.js";
|
import { manualLogger } from "@/core/helpers/logger.js";
|
||||||
import { getRedisUrl } from "@/core/lib/utils/redis-url.js";
|
|
||||||
// core libraries
|
// core libraries
|
||||||
import { fetchPageDescriptionBinary, updatePageDescription } from "@/core/lib/page.js";
|
import { fetchPageDescriptionBinary, updatePageDescription } from "@/core/lib/page.js";
|
||||||
|
import { getRedisUrl } from "@/core/lib/utils/redis-url.js";
|
||||||
|
import { type HocusPocusServerContext, type TDocumentTypes } from "@/core/types/common.js";
|
||||||
// plane live libraries
|
// plane live libraries
|
||||||
import { fetchDocument } from "@/plane-live/lib/fetch-document.js";
|
import { fetchDocument } from "@/plane-live/lib/fetch-document.js";
|
||||||
import { updateDocument } from "@/plane-live/lib/update-document.js";
|
import { updateDocument } from "@/plane-live/lib/update-document.js";
|
||||||
// types
|
|
||||||
import { type HocusPocusServerContext, type TDocumentTypes } from "@/core/types/common.js";
|
|
||||||
|
|
||||||
export const getExtensions: () => Promise<Extension[]> = async () => {
|
export const getExtensions: () => Promise<Extension[]> = async () => {
|
||||||
const extensions: Extension[] = [
|
const extensions: Extension[] = [
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
import { Server } from "@hocuspocus/server";
|
import { Server } from "@hocuspocus/server";
|
||||||
import { v4 as uuidv4 } from "uuid";
|
import { v4 as uuidv4 } from "uuid";
|
||||||
// lib
|
|
||||||
import { handleAuthentication } from "@/core/lib/authentication.js";
|
|
||||||
// extensions
|
|
||||||
import { getExtensions } from "@/core/extensions/index.js";
|
|
||||||
import { DocumentCollaborativeEvents, TDocumentEventsServer } from "@plane/editor/lib";
|
|
||||||
// editor types
|
// editor types
|
||||||
import { TUserDetails } from "@plane/editor";
|
import { TUserDetails } from "@plane/editor";
|
||||||
|
import { DocumentCollaborativeEvents, TDocumentEventsServer } from "@plane/editor/lib";
|
||||||
|
// extensions
|
||||||
|
import { getExtensions } from "@/core/extensions/index.js";
|
||||||
|
// lib
|
||||||
|
import { handleAuthentication } from "@/core/lib/authentication.js";
|
||||||
// types
|
// types
|
||||||
import { type HocusPocusServerContext } from "@/core/types/common.js";
|
import { type HocusPocusServerContext } from "@/core/types/common.js";
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
// services
|
|
||||||
import { UserService } from "@/core/services/user.service.js";
|
|
||||||
// core helpers
|
// core helpers
|
||||||
import { manualLogger } from "@/core/helpers/logger.js";
|
import { manualLogger } from "@/core/helpers/logger.js";
|
||||||
|
// services
|
||||||
|
import { UserService } from "@/core/services/user.service.js";
|
||||||
|
|
||||||
const userService = new UserService();
|
const userService = new UserService();
|
||||||
|
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
import compression from "compression";
|
import compression from "compression";
|
||||||
import cors from "cors";
|
import cors from "cors";
|
||||||
import expressWs from "express-ws";
|
|
||||||
import express, { Request, Response } from "express";
|
import express, { Request, Response } from "express";
|
||||||
|
import expressWs from "express-ws";
|
||||||
import helmet from "helmet";
|
import helmet from "helmet";
|
||||||
// hocuspocus server
|
// hocuspocus server
|
||||||
import { getHocusPocusServer } from "@/core/hocuspocus-server.js";
|
|
||||||
// helpers
|
// helpers
|
||||||
import { convertHTMLDocumentToAllFormats } from "@/core/helpers/convert-document.js";
|
import { convertHTMLDocumentToAllFormats } from "@/core/helpers/convert-document.js";
|
||||||
import { logger, manualLogger } from "@/core/helpers/logger.js";
|
import { logger, manualLogger } from "@/core/helpers/logger.js";
|
||||||
|
import { getHocusPocusServer } from "@/core/hocuspocus-server.js";
|
||||||
// types
|
// types
|
||||||
import { TConvertDocumentRequestBody } from "@/core/types/common.js";
|
import { TConvertDocumentRequestBody } from "@/core/types/common.js";
|
||||||
|
|
||||||
|
|||||||
12
apps/space/.eslintignore
Normal file
12
apps/space/.eslintignore
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
.next/*
|
||||||
|
out/*
|
||||||
|
public/*
|
||||||
|
dist/*
|
||||||
|
node_modules/*
|
||||||
|
.turbo/*
|
||||||
|
.env*
|
||||||
|
.env
|
||||||
|
.env.local
|
||||||
|
.env.development
|
||||||
|
.env.production
|
||||||
|
.env.test
|
||||||
@@ -1,6 +1,4 @@
|
|||||||
/** @type {import("eslint").Linter.Config} */
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
root: true,
|
root: true,
|
||||||
extends: ["@plane/eslint-config/next.js"],
|
extends: ["@plane/eslint-config/next.js"],
|
||||||
parser: "@typescript-eslint/parser",
|
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,4 +1,13 @@
|
|||||||
.next/*
|
.next/*
|
||||||
out/*
|
out/*
|
||||||
public/*
|
public/*
|
||||||
core/local-db/worker/wa-sqlite/src/*
|
core/local-db/worker/wa-sqlite/src/*
|
||||||
|
dist/*
|
||||||
|
node_modules/*
|
||||||
|
.turbo/*
|
||||||
|
.env*
|
||||||
|
.env
|
||||||
|
.env.local
|
||||||
|
.env.development
|
||||||
|
.env.production
|
||||||
|
.env.test
|
||||||
@@ -1,6 +1,4 @@
|
|||||||
/** @type {import("eslint").Linter.Config} */
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
root: true,
|
root: true,
|
||||||
extends: ["@plane/eslint-config/next.js"],
|
extends: ["@plane/eslint-config/next.js"],
|
||||||
parser: "@typescript-eslint/parser",
|
|
||||||
};
|
};
|
||||||
|
|||||||
4
packages/constants/.eslintignore
Normal file
4
packages/constants/.eslintignore
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
node_modules
|
||||||
|
build/*
|
||||||
|
dist/*
|
||||||
|
out/*
|
||||||
@@ -1,5 +1,4 @@
|
|||||||
module.exports = {
|
module.exports = {
|
||||||
root: true,
|
root: true,
|
||||||
extends: ["@plane/eslint-config/library.js"],
|
extends: ["@plane/eslint-config/library.js"],
|
||||||
parser: "@typescript-eslint/parser",
|
|
||||||
};
|
};
|
||||||
@@ -1,6 +1,4 @@
|
|||||||
/** @type {import("eslint").Linter.Config} */
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
root: true,
|
root: true,
|
||||||
extends: ["@plane/eslint-config/library.js"],
|
extends: ["@plane/eslint-config/library.js"],
|
||||||
parser: "@typescript-eslint/parser",
|
|
||||||
};
|
};
|
||||||
|
|||||||
4
packages/editor/.eslintignore
Normal file
4
packages/editor/.eslintignore
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
node_modules
|
||||||
|
build/*
|
||||||
|
dist/*
|
||||||
|
out/*
|
||||||
@@ -1,5 +1,4 @@
|
|||||||
module.exports = {
|
module.exports = {
|
||||||
root: true,
|
root: true,
|
||||||
extends: ["@plane/eslint-config/library.js"],
|
extends: ["@plane/eslint-config/library.js"],
|
||||||
parser: "@typescript-eslint/parser",
|
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ const project = resolve(process.cwd(), "tsconfig.json");
|
|||||||
/** @type {import("eslint").Linter.Config} */
|
/** @type {import("eslint").Linter.Config} */
|
||||||
module.exports = {
|
module.exports = {
|
||||||
extends: ["prettier", "plugin:@typescript-eslint/recommended"],
|
extends: ["prettier", "plugin:@typescript-eslint/recommended"],
|
||||||
|
parser: "@typescript-eslint/parser",
|
||||||
plugins: ["react", "react-hooks", "@typescript-eslint", "import"],
|
plugins: ["react", "react-hooks", "@typescript-eslint", "import"],
|
||||||
globals: {
|
globals: {
|
||||||
React: true,
|
React: true,
|
||||||
@@ -43,10 +44,10 @@ module.exports = {
|
|||||||
"@typescript-eslint/no-unused-vars": [
|
"@typescript-eslint/no-unused-vars": [
|
||||||
"warn",
|
"warn",
|
||||||
{
|
{
|
||||||
"argsIgnorePattern": "^_",
|
argsIgnorePattern: "^_",
|
||||||
"varsIgnorePattern": "^_",
|
varsIgnorePattern: "^_",
|
||||||
"caughtErrorsIgnorePattern": "^_"
|
caughtErrorsIgnorePattern: "^_",
|
||||||
}
|
},
|
||||||
],
|
],
|
||||||
"@typescript-eslint/no-explicit-any": "warn",
|
"@typescript-eslint/no-explicit-any": "warn",
|
||||||
"@typescript-eslint/no-useless-empty-export": "error",
|
"@typescript-eslint/no-useless-empty-export": "error",
|
||||||
|
|||||||
@@ -3,6 +3,8 @@ const project = resolve(process.cwd(), "tsconfig.json");
|
|||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
extends: ["next", "prettier", "plugin:@typescript-eslint/recommended"],
|
extends: ["next", "prettier", "plugin:@typescript-eslint/recommended"],
|
||||||
|
parser: "@typescript-eslint/parser",
|
||||||
|
plugins: ["react", "@typescript-eslint", "import"],
|
||||||
globals: {
|
globals: {
|
||||||
React: "readonly",
|
React: "readonly",
|
||||||
JSX: "readonly",
|
JSX: "readonly",
|
||||||
@@ -11,7 +13,6 @@ module.exports = {
|
|||||||
node: true,
|
node: true,
|
||||||
browser: true,
|
browser: true,
|
||||||
},
|
},
|
||||||
plugins: ["react", "@typescript-eslint", "import"],
|
|
||||||
settings: {
|
settings: {
|
||||||
"import/resolver": {
|
"import/resolver": {
|
||||||
typescript: {
|
typescript: {
|
||||||
@@ -42,10 +43,10 @@ module.exports = {
|
|||||||
"@typescript-eslint/no-unused-vars": [
|
"@typescript-eslint/no-unused-vars": [
|
||||||
"warn",
|
"warn",
|
||||||
{
|
{
|
||||||
"argsIgnorePattern": "^_",
|
argsIgnorePattern: "^_",
|
||||||
"varsIgnorePattern": "^_",
|
varsIgnorePattern: "^_",
|
||||||
"caughtErrorsIgnorePattern": "^_"
|
caughtErrorsIgnorePattern: "^_",
|
||||||
}
|
},
|
||||||
],
|
],
|
||||||
"@typescript-eslint/no-explicit-any": "warn",
|
"@typescript-eslint/no-explicit-any": "warn",
|
||||||
"@typescript-eslint/no-useless-empty-export": "error",
|
"@typescript-eslint/no-useless-empty-export": "error",
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ const project = resolve(process.cwd(), "tsconfig.json");
|
|||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
extends: ["prettier", "plugin:@typescript-eslint/recommended"],
|
extends: ["prettier", "plugin:@typescript-eslint/recommended"],
|
||||||
|
parser: "@typescript-eslint/parser",
|
||||||
env: {
|
env: {
|
||||||
node: true,
|
node: true,
|
||||||
es6: true,
|
es6: true,
|
||||||
@@ -25,10 +26,33 @@ module.exports = {
|
|||||||
"@typescript-eslint/no-unused-vars": [
|
"@typescript-eslint/no-unused-vars": [
|
||||||
"warn",
|
"warn",
|
||||||
{
|
{
|
||||||
"argsIgnorePattern": "^_",
|
argsIgnorePattern: "^_",
|
||||||
"varsIgnorePattern": "^_",
|
varsIgnorePattern: "^_",
|
||||||
"caughtErrorsIgnorePattern": "^_"
|
caughtErrorsIgnorePattern: "^_",
|
||||||
}
|
},
|
||||||
],
|
],
|
||||||
}
|
"import/order": [
|
||||||
|
"warn",
|
||||||
|
{
|
||||||
|
groups: ["builtin", "external", "internal", "parent", "sibling"],
|
||||||
|
pathGroups: [
|
||||||
|
{
|
||||||
|
pattern: "@plane/**",
|
||||||
|
group: "external",
|
||||||
|
position: "after",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
pattern: "@/**",
|
||||||
|
group: "internal",
|
||||||
|
position: "before",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
pathGroupsExcludedImportTypes: ["builtin", "internal", "react"],
|
||||||
|
alphabetize: {
|
||||||
|
order: "asc",
|
||||||
|
caseInsensitive: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,6 +1,4 @@
|
|||||||
/** @type {import("eslint").Linter.Config} */
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
root: true,
|
root: true,
|
||||||
extends: ["@plane/eslint-config/library.js"],
|
extends: ["@plane/eslint-config/library.js"],
|
||||||
parser: "@typescript-eslint/parser",
|
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ export const getValueFromLocalStorage = (key: string, defaultValue: any) => {
|
|||||||
try {
|
try {
|
||||||
const item = window.localStorage.getItem(key);
|
const item = window.localStorage.getItem(key);
|
||||||
return item ? JSON.parse(item) : defaultValue;
|
return item ? JSON.parse(item) : defaultValue;
|
||||||
} catch (error) {
|
} catch (_error) {
|
||||||
window.localStorage.removeItem(key);
|
window.localStorage.removeItem(key);
|
||||||
return defaultValue;
|
return defaultValue;
|
||||||
}
|
}
|
||||||
@@ -16,7 +16,7 @@ export const setValueIntoLocalStorage = (key: string, value: any) => {
|
|||||||
try {
|
try {
|
||||||
window.localStorage.setItem(key, JSON.stringify(value));
|
window.localStorage.setItem(key, JSON.stringify(value));
|
||||||
return true;
|
return true;
|
||||||
} catch (error) {
|
} catch (_error) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,9 +1,4 @@
|
|||||||
/** @type {import("eslint").Linter.Config} */
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
root: true,
|
root: true,
|
||||||
extends: ["@plane/eslint-config/library.js"],
|
extends: ["@plane/eslint-config/library.js"],
|
||||||
parser: "@typescript-eslint/parser",
|
|
||||||
parserOptions: {
|
|
||||||
project: true,
|
|
||||||
},
|
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,6 +1,4 @@
|
|||||||
/** @type {import("eslint").Linter.Config} */
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
root: true,
|
root: true,
|
||||||
extends: ["@plane/eslint-config/library.js"],
|
extends: ["@plane/eslint-config/library.js"],
|
||||||
parser: "@typescript-eslint/parser",
|
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,8 +1,6 @@
|
|||||||
/** @type {import("eslint").Linter.Config} */
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
root: true,
|
root: true,
|
||||||
extends: ["@plane/eslint-config/library.js", "plugin:storybook/recommended"],
|
extends: ["@plane/eslint-config/library.js", "plugin:storybook/recommended"],
|
||||||
parser: "@typescript-eslint/parser",
|
|
||||||
rules: {
|
rules: {
|
||||||
"import/order": [
|
"import/order": [
|
||||||
"warn",
|
"warn",
|
||||||
|
|||||||
@@ -1,6 +1,4 @@
|
|||||||
/** @type {import("eslint").Linter.Config} */
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
root: true,
|
root: true,
|
||||||
extends: ["@plane/eslint-config/library.js"],
|
extends: ["@plane/eslint-config/library.js"],
|
||||||
parser: "@typescript-eslint/parser",
|
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,9 +1,4 @@
|
|||||||
/** @type {import("eslint").Linter.Config} */
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
root: true,
|
root: true,
|
||||||
extends: ["@plane/eslint-config/library.js"],
|
extends: ["@plane/eslint-config/library.js"],
|
||||||
parser: "@typescript-eslint/parser",
|
|
||||||
parserOptions: {
|
|
||||||
project: true,
|
|
||||||
},
|
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
module.exports = {
|
module.exports = {
|
||||||
root: true,
|
root: true,
|
||||||
extends: ["@plane/eslint-config/library.js"],
|
extends: ["@plane/eslint-config/library.js"],
|
||||||
parser: "@typescript-eslint/parser",
|
|
||||||
};
|
};
|
||||||
|
|||||||
3
packages/ui/.eslintignore
Normal file
3
packages/ui/.eslintignore
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
build/*
|
||||||
|
dist/*
|
||||||
|
out/*
|
||||||
@@ -1,6 +1,4 @@
|
|||||||
/** @type {import("eslint").Linter.Config} */
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
root: true,
|
root: true,
|
||||||
extends: ["@plane/eslint-config/library.js"],
|
extends: ["@plane/eslint-config/library.js"],
|
||||||
parser: "@typescript-eslint/parser",
|
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ export const AuthForm: React.FC<AuthFormProps> = ({
|
|||||||
});
|
});
|
||||||
|
|
||||||
const [passwordStrength, setPasswordStrength] = useState<E_PASSWORD_STRENGTH>(E_PASSWORD_STRENGTH.EMPTY);
|
const [passwordStrength, setPasswordStrength] = useState<E_PASSWORD_STRENGTH>(E_PASSWORD_STRENGTH.EMPTY);
|
||||||
const [passwordsMatch, setPasswordsMatch] = useState(false);
|
const [_passwordsMatch, setPasswordsMatch] = useState(false);
|
||||||
|
|
||||||
const handleInputChange = (field: keyof AuthFormData) => (e: React.ChangeEvent<HTMLInputElement>) => {
|
const handleInputChange = (field: keyof AuthFormData) => (e: React.ChangeEvent<HTMLInputElement>) => {
|
||||||
setFormData((prev) => ({
|
setFormData((prev) => ({
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ import { cn } from "./utils";
|
|||||||
|
|
||||||
export type CalendarProps = React.ComponentProps<typeof DayPicker>;
|
export type CalendarProps = React.ComponentProps<typeof DayPicker>;
|
||||||
|
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
export const Calendar = ({ className, classNames, showOutsideDays = true, ...props }: CalendarProps) => {
|
export const Calendar = ({ className, classNames, showOutsideDays = true, ...props }: CalendarProps) => {
|
||||||
const currentYear = new Date().getFullYear();
|
const currentYear = new Date().getFullYear();
|
||||||
const thirtyYearsAgoFirstDay = new Date(currentYear - 30, 0, 1);
|
const thirtyYearsAgoFirstDay = new Date(currentYear - 30, 0, 1);
|
||||||
|
|||||||
@@ -1,6 +1,4 @@
|
|||||||
/** @type {import("eslint").Linter.Config} */
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
root: true,
|
root: true,
|
||||||
extends: ["@plane/eslint-config/library.js"],
|
extends: ["@plane/eslint-config/library.js"],
|
||||||
parser: "@typescript-eslint/parser",
|
|
||||||
};
|
};
|
||||||
|
|||||||
20
pnpm-lock.yaml
generated
20
pnpm-lock.yaml
generated
@@ -846,7 +846,7 @@ importers:
|
|||||||
version: 2.31.0(@typescript-eslint/parser@8.40.0(eslint@8.57.1)(typescript@5.8.3))(eslint-import-resolver-typescript@3.10.1)(eslint@8.57.1)
|
version: 2.31.0(@typescript-eslint/parser@8.40.0(eslint@8.57.1)(typescript@5.8.3))(eslint-import-resolver-typescript@3.10.1)(eslint@8.57.1)
|
||||||
eslint-plugin-react:
|
eslint-plugin-react:
|
||||||
specifier: ^7.33.2
|
specifier: ^7.33.2
|
||||||
version: 7.37.5(eslint@8.57.1)
|
version: 7.37.3(eslint@8.57.1)
|
||||||
eslint-plugin-react-hooks:
|
eslint-plugin-react-hooks:
|
||||||
specifier: ^5.2.0
|
specifier: ^5.2.0
|
||||||
version: 5.2.0(eslint@8.57.1)
|
version: 5.2.0(eslint@8.57.1)
|
||||||
@@ -1071,7 +1071,7 @@ importers:
|
|||||||
version: 0.5.16(tailwindcss@3.4.17(ts-node@10.9.2(@swc/core@1.13.3(@swc/helpers@0.5.17))(@types/node@22.17.2)(typescript@5.8.3)))
|
version: 0.5.16(tailwindcss@3.4.17(ts-node@10.9.2(@swc/core@1.13.3(@swc/helpers@0.5.17))(@types/node@22.17.2)(typescript@5.8.3)))
|
||||||
autoprefixer:
|
autoprefixer:
|
||||||
specifier: ^10.4.14
|
specifier: ^10.4.14
|
||||||
version: 10.4.21(postcss@8.5.6)
|
version: 10.4.20(postcss@8.5.6)
|
||||||
postcss:
|
postcss:
|
||||||
specifier: ^8.4.38
|
specifier: ^8.4.38
|
||||||
version: 8.5.6
|
version: 8.5.6
|
||||||
@@ -1243,7 +1243,7 @@ importers:
|
|||||||
version: 18.3.1
|
version: 18.3.1
|
||||||
autoprefixer:
|
autoprefixer:
|
||||||
specifier: ^10.4.19
|
specifier: ^10.4.19
|
||||||
version: 10.4.21(postcss@8.5.6)
|
version: 10.4.20(postcss@8.5.6)
|
||||||
postcss-cli:
|
postcss-cli:
|
||||||
specifier: ^11.0.0
|
specifier: ^11.0.0
|
||||||
version: 11.0.1(jiti@1.21.7)(postcss@8.5.6)
|
version: 11.0.1(jiti@1.21.7)(postcss@8.5.6)
|
||||||
@@ -3865,8 +3865,8 @@ packages:
|
|||||||
peerDependencies:
|
peerDependencies:
|
||||||
postcss: ^8.1.0
|
postcss: ^8.1.0
|
||||||
|
|
||||||
autoprefixer@10.4.21:
|
autoprefixer@10.4.20:
|
||||||
resolution: {integrity: sha512-O+A6LWV5LDHSJD3LjHYoNi4VLsj/Whi7k6zG12xTYaU4cQ8oxQGckXNX8cRHK5yOZ/ppVHe0ZBXGzSV9jXdVbQ==}
|
resolution: {integrity: sha512-XY25y5xSv/wEoqzDyXXME4AFfkZI0P23z6Fs3YgymDnKJkCGOnkL0iTxCa85UTqaSgfcqyf3UA6+c7wUvx/16g==}
|
||||||
engines: {node: ^10 || ^12 || >=14}
|
engines: {node: ^10 || ^12 || >=14}
|
||||||
hasBin: true
|
hasBin: true
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
@@ -4738,8 +4738,8 @@ packages:
|
|||||||
peerDependencies:
|
peerDependencies:
|
||||||
eslint: ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0 || ^9.0.0
|
eslint: ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0 || ^9.0.0
|
||||||
|
|
||||||
eslint-plugin-react@7.37.5:
|
eslint-plugin-react@7.37.3:
|
||||||
resolution: {integrity: sha512-Qteup0SqU15kdocexFNAJMvCJEfa2xUKNV4CC1xsVMrIIqEy3SQ/rqyxCWNzfrd3/ldy6HMlD2e0JDVpDg2qIA==}
|
resolution: {integrity: sha512-DomWuTQPFYZwF/7c9W2fkKkStqZmBd3uugfqBYLdkZ3Hii23WzZuOLUskGxB8qkSKqftxEeGL1TB2kMhrce0jA==}
|
||||||
engines: {node: '>=4'}
|
engines: {node: '>=4'}
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
eslint: ^3 || ^4 || ^5 || ^6 || ^7 || ^8 || ^9.7
|
eslint: ^3 || ^4 || ^5 || ^6 || ^7 || ^8 || ^9.7
|
||||||
@@ -10722,7 +10722,7 @@ snapshots:
|
|||||||
postcss: 8.5.6
|
postcss: 8.5.6
|
||||||
postcss-value-parser: 4.2.0
|
postcss-value-parser: 4.2.0
|
||||||
|
|
||||||
autoprefixer@10.4.21(postcss@8.5.6):
|
autoprefixer@10.4.20(postcss@8.5.6):
|
||||||
dependencies:
|
dependencies:
|
||||||
browserslist: 4.25.2
|
browserslist: 4.25.2
|
||||||
caniuse-lite: 1.0.30001735
|
caniuse-lite: 1.0.30001735
|
||||||
@@ -11607,7 +11607,7 @@ snapshots:
|
|||||||
eslint-import-resolver-typescript: 3.10.1(eslint-plugin-import@2.31.0)(eslint@8.57.1)
|
eslint-import-resolver-typescript: 3.10.1(eslint-plugin-import@2.31.0)(eslint@8.57.1)
|
||||||
eslint-plugin-import: 2.31.0(@typescript-eslint/parser@8.40.0(eslint@8.57.1)(typescript@5.8.3))(eslint-import-resolver-typescript@3.10.1)(eslint@8.57.1)
|
eslint-plugin-import: 2.31.0(@typescript-eslint/parser@8.40.0(eslint@8.57.1)(typescript@5.8.3))(eslint-import-resolver-typescript@3.10.1)(eslint@8.57.1)
|
||||||
eslint-plugin-jsx-a11y: 6.10.2(eslint@8.57.1)
|
eslint-plugin-jsx-a11y: 6.10.2(eslint@8.57.1)
|
||||||
eslint-plugin-react: 7.37.5(eslint@8.57.1)
|
eslint-plugin-react: 7.37.3(eslint@8.57.1)
|
||||||
eslint-plugin-react-hooks: 5.0.0-canary-7118f5dd7-20230705(eslint@8.57.1)
|
eslint-plugin-react-hooks: 5.0.0-canary-7118f5dd7-20230705(eslint@8.57.1)
|
||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
typescript: 5.8.3
|
typescript: 5.8.3
|
||||||
@@ -11715,7 +11715,7 @@ snapshots:
|
|||||||
dependencies:
|
dependencies:
|
||||||
eslint: 8.57.1
|
eslint: 8.57.1
|
||||||
|
|
||||||
eslint-plugin-react@7.37.5(eslint@8.57.1):
|
eslint-plugin-react@7.37.3(eslint@8.57.1):
|
||||||
dependencies:
|
dependencies:
|
||||||
array-includes: 3.1.9
|
array-includes: 3.1.9
|
||||||
array.prototype.findlast: 1.2.5
|
array.prototype.findlast: 1.2.5
|
||||||
|
|||||||
Reference in New Issue
Block a user