fix: eslint (#8185)

Co-authored-by: Prateek Shourya <prateekshourya29@gmail.com>
This commit is contained in:
Aaron
2025-12-05 17:33:51 +07:00
committed by GitHub
parent 82c970ac4b
commit 85d90030cf
138 changed files with 5054 additions and 4747 deletions

View File

@@ -43,6 +43,9 @@ jobs:
- name: Install dependencies - name: Install dependencies
run: pnpm install --frozen-lockfile run: pnpm install --frozen-lockfile
- name: Build Affected
run: pnpm turbo run build --affected
- name: Lint Affected - name: Lint Affected
run: pnpm turbo run check:lint --affected run: pnpm turbo run check:lint --affected
@@ -51,6 +54,3 @@ jobs:
- name: Check Affected types - name: Check Affected types
run: pnpm turbo run check:types --affected run: pnpm turbo run check:types --affected
- name: Build Affected
run: pnpm turbo run build --affected

1
.husky/pre-commit Normal file
View File

@@ -0,0 +1 @@
pnpm lint-staged

75
.npmrc
View File

@@ -1,34 +1,59 @@
# Enforce pnpm workspace behavior and allow Turbo's lifecycle hooks if scripts are disabled # ------------------------------
# This repo uses pnpm with workspaces. # Core Workspace Behavior
# ------------------------------
# Prefer linking local workspace packages when available # Always prefer using local workspace packages when available
prefer-workspace-packages=true prefer-workspace-packages = true
link-workspace-packages=true
shared-workspace-lockfile=true
# Make peer installs smoother across the monorepo # Symlink workspace packages instead of duplicating them
auto-install-peers=true link-workspace-packages = true
strict-peer-dependencies=false
# If scripts are disabled (e.g., CI with --ignore-scripts), allowlisted packages can still run their hooks # Use a single lockfile across the whole monorepo
# Turbo occasionally performs postinstall tasks for optimal performance shared-workspace-lockfile = true
# moved to pnpm-workspace.yaml: onlyBuiltDependencies (e.g., allow turbo)
public-hoist-pattern[]=*eslint* # Ensure packages added from workspace save using workspace: protocol
public-hoist-pattern[]=prettier save-workspace-protocol = true
public-hoist-pattern[]=typescript
# Reproducible installs across CI and dev
prefer-frozen-lockfile=true
# Prefer resolving to highest versions in monorepo to reduce duplication # ------------------------------
resolution-mode=highest # Dependency Resolution
# ------------------------------
# Speed up native module builds by caching side effects # Choose the highest compatible version across the workspace
side-effects-cache=true # → reduces fragmentation & node_modules bloat
resolution-mode = highest
# Speed up local dev by reusing local store when possible # Automatically install peer dependencies instead of forcing every package to declare them
prefer-offline=true auto-install-peers = true
# Ensure workspace protocol is used when adding internal deps # Don't break the install if peers are missing
save-workspace-protocol=true strict-peer-dependencies = false
# ------------------------------
# Performance Optimizations
# ------------------------------
# Use cached artifacts for native modules (sharp, esbuild, etc.)
side-effects-cache = true
# Prefer local cached packages rather than hitting network
prefer-offline = true
# In CI, refuse to modify lockfile (prevents drift)
prefer-frozen-lockfile = true
# Use isolated linker (best compatibility with Node ecosystem tools)
node-linker = isolated
# ------------------------------
# Hoisting Strategy
# ------------------------------
# Hoist commonly used tools to the root to prevent duplicates and speed up resolution
public-hoist-pattern[] = typescript
public-hoist-pattern[] = eslint
public-hoist-pattern[] = *@plane/*
public-hoist-pattern[] = vite
public-hoist-pattern[] = turbo

10
.prettierignore Normal file
View File

@@ -0,0 +1,10 @@
.next/
.react-router/
.turbo/
.vite/
build/
dist/
node_modules/
out/
pnpm-lock.yaml
storybook-static/

View File

@@ -1,6 +1,15 @@
{ {
"$schema": "https://json.schemastore.org/prettierrc",
"overrides": [
{
"files": ["packages/codemods/**/*"],
"options": {
"printWidth": 80
}
}
],
"plugins": ["@prettier/plugin-oxc"],
"printWidth": 120, "printWidth": 120,
"tabWidth": 2, "tabWidth": 2,
"trailingComma": "es5", "trailingComma": "es5"
"plugins": ["@prettier/plugin-oxc"]
} }

1
CODEOWNERS Normal file
View File

@@ -0,0 +1 @@
eslint.config.mjs @lifeiscontent

View File

@@ -91,7 +91,7 @@ If you would like to _implement_ it, an issue with your proposal must be submitt
To ensure consistency throughout the source code, please keep these rules in mind as you are working: To ensure consistency throughout the source code, please keep these rules in mind as you are working:
- All features or bug fixes must be tested by one or more specs (unit-tests). - All features or bug fixes must be tested by one or more specs (unit-tests).
- We use [Eslint default rule guide](https://eslint.org/docs/rules/), with minor changes. An automated formatter is available using prettier. - We lint with [ESLint 9](https://eslint.org/docs/latest/) using the shared `eslint.config.mjs` (type-aware via `typescript-eslint`) and format with [Prettier](https://prettier.io/) using `prettier.config.cjs`.
## Ways to contribute ## Ways to contribute
@@ -187,18 +187,19 @@ Adding a new language involves several steps to ensure it integrates seamlessly
Add the new language to the TLanguage type in the language definitions file: Add the new language to the TLanguage type in the language definitions file:
```ts ```ts
// packages/i18n/src/types/language.ts // packages/i18n/src/types/language.ts
export type TLanguage = "en" | "fr" | "your-lang"; export type TLanguage = "en" | "fr" | "your-lang";
``` ```
1. **Add language configuration** 1. **Add language configuration**
Include the new language in the list of supported languages: Include the new language in the list of supported languages:
```ts ```ts
// packages/i18n/src/constants/language.ts // packages/i18n/src/constants/language.ts
export const SUPPORTED_LANGUAGES: ILanguageOption[] = [ export const SUPPORTED_LANGUAGES: ILanguageOption[] = [
{ label: "English", value: "en" }, { label: "English", value: "en" },
{ label: "Your Language", value: "your-lang" } { label: "Your Language", value: "your-lang" },
]; ];
``` ```
2. **Create translation files** 2. **Create translation files**
@@ -210,6 +211,7 @@ Adding a new language involves several steps to ensure it integrates seamlessly
3. **Update import logic** 3. **Update import logic**
Modify the language import logic to include your new language: Modify the language import logic to include your new language:
```ts ```ts
private importLanguageFile(language: TLanguage): Promise<any> { private importLanguageFile(language: TLanguage): Promise<any> {
switch (language) { switch (language) {

View File

@@ -1,14 +0,0 @@
.next/*
.react-router/*
.vite/*
out/*
public/*
dist/*
node_modules/*
.turbo/*
.env*
.env
.env.local
.env.development
.env.production
.env.test

View File

@@ -1,18 +0,0 @@
module.exports = {
root: true,
extends: ["@plane/eslint-config/next.js"],
ignorePatterns: ["build/**", "dist/**", ".vite/**"],
rules: {
"import/no-duplicates": ["error", { "prefer-inline": false }],
"import/consistent-type-specifier-style": ["error", "prefer-top-level"],
"@typescript-eslint/no-import-type-side-effects": "error",
"@typescript-eslint/consistent-type-imports": [
"error",
{
prefer: "type-imports",
fixStyle: "separate-type-imports",
disallowTypeAnnotations: false,
},
],
},
};

View File

@@ -1,8 +1,10 @@
.next .next/
.react-router .react-router/
.vite .turbo/
.vercel .vite/
.tubro
out/
dist/
build/ build/
dist/
node_modules/
out/
pnpm-lock.yaml
storybook-static/

View File

@@ -1,6 +0,0 @@
{
"printWidth": 120,
"tabWidth": 2,
"trailingComma": "es5",
"plugins": ["@prettier/plugin-oxc"]
}

View File

@@ -11,11 +11,11 @@
"preview": "react-router build && serve -s build/client -l 3001", "preview": "react-router build && serve -s build/client -l 3001",
"start": "serve -s build/client -l 3001", "start": "serve -s build/client -l 3001",
"clean": "rm -rf .turbo && rm -rf .next && rm -rf node_modules && rm -rf dist && rm -rf build", "clean": "rm -rf .turbo && rm -rf .next && rm -rf node_modules && rm -rf dist && rm -rf build",
"check:lint": "eslint . --max-warnings 19", "check:lint": "eslint . --max-warnings=485",
"check:types": "react-router typegen && tsc --noEmit", "check:types": "react-router typegen && tsc --noEmit",
"check:format": "prettier --check \"**/*.{ts,tsx,md,json,css,scss}\"", "check:format": "prettier --check .",
"fix:lint": "eslint . --fix", "fix:lint": "eslint . --fix --max-warnings=485",
"fix:format": "prettier --write \"**/*.{ts,tsx,md,json,css,scss}\"" "fix:format": "prettier --write ."
}, },
"dependencies": { "dependencies": {
"@bprogress/core": "catalog:", "@bprogress/core": "catalog:",
@@ -49,10 +49,8 @@
}, },
"devDependencies": { "devDependencies": {
"@dotenvx/dotenvx": "catalog:", "@dotenvx/dotenvx": "catalog:",
"@plane/eslint-config": "workspace:*",
"@plane/tailwind-config": "workspace:*", "@plane/tailwind-config": "workspace:*",
"@plane/typescript-config": "workspace:*", "@plane/typescript-config": "workspace:*",
"@prettier/plugin-oxc": "0.1.3",
"@react-router/dev": "catalog:", "@react-router/dev": "catalog:",
"@types/lodash-es": "catalog:", "@types/lodash-es": "catalog:",
"@types/node": "catalog:", "@types/node": "catalog:",

View File

@@ -1,2 +1 @@
// eslint-disable-next-line @typescript-eslint/no-require-imports
module.exports = require("@plane/tailwind-config/postcss.config.js"); module.exports = require("@plane/tailwind-config/postcss.config.js");

View File

@@ -1,4 +1,3 @@
/* eslint-disable @typescript-eslint/no-require-imports */
const sharedConfig = require("@plane/tailwind-config/tailwind.config.js"); const sharedConfig = require("@plane/tailwind-config/tailwind.config.js");
module.exports = { module.exports = {

View File

@@ -1,16 +1,21 @@
{ {
"extends": "@plane/typescript-config/react-router.json", "extends": "@plane/typescript-config/react-router.json",
"compilerOptions": { "compilerOptions": {
"baseUrl": ".", "noImplicitOverride": false,
"exactOptionalPropertyTypes": false,
"noUnusedParameters": false,
"noUnusedLocals": false,
"rootDirs": [".", "./.react-router/types"], "rootDirs": [".", "./.react-router/types"],
"types": ["node", "vite/client"], "types": ["vite/client"],
"paths": { "paths": {
"@/app/*": ["app/*"], "package.json": ["./package.json"],
"@/*": ["core/*"], "ce/*": ["./ce/*"],
"@/plane-admin/*": ["ce/*"], "@/app/*": ["./app/*"],
"@/styles/*": ["styles/*"] "@/*": ["./core/*"],
}, "@/plane-admin/*": ["./ce/*"],
"strictNullChecks": true "@/ce/*": ["./ce/*"],
"@/styles/*": ["./styles/*"]
}
}, },
"include": ["**/*", "**/.server/**/*", "**/.client/**/*", ".react-router/types/**/*"], "include": ["**/*", "**/.server/**/*", "**/.client/**/*", ".react-router/types/**/*"],
"exclude": ["node_modules"] "exclude": ["node_modules"]

10
apps/api/.prettierignore Normal file
View File

@@ -0,0 +1,10 @@
.next/
.react-router/
.turbo/
.vite/
build/
dist/
node_modules/
out/
pnpm-lock.yaml
storybook-static/

View File

@@ -1,4 +0,0 @@
.turbo/*
out/*
dist/*
public/*

View File

@@ -1,4 +0,0 @@
module.exports = {
root: true,
extends: ["@plane/eslint-config/server.js"],
};

View File

@@ -1,6 +1,10 @@
.next .next/
.turbo .react-router/
out/ .turbo/
dist/ .vite/
build/ build/
dist/
node_modules/ node_modules/
out/
pnpm-lock.yaml
storybook-static/

View File

@@ -1,6 +0,0 @@
{
"printWidth": 120,
"tabWidth": 2,
"trailingComma": "es5",
"plugins": ["@prettier/plugin-oxc"]
}

View File

@@ -15,11 +15,11 @@
"build": "tsc --noEmit && tsdown", "build": "tsc --noEmit && tsdown",
"dev": "tsdown --watch --onSuccess \"node --env-file=.env .\"", "dev": "tsdown --watch --onSuccess \"node --env-file=.env .\"",
"start": "node --env-file=.env .", "start": "node --env-file=.env .",
"check:lint": "eslint . --max-warnings 10", "check:lint": "eslint . --max-warnings=160",
"check:types": "tsc --noEmit", "check:types": "tsc --noEmit",
"check:format": "prettier --check \"**/*.{ts,tsx,md,json,css,scss}\"", "check:format": "prettier --check .",
"fix:lint": "eslint . --fix", "fix:lint": "eslint . --fix --max-warnings=160",
"fix:format": "prettier --write \"**/*.{ts,tsx,md,json,css,scss}\"", "fix:format": "prettier --write .",
"clean": "rm -rf .turbo && rm -rf .next && rm -rf node_modules && rm -rf dist" "clean": "rm -rf .turbo && rm -rf .next && rm -rf node_modules && rm -rf dist"
}, },
"author": "Plane Software Inc.", "author": "Plane Software Inc.",
@@ -53,9 +53,7 @@
"zod": "^3.25.76" "zod": "^3.25.76"
}, },
"devDependencies": { "devDependencies": {
"@plane/eslint-config": "workspace:*",
"@plane/typescript-config": "workspace:*", "@plane/typescript-config": "workspace:*",
"@prettier/plugin-oxc": "0.1.3",
"@types/compression": "1.8.1", "@types/compression": "1.8.1",
"@types/cors": "^2.8.17", "@types/cors": "^2.8.17",
"@types/express": "4.17.23", "@types/express": "4.17.23",

View File

@@ -1,23 +1,19 @@
{ {
"extends": "@plane/typescript-config/base.json", "extends": "@plane/typescript-config/base.json",
"compilerOptions": { "compilerOptions": {
"outDir": "./dist", "exactOptionalPropertyTypes": false,
"rootDir": ".", "noUnusedParameters": false,
"baseUrl": ".", "noImplicitOverride": false,
"noImplicitReturns": false,
"noUnusedLocals": false,
"paths": { "paths": {
"@/*": ["./src/*"], "@/*": ["./src/*"],
"@/plane-live/*": ["./src/ce/*"] "@/plane-live/*": ["./src/ce/*"]
}, },
"removeComments": true,
"esModuleInterop": true,
"skipLibCheck": true,
"sourceMap": true,
"inlineSources": true,
"experimentalDecorators": true, "experimentalDecorators": true,
"emitDecoratorMetadata": true, "emitDecoratorMetadata": true
"sourceRoot": "/",
"types": ["node"]
}, },
"include": ["src/**/*.ts", "tsdown.config.ts"], "include": ["src"],
"exclude": ["./dist", "./build", "./node_modules", "**/*.d.ts"] "exclude": ["node_modules", "dist"]
} }

View File

@@ -0,0 +1,10 @@
.next/
.react-router/
.turbo/
.vite/
build/
dist/
node_modules/
out/
pnpm-lock.yaml
storybook-static/

View File

@@ -1,14 +0,0 @@
.next/*
.react-router/*
.vite/*
out/*
public/*
dist/*
node_modules/*
.turbo/*
.env*
.env
.env.local
.env.development
.env.production
.env.test

View File

@@ -1,18 +0,0 @@
module.exports = {
root: true,
extends: ["@plane/eslint-config/next.js"],
ignorePatterns: ["build/**", "dist/**", ".vite/**"],
rules: {
"import/no-duplicates": ["error", { "prefer-inline": false }],
"import/consistent-type-specifier-style": ["error", "prefer-top-level"],
"@typescript-eslint/no-import-type-side-effects": "error",
"@typescript-eslint/consistent-type-imports": [
"error",
{
prefer: "type-imports",
fixStyle: "separate-type-imports",
disallowTypeAnnotations: false,
},
],
},
};

View File

@@ -1,9 +1,10 @@
.next .next/
.react-router .react-router/
.vite .turbo/
.vercel .vite/
.tubro
out/
dist/
build/ build/
dist/
node_modules/ node_modules/
out/
pnpm-lock.yaml
storybook-static/

View File

@@ -1,6 +0,0 @@
{
"printWidth": 120,
"tabWidth": 2,
"trailingComma": "es5",
"plugins": ["@prettier/plugin-oxc"]
}

View File

@@ -63,7 +63,6 @@ export const CommentCard = observer(function CommentCard(props: Props) {
<div className="relative flex items-start space-x-3"> <div className="relative flex items-start space-x-3">
<div className="relative px-1"> <div className="relative px-1">
{comment.actor_detail.avatar_url && comment.actor_detail.avatar_url !== "" ? ( {comment.actor_detail.avatar_url && comment.actor_detail.avatar_url !== "" ? (
// eslint-disable-next-line @next/next/no-img-element
<img <img
src={getFileURL(comment.actor_detail.avatar_url)} src={getFileURL(comment.actor_detail.avatar_url)}
alt={ alt={

View File

@@ -10,11 +10,11 @@
"preview": "react-router build && PORT=3002 react-router-serve ./build/server/index.js", "preview": "react-router build && PORT=3002 react-router-serve ./build/server/index.js",
"start": "PORT=3002 react-router-serve ./build/server/index.js", "start": "PORT=3002 react-router-serve ./build/server/index.js",
"clean": "rm -rf .turbo && rm -rf .next && rm -rf .react-router && rm -rf node_modules && rm -rf dist && rm -rf build", "clean": "rm -rf .turbo && rm -rf .next && rm -rf .react-router && rm -rf node_modules && rm -rf dist && rm -rf build",
"check:lint": "eslint . --max-warnings 28", "check:lint": "eslint . --max-warnings=932",
"check:types": "react-router typegen && tsc --noEmit", "check:types": "react-router typegen && tsc --noEmit",
"check:format": "prettier --check \"**/*.{ts,tsx,md,json,css,scss}\"", "check:format": "prettier --check .",
"fix:lint": "eslint . --fix", "fix:lint": "eslint . --fix --max-warnings=932",
"fix:format": "prettier --write \"**/*.{ts,tsx,md,json,css,scss}\"" "fix:format": "prettier --write ."
}, },
"dependencies": { "dependencies": {
"@bprogress/core": "catalog:", "@bprogress/core": "catalog:",
@@ -53,10 +53,8 @@
}, },
"devDependencies": { "devDependencies": {
"@dotenvx/dotenvx": "catalog:", "@dotenvx/dotenvx": "catalog:",
"@plane/eslint-config": "workspace:*",
"@plane/tailwind-config": "workspace:*", "@plane/tailwind-config": "workspace:*",
"@plane/typescript-config": "workspace:*", "@plane/typescript-config": "workspace:*",
"@prettier/plugin-oxc": "0.1.3",
"@react-router/dev": "catalog:", "@react-router/dev": "catalog:",
"@types/lodash-es": "catalog:", "@types/lodash-es": "catalog:",
"@types/node": "catalog:", "@types/node": "catalog:",

View File

@@ -1,2 +1 @@
// eslint-disable-next-line @typescript-eslint/no-require-imports
module.exports = require("@plane/tailwind-config/postcss.config.js"); module.exports = require("@plane/tailwind-config/postcss.config.js");

View File

@@ -1,2 +1 @@
/* eslint-disable @typescript-eslint/no-require-imports */
module.exports = require("@plane/tailwind-config/tailwind.config.js"); module.exports = require("@plane/tailwind-config/tailwind.config.js");

View File

@@ -1,17 +1,22 @@
{ {
"extends": "@plane/typescript-config/react-router.json", "extends": "@plane/typescript-config/react-router.json",
"compilerOptions": { "compilerOptions": {
"baseUrl": ".",
"rootDirs": [".", "./.react-router/types"], "rootDirs": [".", "./.react-router/types"],
"types": ["node", "vite/client"], "types": ["vite/client"],
"paths": { "paths": {
"@/app/*": ["app/*"], "@/app/*": ["./app/*"],
"@/*": ["core/*"], "@/*": ["./core/*"],
"@/helpers/*": ["helpers/*"], "@/helpers/*": ["./helpers/*"],
"@/styles/*": ["styles/*"], "@/styles/*": ["./styles/*"],
"@/plane-web/*": ["ce/*"] "@/plane-web/*": ["./ce/*"],
"ce/*": ["./ce/*"]
}, },
"strictNullChecks": true "strictNullChecks": true,
"noImplicitOverride": false,
"noUnusedLocals": false,
"noImplicitReturns": false,
"exactOptionalPropertyTypes": false,
"noUnusedParameters": false
}, },
"include": ["**/*", "**/.server/**/*", "**/.client/**/*", ".react-router/types/**/*", "additional.d.ts"], "include": ["**/*", "**/.server/**/*", "**/.client/**/*", ".react-router/types/**/*", "additional.d.ts"],
"exclude": ["node_modules"] "exclude": ["node_modules"]

View File

@@ -1,15 +0,0 @@
.next/*
.react-router/*
.vite/*
build/*
out/*
public/*
dist/*
node_modules/*
.turbo/*
.env*
.env
.env.local
.env.development
.env.production
.env.test

View File

@@ -1,18 +0,0 @@
module.exports = {
root: true,
extends: ["@plane/eslint-config/next.js"],
ignorePatterns: ["build/**", "dist/**", ".vite/**"],
rules: {
"import/no-duplicates": ["error", { "prefer-inline": false }],
"import/consistent-type-specifier-style": ["error", "prefer-top-level"],
"@typescript-eslint/no-import-type-side-effects": "error",
"@typescript-eslint/consistent-type-imports": [
"error",
{
prefer: "type-imports",
fixStyle: "separate-type-imports",
disallowTypeAnnotations: false,
},
],
},
};

View File

@@ -1,9 +1,10 @@
.next .next/
.react-router .react-router/
.vite .turbo/
.turbo .vite/
out/
dist/
build/ build/
node_modules dist/
node_modules/
out/
pnpm-lock.yaml pnpm-lock.yaml
storybook-static/

View File

@@ -1,6 +0,0 @@
{
"printWidth": 120,
"tabWidth": 2,
"trailingComma": "es5",
"plugins": ["@prettier/plugin-oxc"]
}

View File

@@ -91,3 +91,5 @@ function ProjectAttributes(props: Props) {
} }
export default ProjectAttributes; export default ProjectAttributes;
export { ProjectAttributes };

View File

@@ -1,4 +1,3 @@
export * from "./empty-states"; export * from "./empty-states";
export * from "./loaders"; export * from "./loaders";
export * from "./recents"; export * from "./recents";
export * from "./empty-states";

View File

@@ -173,3 +173,5 @@ const IntegrationGuide = observer(function IntegrationGuide() {
}); });
export default IntegrationGuide; export default IntegrationGuide;
export { IntegrationGuide };

View File

@@ -1,6 +1,5 @@
export * from "./content"; export * from "./content";
export * from "./title";
export * from "./root";
export * from "./quick-action-button";
export * from "./display-filters"; export * from "./display-filters";
export * from "./content"; export * from "./quick-action-button";
export * from "./root";
export * from "./title";

View File

@@ -1 +1,24 @@
export * from "./requestIdleCallback"; if (typeof window !== "undefined" && window) {
// Add request callback polyfill to browser in case it does not exist
window.requestIdleCallback =
window.requestIdleCallback ??
function (cb) {
const start = Date.now();
return setTimeout(function () {
cb({
didTimeout: false,
timeRemaining: function () {
return Math.max(0, 50 - (Date.now() - start));
},
});
}, 1);
};
window.cancelIdleCallback =
window.cancelIdleCallback ??
function (id) {
clearTimeout(id);
};
}
export {};

View File

@@ -1,24 +0,0 @@
if (typeof window !== "undefined" && window) {
// Add request callback polyfill to browser in case it does not exist
window.requestIdleCallback =
window.requestIdleCallback ??
function (cb) {
const start = Date.now();
return setTimeout(function () {
cb({
didTimeout: false,
timeRemaining: function () {
return Math.max(0, 50 - (Date.now() - start));
},
});
}, 1);
};
window.cancelIdleCallback =
window.cancelIdleCallback ??
function (id) {
clearTimeout(id);
};
}
export {};

View File

@@ -10,11 +10,11 @@
"preview": "react-router build && serve -s build/client -l 3000", "preview": "react-router build && serve -s build/client -l 3000",
"start": "serve -s build/client -l 3000", "start": "serve -s build/client -l 3000",
"clean": "rm -rf .turbo && rm -rf .next && rm -rf .react-router && rm -rf node_modules && rm -rf dist && rm -rf build", "clean": "rm -rf .turbo && rm -rf .next && rm -rf .react-router && rm -rf node_modules && rm -rf dist && rm -rf build",
"check:lint": "eslint . --max-warnings 934", "check:lint": "eslint . --max-warnings=14367",
"check:types": "react-router typegen && tsc --noEmit", "check:types": "react-router typegen && tsc --noEmit",
"check:format": "prettier --check \"**/*.{ts,tsx,md,json,css,scss}\"", "check:format": "prettier --check .",
"fix:lint": "eslint . --fix", "fix:lint": "eslint . --fix --max-warnings=14367",
"fix:format": "prettier --write \"**/*.{ts,tsx,md,json,css,scss}\"" "fix:format": "prettier --write ."
}, },
"dependencies": { "dependencies": {
"@atlaskit/pragmatic-drag-and-drop": "catalog:", "@atlaskit/pragmatic-drag-and-drop": "catalog:",
@@ -77,10 +77,8 @@
}, },
"devDependencies": { "devDependencies": {
"@dotenvx/dotenvx": "catalog:", "@dotenvx/dotenvx": "catalog:",
"@plane/eslint-config": "workspace:*",
"@plane/tailwind-config": "workspace:*", "@plane/tailwind-config": "workspace:*",
"@plane/typescript-config": "workspace:*", "@plane/typescript-config": "workspace:*",
"@prettier/plugin-oxc": "0.1.3",
"@react-router/dev": "catalog:", "@react-router/dev": "catalog:",
"@types/lodash-es": "catalog:", "@types/lodash-es": "catalog:",
"@types/node": "catalog:", "@types/node": "catalog:",

View File

@@ -1,3 +1 @@
// eslint-disable-next-line @typescript-eslint/no-require-imports
module.exports = require("@plane/tailwind-config/postcss.config.js"); module.exports = require("@plane/tailwind-config/postcss.config.js");

View File

@@ -21,9 +21,9 @@ if (!self.define) {
const singleRequire = (uri, parentUri) => { const singleRequire = (uri, parentUri) => {
uri = new URL(uri + ".js", parentUri).href; uri = new URL(uri + ".js", parentUri).href;
return registry[uri] || ( return (
registry[uri] ||
new Promise(resolve => { new Promise((resolve) => {
if ("document" in self) { if ("document" in self) {
const script = document.createElement("script"); const script = document.createElement("script");
script.src = uri; script.src = uri;
@@ -34,9 +34,7 @@ if (!self.define) {
importScripts(uri); importScripts(uri);
resolve(); resolve();
} }
}) }).then(() => {
.then(() => {
let promise = registry[uri]; let promise = registry[uri];
if (!promise) { if (!promise) {
throw new Error(`Module ${uri} didnt register its module`); throw new Error(`Module ${uri} didnt register its module`);
@@ -53,49 +51,52 @@ if (!self.define) {
return; return;
} }
let exports = {}; let exports = {};
const require = depUri => singleRequire(depUri, uri); const require = (depUri) => singleRequire(depUri, uri);
const specialDeps = { const specialDeps = {
module: { uri }, module: { uri },
exports, exports,
require require,
}; };
registry[uri] = Promise.all(depsNames.map( registry[uri] = Promise.all(depsNames.map((depName) => specialDeps[depName] || require(depName))).then((deps) => {
depName => specialDeps[depName] || require(depName)
)).then(deps => {
factory(...deps); factory(...deps);
return exports; return exports;
}); });
}; };
} }
define(['./workbox-9f2f79cf'], (function (workbox) { 'use strict'; define(["./workbox-9f2f79cf"], function (workbox) {
"use strict";
importScripts(); importScripts();
self.skipWaiting(); self.skipWaiting();
workbox.clientsClaim(); workbox.clientsClaim();
workbox.registerRoute("/", new workbox.NetworkFirst({ workbox.registerRoute(
"cacheName": "start-url", "/",
plugins: [{ new workbox.NetworkFirst({
cacheWillUpdate: async ({ cacheName: "start-url",
request, plugins: [
response, {
event, cacheWillUpdate: async ({ request, response, event, state }) => {
state if (response && response.type === "opaqueredirect") {
}) => {
if (response && response.type === 'opaqueredirect') {
return new Response(response.body, { return new Response(response.body, {
status: 200, status: 200,
statusText: 'OK', statusText: "OK",
headers: response.headers headers: response.headers,
}); });
} }
return response; return response;
} },
}] },
}), 'GET'); ],
workbox.registerRoute(/.*/i, new workbox.NetworkOnly({ }),
"cacheName": "dev", "GET"
plugins: [] );
}), 'GET'); workbox.registerRoute(
/.*/i,
})); new workbox.NetworkOnly({
cacheName: "dev",
plugins: [],
}),
"GET"
);
});
//# sourceMappingURL=sw.js.map //# sourceMappingURL=sw.js.map

File diff suppressed because it is too large Load Diff

View File

@@ -1,8 +1,5 @@
/* eslint-disable @typescript-eslint/no-var-requires */
// eslint-disable-next-line @typescript-eslint/no-require-imports
const sharedConfig = require("@plane/tailwind-config/tailwind.config.js"); const sharedConfig = require("@plane/tailwind-config/tailwind.config.js");
module.exports = { module.exports = {
presets: [sharedConfig], presets: [sharedConfig],
}; };

View File

@@ -1,18 +1,24 @@
{ {
"extends": "@plane/typescript-config/react-router.json",
"compilerOptions": { "compilerOptions": {
"baseUrl": ".",
"rootDirs": [".", "./.react-router/types"], "rootDirs": [".", "./.react-router/types"],
"types": ["node", "vite/client"],
"paths": { "paths": {
"@/app/*": ["app/*"], "@/*": ["./core/*"],
"@/*": ["core/*"], "@/app/*": ["./app/*"],
"@/helpers/*": ["helpers/*"], "@/helpers/*": ["./helpers/*"],
"@/styles/*": ["styles/*"], "@/plane-web/*": ["./ce/*"],
"@/plane-web/*": ["ce/*"] "@/styles/*": ["./styles/*"],
"app/*": ["./app/*"],
"package.json": ["./package.json"],
"ce/*": ["./ce/*"]
}, },
"strictNullChecks": true "strictNullChecks": true,
"exactOptionalPropertyTypes": false,
"noUnusedParameters": false,
"noUnusedLocals": false,
"noImplicitReturns": false,
"noImplicitOverride": false,
"types": ["vite/client"]
}, },
"include": ["**/*", "**/.server/**/*", "**/.client/**/*", ".react-router/types/**/*"], "extends": "@plane/typescript-config/react-router.json",
"exclude": ["node_modules"] "include": ["**/*", "**/.server/**/*", "**/.client/**/*", ".react-router/types/**/*"]
} }

165
eslint.config.mjs Normal file
View File

@@ -0,0 +1,165 @@
// @ts-check
import { defineConfig, globalIgnores } from "eslint/config";
import eslint from "@eslint/js";
import tseslint from "typescript-eslint";
import importPlugin from "eslint-plugin-import";
import jsxA11yPlugin from "eslint-plugin-jsx-a11y";
import promisePlugin from "eslint-plugin-promise";
import reactPlugin from "eslint-plugin-react";
import reactHooksPlugin from "eslint-plugin-react-hooks";
import reactRefreshPlugin from "eslint-plugin-react-refresh";
import vitestPlugin from "@vitest/eslint-plugin";
// import storybookPlugin from "eslint-plugin-storybook";
import prettierConfig from "eslint-config-prettier/flat";
import globals from "globals";
export default defineConfig([
globalIgnores([
"**/.cache/**",
"**/.env.*",
"**/.env",
"**/.next/**",
"**/.react-router/**",
"**/.storybook/**",
"**/.turbo/**",
"**/.vite/**",
"**/*.config.{js,mjs,cjs,ts}",
"**/build/**",
"**/coverage/**",
"**/dist/**",
"**/node_modules/**",
"**/public/**",
]),
eslint.configs.recommended,
// @ts-expect-error promise plugin has no flat type definitions
promisePlugin.configs["flat/recommended"],
reactPlugin.configs.flat.recommended,
reactPlugin.configs.flat["jsx-runtime"],
reactHooksPlugin.configs.flat.recommended,
jsxA11yPlugin.flatConfigs.recommended,
reactRefreshPlugin.configs.recommended,
reactRefreshPlugin.configs.vite,
tseslint.configs.recommendedTypeChecked,
vitestPlugin.configs.recommended,
// TODO: enable storybook linting once issues are resolved
// storybookPlugin.configs["flat/recommended"],
{
settings: {
react: {
version: "detect",
},
},
languageOptions: {
parserOptions: {
ecmaFeatures: {
jsx: true,
},
// @ts-ignore
tsconfigRootDir: import.meta.dirname,
projectService: true,
},
},
rules: {
"@typescript-eslint/await-thenable": "warn",
"@typescript-eslint/no-base-to-string": "warn",
"@typescript-eslint/no-duplicate-type-constituents": "warn",
"@typescript-eslint/no-explicit-any": "warn",
"@typescript-eslint/no-floating-promises": "warn",
"@typescript-eslint/no-for-in-array": "warn",
"@typescript-eslint/no-misused-promises": "warn",
"@typescript-eslint/no-redundant-type-constituents": "warn",
"@typescript-eslint/no-unnecessary-type-assertion": "warn",
"@typescript-eslint/no-unsafe-argument": "warn",
"@typescript-eslint/no-unsafe-assignment": "warn",
"@typescript-eslint/no-unsafe-call": "warn",
"@typescript-eslint/no-unsafe-enum-comparison": "warn",
"@typescript-eslint/no-unsafe-member-access": "warn",
"@typescript-eslint/no-unsafe-return": "warn",
"@typescript-eslint/no-unused-expressions": "warn",
"@typescript-eslint/no-unused-vars": "warn",
"@typescript-eslint/only-throw-error": "warn",
"@typescript-eslint/prefer-promise-reject-errors": "warn",
"@typescript-eslint/require-await": "warn",
"@typescript-eslint/restrict-plus-operands": "warn",
"@typescript-eslint/restrict-template-expressions": "warn",
"@typescript-eslint/unbound-method": "warn",
"jsdoc/require-jsdoc": "off",
"jsx-a11y/alt-text": "warn",
"jsx-a11y/anchor-is-valid": "warn",
"jsx-a11y/click-events-have-key-events": "warn",
"jsx-a11y/iframe-has-title": "warn",
"jsx-a11y/img-redundant-alt": "warn",
"jsx-a11y/interactive-supports-focus": "warn",
"jsx-a11y/label-has-associated-control": "warn",
"jsx-a11y/mouse-events-have-key-events": "warn",
"jsx-a11y/no-autofocus": "warn",
"jsx-a11y/no-noninteractive-element-interactions": "warn",
"jsx-a11y/no-noninteractive-element-to-interactive-role": "warn",
"jsx-a11y/no-noninteractive-tabindex": "warn",
"jsx-a11y/no-redundant-roles": "warn",
"jsx-a11y/no-static-element-interactions": "warn",
"jsx-a11y/tabindex-no-positive": "warn",
"no-cond-assign": "warn",
"no-constant-binary-expression": "warn",
"no-empty-pattern": "warn",
"no-empty": "warn",
"no-extra-boolean-cast": "warn",
"no-prototype-builtins": "warn",
"no-unsafe-optional-chaining": "warn",
"no-useless-catch": "warn",
"no-useless-escape": "warn",
"promise/always-return": "warn",
"promise/catch-or-return": "warn",
"promise/param-names": "warn",
"react-hooks/immutability": "warn",
"react-hooks/preserve-manual-memoization": "warn",
"react-hooks/purity": "warn",
"react-hooks/refs": "warn",
"react-hooks/rules-of-hooks": "warn",
"react-hooks/set-state-in-effect": "warn",
"react-hooks/static-components": "warn",
"react-refresh/only-export-components": "warn",
"react/display-name": "warn",
"react/jsx-no-target-blank": "warn",
"react/no-unknown-property": "warn",
"react/prop-types": "off",
"valid-typeof": "warn",
},
},
{
files: ["**/*.{ts,tsx}"],
extends: [importPlugin.flatConfigs.recommended, importPlugin.flatConfigs.typescript],
settings: {
"import/ignore": ["next/link", "next/navigation", "next/script"],
"import/resolver": {
typescript: {
alwaysTryTypes: true,
project: "{apps,packages}/*/tsconfig.json",
},
},
"import/internal-regex": "^@plane/",
},
rules: {
"import/no-unresolved": ["error", { ignore: ["next/link", "next/navigation", "next/script"] }],
},
},
{
files: ["**/*.{js,mjs,cjs,jsx}"],
extends: [tseslint.configs.disableTypeChecked],
},
{
files: ["**/*.cjs"],
languageOptions: {
globals: {
...globals.node,
},
},
rules: {
"@typescript-eslint/no-require-imports": "off",
},
},
prettierConfig,
]);

View File

@@ -12,15 +12,43 @@
"clean": "turbo run clean && rm -rf .turbo && rm -rf .next && rm -rf node_modules && rm -rf dist", "clean": "turbo run clean && rm -rf .turbo && rm -rf .next && rm -rf node_modules && rm -rf dist",
"fix": "turbo run fix", "fix": "turbo run fix",
"fix:format": "turbo run fix:format", "fix:format": "turbo run fix:format",
"fix:lint": "turbo run fix:lint",
"check": "turbo run check", "check": "turbo run check",
"check:lint": "turbo run check:lint", "check:lint": "turbo run check:lint",
"check:format": "turbo run check:format", "check:format": "turbo run check:format",
"check:types": "turbo run check:types" "check:types": "turbo run check:types",
"prepare": "husky"
}, },
"devDependencies": { "devDependencies": {
"@eslint/js": "9.39.1",
"@prettier/plugin-oxc": "0.1.3", "@prettier/plugin-oxc": "0.1.3",
"prettier": "^3.7.3", "@vitest/eslint-plugin": "1.5.0",
"turbo": "2.6.1" "eslint": "9.39.1",
"eslint-config-prettier": "10.1.8",
"eslint-import-resolver-node": "0.3.9",
"eslint-import-resolver-typescript": "4.4.4",
"eslint-plugin-import": "2.32.0",
"eslint-plugin-jsx-a11y": "6.10.2",
"eslint-plugin-n": "17.23.1",
"eslint-plugin-promise": "7.2.1",
"eslint-plugin-react": "7.37.5",
"eslint-plugin-react-hooks": "7.0.1",
"eslint-plugin-react-refresh": "0.4.24",
"eslint-plugin-storybook": "10.0.8",
"globals": "16.5.0",
"husky": "9.1.7",
"lint-staged": "16.2.7",
"prettier": "3.7.3",
"turbo": "2.6.1",
"typescript-eslint": "8.48.0"
},
"lint-staged": {
"*.{js,jsx,ts,tsx,cjs,mjs,cts,mts,json,css,md}": [
"pnpm exec prettier --write --ignore-unknown"
],
"*.{js,jsx,ts,tsx,cjs,mjs,cts,mts}": [
"pnpm exec eslint --fix --max-warnings=0 --no-warn-ignored"
]
}, },
"pnpm": { "pnpm": {
"overrides": { "overrides": {

View File

@@ -0,0 +1,10 @@
.next/
.react-router/
.turbo/
.vite/
build/
dist/
node_modules/
out/
pnpm-lock.yaml
storybook-static/

View File

@@ -1,5 +0,0 @@
{
"printWidth": 80,
"tabWidth": 2,
"trailingComma": "es5"
}

View File

@@ -1,4 +0,0 @@
node_modules
build/*
dist/*
out/*

View File

@@ -1,4 +0,0 @@
module.exports = {
root: true,
extends: ["@plane/eslint-config/library.js"],
};

View File

@@ -1,5 +1,10 @@
.next .next/
.turbo .react-router/
out/ .turbo/
dist/ .vite/
build/ build/
dist/
node_modules/
out/
pnpm-lock.yaml
storybook-static/

View File

@@ -1,6 +0,0 @@
{
"printWidth": 120,
"tabWidth": 2,
"trailingComma": "es5",
"plugins": ["@prettier/plugin-oxc"]
}

View File

@@ -7,20 +7,18 @@
"scripts": { "scripts": {
"dev": "tsdown --watch", "dev": "tsdown --watch",
"build": "tsdown", "build": "tsdown",
"check:lint": "eslint . --max-warnings 0", "check:lint": "eslint . --max-warnings=30",
"check:types": "tsc --noEmit", "check:types": "tsc --noEmit",
"check:format": "prettier --check \"**/*.{ts,tsx,md,json,css,scss}\"", "check:format": "prettier --check .",
"fix:lint": "eslint . --fix", "fix:lint": "eslint . --fix --max-warnings=30",
"fix:format": "prettier --write \"**/*.{ts,tsx,md,json,css,scss}\"", "fix:format": "prettier --write .",
"clean": "rm -rf .turbo && rm -rf .next && rm -rf node_modules && rm -rf dist" "clean": "rm -rf .turbo && rm -rf .next && rm -rf node_modules && rm -rf dist"
}, },
"dependencies": { "dependencies": {
"@plane/types": "workspace:*" "@plane/types": "workspace:*"
}, },
"devDependencies": { "devDependencies": {
"@plane/eslint-config": "workspace:*",
"@plane/typescript-config": "workspace:*", "@plane/typescript-config": "workspace:*",
"@prettier/plugin-oxc": "0.1.3",
"@types/node": "catalog:", "@types/node": "catalog:",
"@types/react": "catalog:", "@types/react": "catalog:",
"tsdown": "catalog:", "tsdown": "catalog:",

View File

@@ -1,4 +0,0 @@
node_modules
build/*
dist/*
out/*

View File

@@ -1,4 +0,0 @@
module.exports = {
root: true,
extends: ["@plane/eslint-config/library.js"],
};

View File

@@ -1,2 +1,10 @@
# Ignore generated build artifacts .next/
.react-router/
.turbo/
.vite/
build/
dist/ dist/
node_modules/
out/
pnpm-lock.yaml
storybook-static/

View File

@@ -1,6 +0,0 @@
{
"printWidth": 120,
"tabWidth": 2,
"trailingComma": "es5",
"plugins": ["@prettier/plugin-oxc"]
}

View File

@@ -12,17 +12,15 @@
"scripts": { "scripts": {
"build": "tsdown", "build": "tsdown",
"dev": "tsdown --watch", "dev": "tsdown --watch",
"check:lint": "eslint . --max-warnings 2", "check:lint": "eslint . --max-warnings=29",
"check:types": "tsc --noEmit", "check:types": "tsc --noEmit",
"check:format": "prettier --check \"**/*.{ts,tsx,md,json,css,scss}\"", "check:format": "prettier --check .",
"fix:lint": "eslint . --fix", "fix:lint": "eslint . --fix --max-warnings=29",
"fix:format": "prettier --write \"**/*.{ts,tsx,md,json,css,scss}\"", "fix:format": "prettier --write .",
"clean": "rm -rf .turbo && rm -rf .next && rm -rf node_modules && rm -rf dist" "clean": "rm -rf .turbo && rm -rf .next && rm -rf node_modules && rm -rf dist"
}, },
"devDependencies": { "devDependencies": {
"@plane/eslint-config": "workspace:*",
"@plane/typescript-config": "workspace:*", "@plane/typescript-config": "workspace:*",
"@prettier/plugin-oxc": "0.1.3",
"@types/express": "4.17.23", "@types/express": "4.17.23",
"@types/node": "catalog:", "@types/node": "catalog:",
"@types/ws": "^8.5.10", "@types/ws": "^8.5.10",

View File

@@ -3,13 +3,10 @@
"compilerOptions": { "compilerOptions": {
"experimentalDecorators": true, "experimentalDecorators": true,
"emitDecoratorMetadata": true, "emitDecoratorMetadata": true,
"lib": ["ES2020"],
"rootDir": ".",
"baseUrl": ".",
"paths": { "paths": {
"@/*": ["./src/*"] "@/*": ["./src/*"]
} }
}, },
"include": ["./src", "./*.ts"], "include": ["src"],
"exclude": ["dist", "build", "node_modules"] "exclude": ["dist", "build", "node_modules"]
} }

View File

@@ -1,4 +0,0 @@
node_modules
build/*
dist/*
out/*

View File

@@ -1,4 +0,0 @@
module.exports = {
root: true,
extends: ["@plane/eslint-config/library.js"],
};

View File

@@ -1,6 +1,10 @@
.next .next/
.vercel .react-router/
.tubro .turbo/
out/ .vite/
dist/
build/ build/
dist/
node_modules/
out/
pnpm-lock.yaml
storybook-static/

View File

@@ -1,6 +0,0 @@
{
"printWidth": 120,
"tabWidth": 2,
"trailingComma": "es5",
"plugins": ["@prettier/plugin-oxc"]
}

View File

@@ -18,11 +18,11 @@
"scripts": { "scripts": {
"build": "tsc && tsdown", "build": "tsc && tsdown",
"dev": "tsdown --watch", "dev": "tsdown --watch",
"check:lint": "eslint . --max-warnings 30", "check:lint": "eslint . --max-warnings=1435",
"check:types": "tsc --noEmit", "check:types": "tsc --noEmit",
"check:format": "prettier --check \"**/*.{ts,tsx,md,json,css,scss}\"", "check:format": "prettier --check .",
"fix:lint": "eslint . --fix", "fix:lint": "eslint . --fix --max-warnings=1435",
"fix:format": "prettier --write \"**/*.{ts,tsx,md,json,css,scss}\"", "fix:format": "prettier --write .",
"clean": "rm -rf .turbo && rm -rf .next && rm -rf node_modules && rm -rf dist" "clean": "rm -rf .turbo && rm -rf .next && rm -rf node_modules && rm -rf dist"
}, },
"peerDependencies": { "peerDependencies": {
@@ -77,10 +77,8 @@
"yjs": "^13.6.20" "yjs": "^13.6.20"
}, },
"devDependencies": { "devDependencies": {
"@plane/eslint-config": "workspace:*",
"@plane/tailwind-config": "workspace:*", "@plane/tailwind-config": "workspace:*",
"@plane/typescript-config": "workspace:*", "@plane/typescript-config": "workspace:*",
"@prettier/plugin-oxc": "0.1.3",
"@types/node": "catalog:", "@types/node": "catalog:",
"@types/react": "catalog:", "@types/react": "catalog:",
"@types/react-dom": "catalog:", "@types/react-dom": "catalog:",

View File

@@ -1,11 +1,15 @@
{ {
"extends": "@plane/typescript-config/react-library.json", "extends": "@plane/typescript-config/react-library.json",
"compilerOptions": { "compilerOptions": {
"baseUrl": ".", "exactOptionalPropertyTypes": false,
"noImplicitReturns": false,
"noUnusedLocals": false,
"noUnusedParameters": false,
"paths": { "paths": {
"src/*": ["./src/*"],
"@/*": ["./src/core/*"], "@/*": ["./src/core/*"],
"@/styles/*": ["./src/styles/*"], "@/plane-editor/*": ["./src/ce/*"],
"@/plane-editor/*": ["./src/ce/*"] "@/styles/*": ["./src/styles/*"]
} }
}, },
"include": ["src/**/*", "index.d.ts"], "include": ["src/**/*", "index.d.ts"],

View File

@@ -0,0 +1,10 @@
.next/
.react-router/
.turbo/
.vite/
build/
dist/
node_modules/
out/
pnpm-lock.yaml
storybook-static/

View File

@@ -1,92 +0,0 @@
const { resolve } = require("node:path");
const project = resolve(process.cwd(), "tsconfig.json");
/** @type {import("eslint").Linter.Config} */
module.exports = {
extends: ["prettier", "plugin:@typescript-eslint/recommended"],
parser: "@typescript-eslint/parser",
plugins: ["react", "react-hooks", "@typescript-eslint", "import"],
globals: {
React: true,
JSX: true,
},
env: {
node: true,
browser: true,
},
settings: {
"import/resolver": {
typescript: {
project,
},
},
},
rules: {
"no-useless-escape": "off",
"prefer-const": "error",
"no-irregular-whitespace": "error",
"no-trailing-spaces": "error",
"import/no-duplicates": ["error", { considerQueryString: true }],
"no-useless-catch": "warn",
"no-case-declarations": "error",
"no-undef": "error",
"no-unreachable": "error",
"arrow-body-style": ["error", "as-needed"],
"@next/next/no-html-link-for-pages": "off",
"@next/next/no-img-element": "off",
"react/jsx-key": "error",
"react/self-closing-comp": ["error", { component: true, html: true }],
"react/jsx-boolean-value": "error",
"react/jsx-no-duplicate-props": "error",
"react-hooks/exhaustive-deps": "warn",
"import/consistent-type-specifier-style": ["error", "prefer-top-level"],
"@typescript-eslint/no-import-type-side-effects": "error",
"@typescript-eslint/consistent-type-imports": [
"error",
{
prefer: "type-imports",
fixStyle: "separate-type-imports",
disallowTypeAnnotations: false,
},
],
"@typescript-eslint/no-unused-expressions": "warn",
"@typescript-eslint/no-unused-vars": [
"warn",
{
argsIgnorePattern: "^_",
varsIgnorePattern: "^_",
caughtErrorsIgnorePattern: "^_",
},
],
"@typescript-eslint/no-explicit-any": "warn",
"@typescript-eslint/no-useless-empty-export": "error",
"@typescript-eslint/prefer-ts-expect-error": "warn",
"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,
},
},
],
},
ignorePatterns: [".*.js", "node_modules/", "dist/"],
};

View File

@@ -1,116 +0,0 @@
const { resolve } = require("node:path");
const project = resolve(process.cwd(), "tsconfig.json");
module.exports = {
extends: ["next", "prettier", "plugin:@typescript-eslint/recommended"],
parser: "@typescript-eslint/parser",
plugins: ["react", "@typescript-eslint", "import"],
globals: {
React: "readonly",
JSX: "readonly",
},
env: {
node: true,
browser: true,
},
settings: {
"import/resolver": {
typescript: {
project,
},
},
},
ignorePatterns: [".*.js", "node_modules/"],
rules: {
"no-useless-escape": "off",
"prefer-const": "error",
"no-irregular-whitespace": "error",
"no-trailing-spaces": "error",
"import/no-duplicates": ["error", { considerQueryString: true }],
"no-useless-catch": "warn",
"no-case-declarations": "error",
"no-undef": "error",
"no-unreachable": "error",
"arrow-body-style": ["error", "as-needed"],
"@next/next/no-html-link-for-pages": "off",
"@next/next/no-img-element": "off",
"react/jsx-key": "error",
"react/self-closing-comp": ["error", { component: true, html: true }],
"react/jsx-boolean-value": "error",
"react/jsx-no-duplicate-props": "error",
"react-hooks/exhaustive-deps": "warn",
"import/consistent-type-specifier-style": ["error", "prefer-top-level"],
"@typescript-eslint/no-import-type-side-effects": "error",
"@typescript-eslint/consistent-type-imports": [
"error",
{
prefer: "type-imports",
fixStyle: "separate-type-imports",
disallowTypeAnnotations: false,
},
],
"@typescript-eslint/no-unused-expressions": "warn",
"@typescript-eslint/no-unused-vars": [
"warn",
{
argsIgnorePattern: "^_",
varsIgnorePattern: "^_",
caughtErrorsIgnorePattern: "^_",
},
],
"@typescript-eslint/no-explicit-any": "warn",
"@typescript-eslint/no-useless-empty-export": "error",
"@typescript-eslint/prefer-ts-expect-error": "warn",
"@typescript-eslint/naming-convention": [
"warn",
{
selector: "variable",
format: ["camelCase", "snake_case", "UPPER_CASE", "PascalCase"],
leadingUnderscore: "allow",
},
],
"import/order": [
"warn",
{
groups: ["builtin", "external", "internal", "parent", "sibling"],
pathGroups: [
{
pattern: "react",
group: "external",
position: "before",
},
{
pattern: "lucide-react",
group: "external",
position: "after",
},
{
pattern: "@headlessui/**",
group: "external",
position: "after",
},
{
pattern: "@plane/**",
group: "external",
position: "after",
},
{
pattern: "@/**",
group: "internal",
},
{
pattern: "public/**",
group: "internal",
position: "after",
},
],
pathGroupsExcludedImportTypes: ["builtin", "internal", "react"],
alphabetize: {
order: "asc",
caseInsensitive: true,
},
},
],
},
};

View File

@@ -1,23 +0,0 @@
{
"name": "@plane/eslint-config",
"private": true,
"version": "1.1.0",
"license": "AGPL-3.0",
"files": [
"library.js",
"next.js",
"server.js"
],
"devDependencies": {
"@typescript-eslint/eslint-plugin": "^8.45.0",
"@typescript-eslint/parser": "^8.45.0",
"eslint": "8.57.1",
"eslint-config-next": "^14.1.0",
"eslint-config-prettier": "^10.1.8",
"eslint-config-turbo": "^2.5.8",
"eslint-plugin-import": "^2.32.0",
"eslint-plugin-react": "^7.37.5",
"eslint-plugin-react-hooks": "^6.1.1",
"typescript": "catalog:"
}
}

View File

@@ -1,69 +0,0 @@
const { resolve } = require("node:path");
const project = resolve(process.cwd(), "tsconfig.json");
module.exports = {
extends: ["prettier", "plugin:@typescript-eslint/recommended"],
parser: "@typescript-eslint/parser",
env: {
node: true,
es6: true,
},
plugins: ["@typescript-eslint", "import"],
settings: {
"import/resolver": {
typescript: {
project,
},
},
},
ignorePatterns: [".*.js", "node_modules/"],
parserOptions: {
ecmaVersion: "latest",
sourceType: "module",
},
rules: {
"@typescript-eslint/no-explicit-any": "warn",
"@typescript-eslint/no-unused-vars": [
"warn",
{
argsIgnorePattern: "^_",
varsIgnorePattern: "^_",
caughtErrorsIgnorePattern: "^_",
},
],
"import/no-duplicates": ["error", { considerQueryString: true }],
"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,
},
},
],
"import/consistent-type-specifier-style": ["error", "prefer-top-level"],
"@typescript-eslint/no-import-type-side-effects": "error",
"@typescript-eslint/consistent-type-imports": [
"error",
{
prefer: "type-imports",
fixStyle: "separate-type-imports",
disallowTypeAnnotations: false,
},
],
},
};

View File

@@ -1,3 +0,0 @@
build/*
dist/*
out/*

View File

@@ -1,4 +0,0 @@
module.exports = {
root: true,
extends: ["@plane/eslint-config/library.js"],
};

View File

@@ -1,4 +1,10 @@
.turbo .next/
out/ .react-router/
dist/ .turbo/
.vite/
build/ build/
dist/
node_modules/
out/
pnpm-lock.yaml
storybook-static/

View File

@@ -1,6 +0,0 @@
{
"printWidth": 120,
"tabWidth": 2,
"trailingComma": "es5",
"plugins": ["@prettier/plugin-oxc"]
}

View File

@@ -15,20 +15,18 @@
"scripts": { "scripts": {
"build": "tsdown", "build": "tsdown",
"dev": "tsdown --watch", "dev": "tsdown --watch",
"check:lint": "eslint . --max-warnings 6", "check:lint": "eslint . --max-warnings=60",
"check:types": "tsc --noEmit", "check:types": "tsc --noEmit",
"check:format": "prettier --check \"**/*.{ts,tsx,md,json,css,scss}\"", "check:format": "prettier --check .",
"fix:lint": "eslint . --fix", "fix:lint": "eslint . --fix --max-warnings=60",
"fix:format": "prettier --write \"**/*.{ts,tsx,md,json,css,scss}\"", "fix:format": "prettier --write .",
"clean": "rm -rf .turbo && rm -rf .next && rm -rf node_modules && rm -rf dist" "clean": "rm -rf .turbo && rm -rf .next && rm -rf node_modules && rm -rf dist"
}, },
"dependencies": { "dependencies": {
"react": "catalog:" "react": "catalog:"
}, },
"devDependencies": { "devDependencies": {
"@plane/eslint-config": "workspace:*",
"@plane/typescript-config": "workspace:*", "@plane/typescript-config": "workspace:*",
"@prettier/plugin-oxc": "0.1.3",
"@types/node": "catalog:", "@types/node": "catalog:",
"@types/react": "catalog:", "@types/react": "catalog:",
"tsdown": "catalog:", "tsdown": "catalog:",

View File

@@ -1,3 +0,0 @@
build/*
dist/*
out/*

View File

@@ -1,4 +0,0 @@
module.exports = {
root: true,
extends: ["@plane/eslint-config/library.js"],
};

View File

@@ -1,7 +1,10 @@
.turbo .next/
out/ .react-router/
dist/ .turbo/
.vite/
build/ build/
.next dist/
.vercel node_modules/
.turbo out/
pnpm-lock.yaml
storybook-static/

View File

@@ -1,6 +0,0 @@
{
"printWidth": 120,
"tabWidth": 2,
"trailingComma": "es5",
"plugins": ["@prettier/plugin-oxc"]
}

View File

@@ -15,11 +15,11 @@
"scripts": { "scripts": {
"dev": "tsdown --watch", "dev": "tsdown --watch",
"build": "tsdown", "build": "tsdown",
"check:lint": "eslint . --max-warnings 2", "check:lint": "eslint . --max-warnings=51",
"check:types": "tsc --noEmit", "check:types": "tsc --noEmit",
"check:format": "prettier --check \"**/*.{ts,tsx,md,json,css,scss}\"", "check:format": "prettier --check .",
"fix:lint": "eslint . --fix", "fix:lint": "eslint . --fix --max-warnings=51",
"fix:format": "prettier --write \"**/*.{ts,tsx,md,json,css,scss}\"", "fix:format": "prettier --write .",
"clean": "rm -rf .turbo && rm -rf .next && rm -rf node_modules && rm -rf dist" "clean": "rm -rf .turbo && rm -rf .next && rm -rf node_modules && rm -rf dist"
}, },
"dependencies": { "dependencies": {
@@ -31,9 +31,7 @@
"react": "catalog:" "react": "catalog:"
}, },
"devDependencies": { "devDependencies": {
"@plane/eslint-config": "workspace:*",
"@plane/typescript-config": "workspace:*", "@plane/typescript-config": "workspace:*",
"@prettier/plugin-oxc": "0.1.3",
"@types/lodash-es": "catalog:", "@types/lodash-es": "catalog:",
"@types/node": "catalog:", "@types/node": "catalog:",
"@types/react": "catalog:", "@types/react": "catalog:",

View File

@@ -1,3 +0,0 @@
build/*
dist/*
out/*

View File

@@ -1,4 +0,0 @@
module.exports = {
root: true,
extends: ["@plane/eslint-config/library.js"],
};

View File

@@ -1,6 +1,10 @@
.next .next/
.vercel .react-router/
.tubro .turbo/
out/ .vite/
dist/
build/ build/
dist/
node_modules/
out/
pnpm-lock.yaml
storybook-static/

View File

@@ -1,6 +0,0 @@
{
"printWidth": 120,
"tabWidth": 2,
"trailingComma": "es5",
"plugins": ["@prettier/plugin-oxc"]
}

View File

@@ -12,11 +12,11 @@
"scripts": { "scripts": {
"build": "tsdown", "build": "tsdown",
"dev": "tsdown --watch", "dev": "tsdown --watch",
"check:lint": "eslint . --max-warnings 0", "check:lint": "eslint . --max-warnings=0",
"check:types": "tsc --noEmit", "check:types": "tsc --noEmit",
"check:format": "prettier --check \"**/*.{ts,tsx,md,json,css,scss}\"", "check:format": "prettier --check .",
"fix:lint": "eslint . --fix", "fix:lint": "eslint . --fix --max-warnings=0",
"fix:format": "prettier --write \"**/*.{ts,tsx,md,json,css,scss}\"", "fix:format": "prettier --write .",
"clean": "rm -rf .turbo && rm -rf .next && rm -rf node_modules && rm -rf dist" "clean": "rm -rf .turbo && rm -rf .next && rm -rf node_modules && rm -rf dist"
}, },
"dependencies": { "dependencies": {
@@ -24,9 +24,7 @@
"winston": "^3.17.0" "winston": "^3.17.0"
}, },
"devDependencies": { "devDependencies": {
"@plane/eslint-config": "workspace:*",
"@plane/typescript-config": "workspace:*", "@plane/typescript-config": "workspace:*",
"@prettier/plugin-oxc": "0.1.3",
"@types/express": "4.17.23", "@types/express": "4.17.23",
"@types/node": "catalog:", "@types/node": "catalog:",
"tsdown": "catalog:", "tsdown": "catalog:",

View File

@@ -1,10 +1,10 @@
{ {
"extends": "@plane/typescript-config/node-library.json", "extends": "@plane/typescript-config/node-library.json",
"compilerOptions": { "compilerOptions": {
"baseUrl": ".",
"paths": { "paths": {
"@/*": ["./src/*"] "@/*": ["./src/*"]
} },
"experimentalDecorators": true
}, },
"include": ["src/**/*"], "include": ["src/**/*"],
"exclude": ["node_modules", "dist"] "exclude": ["node_modules", "dist"]

View File

@@ -1,4 +0,0 @@
build/*
dist/*
out/*
storybook-static/*

View File

@@ -1,29 +0,0 @@
module.exports = {
root: true,
extends: ["@plane/eslint-config/library.js", "plugin:storybook/recommended"],
rules: {
"import/order": [
"warn",
{
groups: ["builtin", "external", "internal", "parent", "sibling"],
pathGroups: [
{
pattern: "react",
group: "external",
position: "before",
},
{
pattern: "@plane/**",
group: "external",
position: "after",
},
],
pathGroupsExcludedImportTypes: ["builtin", "internal", "react"],
alphabetize: {
order: "asc",
caseInsensitive: true,
},
},
],
},
};

View File

@@ -1,5 +1,10 @@
.next .next/
.turbo .react-router/
out/ .turbo/
dist/ .vite/
build/ build/
dist/
node_modules/
out/
pnpm-lock.yaml
storybook-static/

View File

@@ -1,6 +0,0 @@
{
"printWidth": 120,
"tabWidth": 2,
"trailingComma": "es5",
"plugins": ["@prettier/plugin-oxc"]
}

View File

@@ -7,11 +7,11 @@
"scripts": { "scripts": {
"dev": "tsdown --watch", "dev": "tsdown --watch",
"build": "tsdown", "build": "tsdown",
"check:lint": "eslint . --max-warnings 7", "check:lint": "eslint . --max-warnings=1306",
"check:types": "tsc --noEmit", "check:types": "tsc --noEmit",
"check:format": "prettier --check \"**/*.{ts,tsx,md,json,css,scss}\"", "check:format": "prettier --check .",
"fix:lint": "eslint . --fix", "fix:lint": "eslint . --fix --max-warnings=1306",
"fix:format": "prettier --write \"**/*.{ts,tsx,md,json,css,scss}\"", "fix:format": "prettier --write .",
"clean": "rm -rf .turbo && rm -rf .next && rm -rf node_modules && rm -rf dist", "clean": "rm -rf .turbo && rm -rf .next && rm -rf node_modules && rm -rf dist",
"storybook": "storybook dev -p 6006", "storybook": "storybook dev -p 6006",
"build-storybook": "storybook build" "build-storybook": "storybook build"
@@ -81,16 +81,13 @@
"use-font-face-observer": "^1.3.0" "use-font-face-observer": "^1.3.0"
}, },
"devDependencies": { "devDependencies": {
"@plane/eslint-config": "workspace:*",
"@plane/tailwind-config": "workspace:*", "@plane/tailwind-config": "workspace:*",
"@plane/typescript-config": "workspace:*", "@plane/typescript-config": "workspace:*",
"@prettier/plugin-oxc": "0.1.3",
"@storybook/addon-designs": "10.0.2", "@storybook/addon-designs": "10.0.2",
"@storybook/addon-docs": "9.1.10", "@storybook/addon-docs": "9.1.10",
"@storybook/react-vite": "9.1.10", "@storybook/react-vite": "9.1.10",
"@types/react": "catalog:", "@types/react": "catalog:",
"@types/react-dom": "catalog:", "@types/react-dom": "catalog:",
"eslint-plugin-storybook": "9.1.10",
"storybook": "9.1.10", "storybook": "9.1.10",
"tsdown": "catalog:", "tsdown": "catalog:",
"typescript": "catalog:" "typescript": "catalog:"

View File

@@ -1,2 +1 @@
// eslint-disable-next-line @typescript-eslint/no-require-imports
module.exports = require("@plane/tailwind-config/postcss.config.js"); module.exports = require("@plane/tailwind-config/postcss.config.js");

View File

@@ -1,6 +1,5 @@
export * from "./double-circle-icon";
export * from "./circle-dot-full-icon"; export * from "./circle-dot-full-icon";
export * from "./contrast-icon"; export * from "./contrast-icon";
export * from "./circle-dot-full-icon";
export * from "./cycle-group-icon"; export * from "./cycle-group-icon";
export * from "./double-circle-icon";
export * from "./helper"; export * from "./helper";

View File

@@ -1,11 +1,10 @@
export type { ISvgIcons } from "./type"; export type { ISvgIcons } from "./type";
export type { IconName } from "./registry"; export type { IconName } from "./registry";
export type { IconProps } from "./icon";
export { ICON_REGISTRY } from "./registry"; export { ICON_REGISTRY } from "./registry";
export * from "./actions"; export * from "./actions";
export * from "./arrows";
export * from "./activity-icon"; export * from "./activity-icon";
export * from "./ai-icon"; export * from "./ai-icon";
export * from "./arrows";
export * from "./at-risk-icon"; export * from "./at-risk-icon";
export * from "./attachments"; export * from "./attachments";
export * from "./bar-icon"; export * from "./bar-icon";
@@ -29,11 +28,11 @@ export * from "./full-screen-panel-icon";
export * from "./github-icon"; export * from "./github-icon";
export * from "./gitlab-icon"; export * from "./gitlab-icon";
export * from "./helpers"; export * from "./helpers";
export * from "./icon";
export * from "./icon-wrapper"; export * from "./icon-wrapper";
export * from "./icon";
export * from "./in-progress-icon";
export * from "./info-fill-icon"; export * from "./info-fill-icon";
export * from "./info-icon"; export * from "./info-icon";
export * from "./in-progress-icon";
export * from "./intake"; export * from "./intake";
export * from "./layer-stack"; export * from "./layer-stack";
export * from "./layers-icon"; export * from "./layers-icon";
@@ -65,5 +64,5 @@ export * from "./transfer-icon";
export * from "./tree-map-icon"; export * from "./tree-map-icon";
export * from "./updates-icon"; export * from "./updates-icon";
export * from "./user-activity-icon"; export * from "./user-activity-icon";
export * from "./workspace";
export * from "./workspace-icon"; export * from "./workspace-icon";
export * from "./workspace";

View File

@@ -1,5 +1,10 @@
{ {
"extends": "@plane/typescript-config/react-library.json", "extends": "@plane/typescript-config/react-library.json",
"include": ["src"], "include": ["src"],
"compilerOptions": {
"exactOptionalPropertyTypes": false,
"noUnusedLocals": false,
"noImplicitReturns": false
},
"exclude": ["node_modules", "dist"] "exclude": ["node_modules", "dist"]
} }

View File

@@ -1,3 +0,0 @@
build/*
dist/*
out/*

Some files were not shown because too many files have changed in this diff Show More