diff --git a/.vscode/settings.json b/.vscode/settings.json index a6fb10870..a121adda2 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -2,5 +2,7 @@ "editor.formatOnSave": true, "prettier.requireConfig": true, "prettier.prettierPath": "./node_modules/prettier", - "editor.defaultFormatter": "esbenp.prettier-vscode" + "editor.defaultFormatter": "esbenp.prettier-vscode", + "eslint.useFlatConfig": true, + "eslint.workingDirectories": [{ "mode": "auto" }] } diff --git a/apps/obsidian/eslint.config.mjs b/apps/obsidian/eslint.config.mjs new file mode 100644 index 000000000..63e0c6b1f --- /dev/null +++ b/apps/obsidian/eslint.config.mjs @@ -0,0 +1,16 @@ +import { config } from "@repo/eslint-config/react-internal"; + +export default [ + ...config, + { + languageOptions: { + parserOptions: { + tsconfigRootDir: ".", + project: true, + ecmaFeatures: { + jsx: true, + }, + }, + }, + }, +]; diff --git a/apps/obsidian/package.json b/apps/obsidian/package.json index 30cbc7e4f..843b51507 100644 --- a/apps/obsidian/package.json +++ b/apps/obsidian/package.json @@ -7,6 +7,8 @@ "scripts": { "dev": "tsx scripts/dev.ts", "build": "tsx scripts/build.ts", + "lint": "eslint .", + "lint:fix": "eslint . --fix", "publish": "tsx scripts/publish-obsidian.ts" }, "keywords": [], @@ -14,9 +16,7 @@ "license": "Apache-2.0", "devDependencies": { "@octokit/core": "^6.1.2", - "@types/node": "^16.11.6", - "@typescript-eslint/eslint-plugin": "5.29.0", - "@typescript-eslint/parser": "5.29.0", + "@types/node": "^20", "autoprefixer": "^10.4.21", "builtin-modules": "3.3.0", "dotenv": "^16.4.5", @@ -24,13 +24,13 @@ "obsidian": "^1.7.2", "postcss": "^8.5.3", "tailwindcss": "^3.4.17", - "tslib": "2.4.0", + "tslib": "2.5.1", "tsx": "^4.19.2", - "typescript": "4.7.4" + "typescript": "5.5.4" }, "dependencies": { "react": "^19.0.0", "react-dom": "^19.0.0", "tailwindcss-animate": "^1.0.7" } -} \ No newline at end of file +} diff --git a/apps/obsidian/tsconfig.json b/apps/obsidian/tsconfig.json index bbeebdcda..8a4bdc69b 100644 --- a/apps/obsidian/tsconfig.json +++ b/apps/obsidian/tsconfig.json @@ -1,18 +1,16 @@ { "extends": "@repo/typescript-config/react-library.json", + "include": ["**/*.ts"], "compilerOptions": { "baseUrl": ".", + "rootDir": ".", "inlineSourceMap": true, "inlineSources": true, - "module": "ESNext", "target": "ES6", "allowJs": true, "noImplicitAny": true, - "moduleResolution": "node", "importHelpers": true, "isolatedModules": true, "strictNullChecks": true, - "lib": ["DOM", "ES5", "ES6", "ES7"] - }, - "include": ["**/*.ts"] + } } diff --git a/apps/roam/eslint.config.mjs b/apps/roam/eslint.config.mjs new file mode 100644 index 000000000..615c79af6 --- /dev/null +++ b/apps/roam/eslint.config.mjs @@ -0,0 +1,18 @@ +import { config } from "@repo/eslint-config/react-internal"; + +// console.log(config.map((x)=>(x.languageOptions || {}).parserOptions)); + +export default [ + ...config, + { + languageOptions: { + parserOptions: { + tsconfigRootDir: ".", + project: true, + ecmaFeatures: { + jsx: true, + }, + }, + }, + }, +]; diff --git a/apps/roam/package.json b/apps/roam/package.json index 2f6d450cf..54a0161be 100644 --- a/apps/roam/package.json +++ b/apps/roam/package.json @@ -7,6 +7,8 @@ "dev": "tsx scripts/dev.ts", "build": "tsx scripts/build.ts", "deploy": "tsx scripts/deploy.ts", + "lint": "eslint .", + "lint:fix": "eslint . --fix", "publish": "tsx scripts/publish.ts" }, "license": "Apache-2.0", diff --git a/apps/roam/tsconfig.json b/apps/roam/tsconfig.json index 5945a30d7..17b945182 100644 --- a/apps/roam/tsconfig.json +++ b/apps/roam/tsconfig.json @@ -1,16 +1,11 @@ { - "include": ["src", "src/types.d.ts", "tailwind.config.ts", "tests"], - "exclude": ["node_modules"], "extends": "@repo/typescript-config/react-library.json", + "include": ["src", "src/types.d.ts", "tailwind.config.ts", "tests", "scripts"], "compilerOptions": { "baseUrl": ".", "outDir": "dist", - "target": "ESNext", - "lib": ["DOM", "DOM.Iterable", "ESNext"], "allowJs": false, "esModuleInterop": false, - "module": "ESNext", - "moduleResolution": "Node", "forceConsistentCasingInFileNames": true, "jsx": "react", "noUncheckedIndexedAccess": false diff --git a/apps/website/.eslintrc.js b/apps/website/.eslintrc.js deleted file mode 100644 index 7d644a4ca..000000000 --- a/apps/website/.eslintrc.js +++ /dev/null @@ -1,9 +0,0 @@ -/** @type {import("eslint").Linter.Config} */ -module.exports = { - root: true, - extends: ["@repo/eslint-config/next.js"], - parser: "@typescript-eslint/parser", - parserOptions: { - project: true, - }, -}; diff --git a/apps/website/eslint.config.mjs b/apps/website/eslint.config.mjs new file mode 100644 index 000000000..f8db82476 --- /dev/null +++ b/apps/website/eslint.config.mjs @@ -0,0 +1,20 @@ +import { nextJsConfig } from "@repo/eslint-config/next-js"; + +export default [ + ...nextJsConfig, + // additions + { + languageOptions: { + parserOptions: { + tsconfigRootDir: ".", + project: true, + ecmaFeatures: { + jsx: true, + }, + }, + }, + }, + { + ignores: [".next/**"], + }, +]; diff --git a/apps/roam/package-lock.json b/apps/website/package-lock.json similarity index 100% rename from apps/roam/package-lock.json rename to apps/website/package-lock.json diff --git a/apps/website/package.json b/apps/website/package.json index 31205f20a..a68d44626 100644 --- a/apps/website/package.json +++ b/apps/website/package.json @@ -1,14 +1,16 @@ { "name": "website", "version": "0.1.0", - "description": "https://discoursegraphs.com NextJs Website", "private": true, + "description": "https://discoursegraphs.com NextJs Website", "license": "Apache-2.0", "scripts": { - "dev": "next dev", - "build": "next build", + "dev": "next dev --turbopack --port 3000", + "build": "next build --no-lint", "start": "next start", - "lint": "next lint" + "lint": "eslint .", + "lint:fix": "eslint . --fix", + "check-types": "tsc --noEmit" }, "dependencies": { "@repo/types": "*", diff --git a/apps/website/tsconfig.json b/apps/website/tsconfig.json index 8171b7a50..28be97c7c 100644 --- a/apps/website/tsconfig.json +++ b/apps/website/tsconfig.json @@ -2,22 +2,18 @@ "extends": "@repo/typescript-config/nextjs.json", "compilerOptions": { "baseUrl": ".", + "rootDir": ".", "paths": { "~/*": ["./app/*"] }, - "plugins": [ - { - "name": "next" - } - ] }, "include": [ "next-env.d.ts", - "next.config.mjs", + "next.config.ts", "**/*.ts", "**/*.tsx", + "scripts/*tx", ".next/types/**/*.ts", "postcss.config.mjs" ], - "exclude": ["node_modules"] } diff --git a/discourse-graph.code-workspace b/discourse-graph.code-workspace new file mode 100644 index 000000000..1645d7667 --- /dev/null +++ b/discourse-graph.code-workspace @@ -0,0 +1,29 @@ +{ + "folders": [ + { + "path": ".", + }, + { + "path": "./apps/obsidian", + }, + { + "path": "./apps/roam", + }, + { + "path": "./apps/website", + }, + { + "path": "./packages/database", + }, + { + "path": "./packages/ui", + }, + ], + "settings": { + "files.watcherExclude": { + "**/target": true, + "**/dist": true, + "**/next": true, + }, + }, +} diff --git a/package-lock.json b/package-lock.json index 73a160861..7ead0f0d6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,8 +14,8 @@ "posthog-js": "^1.203.1" }, "devDependencies": { - "prettier": "^3.4.2", - "prettier-plugin-tailwindcss": "^0.6.9", + "prettier": "^3.6.0", + "prettier-plugin-tailwindcss": "^0.6.13", "turbo": "^2.5.4", "typescript": "5.5.4" }, @@ -34,9 +34,7 @@ }, "devDependencies": { "@octokit/core": "^6.1.2", - "@types/node": "^16.11.6", - "@typescript-eslint/eslint-plugin": "5.29.0", - "@typescript-eslint/parser": "5.29.0", + "@types/node": "^20", "autoprefixer": "^10.4.21", "builtin-modules": "3.3.0", "dotenv": "^16.4.5", @@ -44,9 +42,9 @@ "obsidian": "^1.7.2", "postcss": "^8.5.3", "tailwindcss": "^3.4.17", - "tslib": "2.4.0", + "tslib": "2.5.1", "tsx": "^4.19.2", - "typescript": "4.7.4" + "typescript": "5.5.4" } }, "apps/obsidian/node_modules/@esbuild/android-arm": { @@ -423,205 +421,6 @@ "node": ">=12" } }, - "apps/obsidian/node_modules/@types/node": { - "version": "16.18.125", - "resolved": "https://registry.npmjs.org/@types/node/-/node-16.18.125.tgz", - "integrity": "sha512-w7U5ojboSPfZP4zD98d+/cjcN2BDW6lKH2M0ubipt8L8vUC7qUAC6ENKGSJL4tEktH2Saw2K4y1uwSjyRGKMhw==", - "dev": true, - "license": "MIT" - }, - "apps/obsidian/node_modules/@typescript-eslint/eslint-plugin": { - "version": "5.29.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.29.0.tgz", - "integrity": "sha512-kgTsISt9pM53yRFQmLZ4npj99yGl3x3Pl7z4eA66OuTzAGC4bQB5H5fuLwPnqTKU3yyrrg4MIhjF17UYnL4c0w==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/scope-manager": "5.29.0", - "@typescript-eslint/type-utils": "5.29.0", - "@typescript-eslint/utils": "5.29.0", - "debug": "^4.3.4", - "functional-red-black-tree": "^1.0.1", - "ignore": "^5.2.0", - "regexpp": "^3.2.0", - "semver": "^7.3.7", - "tsutils": "^3.21.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "@typescript-eslint/parser": "^5.0.0", - "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "apps/obsidian/node_modules/@typescript-eslint/parser": { - "version": "5.29.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.29.0.tgz", - "integrity": "sha512-ruKWTv+x0OOxbzIw9nW5oWlUopvP/IQDjB5ZqmTglLIoDTctLlAJpAQFpNPJP/ZI7hTT9sARBosEfaKbcFuECw==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "@typescript-eslint/scope-manager": "5.29.0", - "@typescript-eslint/types": "5.29.0", - "@typescript-eslint/typescript-estree": "5.29.0", - "debug": "^4.3.4" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "apps/obsidian/node_modules/@typescript-eslint/scope-manager": { - "version": "5.29.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.29.0.tgz", - "integrity": "sha512-etbXUT0FygFi2ihcxDZjz21LtC+Eps9V2xVx09zFoN44RRHPrkMflidGMI+2dUs821zR1tDS6Oc9IXxIjOUZwA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/types": "5.29.0", - "@typescript-eslint/visitor-keys": "5.29.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "apps/obsidian/node_modules/@typescript-eslint/type-utils": { - "version": "5.29.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.29.0.tgz", - "integrity": "sha512-JK6bAaaiJozbox3K220VRfCzLa9n0ib/J+FHIwnaV3Enw/TO267qe0pM1b1QrrEuy6xun374XEAsRlA86JJnyg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/utils": "5.29.0", - "debug": "^4.3.4", - "tsutils": "^3.21.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "*" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "apps/obsidian/node_modules/@typescript-eslint/types": { - "version": "5.29.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.29.0.tgz", - "integrity": "sha512-X99VbqvAXOMdVyfFmksMy3u8p8yoRGITgU1joBJPzeYa0rhdf5ok9S56/itRoUSh99fiDoMtarSIJXo7H/SnOg==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "apps/obsidian/node_modules/@typescript-eslint/typescript-estree": { - "version": "5.29.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.29.0.tgz", - "integrity": "sha512-mQvSUJ/JjGBdvo+1LwC+GY2XmSYjK1nAaVw2emp/E61wEVYEyibRHCqm1I1vEKbXCpUKuW4G7u9ZCaZhJbLoNQ==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "@typescript-eslint/types": "5.29.0", - "@typescript-eslint/visitor-keys": "5.29.0", - "debug": "^4.3.4", - "globby": "^11.1.0", - "is-glob": "^4.0.3", - "semver": "^7.3.7", - "tsutils": "^3.21.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "apps/obsidian/node_modules/@typescript-eslint/utils": { - "version": "5.29.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.29.0.tgz", - "integrity": "sha512-3Eos6uP1nyLOBayc/VUdKZikV90HahXE5Dx9L5YlSd/7ylQPXhLk1BYb29SDgnBnTp+jmSZUU0QxUiyHgW4p7A==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/json-schema": "^7.0.9", - "@typescript-eslint/scope-manager": "5.29.0", - "@typescript-eslint/types": "5.29.0", - "@typescript-eslint/typescript-estree": "5.29.0", - "eslint-scope": "^5.1.1", - "eslint-utils": "^3.0.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" - } - }, - "apps/obsidian/node_modules/@typescript-eslint/visitor-keys": { - "version": "5.29.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.29.0.tgz", - "integrity": "sha512-Hpb/mCWsjILvikMQoZIE3voc9wtQcS0A9FUw3h8bhr9UxBdtI/tw1ZDZUOXHXLOVMedKCH5NxyzATwnU78bWCQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/types": "5.29.0", - "eslint-visitor-keys": "^3.3.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, "apps/obsidian/node_modules/dotenv": { "version": "16.5.0", "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.5.0.tgz", @@ -700,26 +499,12 @@ "license": "MIT" }, "apps/obsidian/node_modules/tslib": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz", - "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==", + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.1.tgz", + "integrity": "sha512-KaI6gPil5m9vF7DKaoXxx1ia9fxS4qG5YveErRRVknPDXXriu5M8h48YRjB6h5ZUOKuAKlSJYb0GaDe8I39fRw==", "dev": true, "license": "0BSD" }, - "apps/obsidian/node_modules/typescript": { - "version": "4.7.4", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.7.4.tgz", - "integrity": "sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ==", - "dev": true, - "license": "Apache-2.0", - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=4.2.0" - } - }, "apps/roam": { "version": "0.14.0", "hasInstallScript": true, @@ -7203,6 +6988,16 @@ "node": ">=6.9.0" } }, + "node_modules/@babel/traverse/node_modules/globals": { + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, "node_modules/@babel/types": { "version": "7.26.0", "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.26.0.tgz", @@ -8070,9 +7865,9 @@ } }, "node_modules/@eslint-community/eslint-utils": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.1.tgz", - "integrity": "sha512-s3O3waFUrMV8P/XaF/+ZTp1X9XBZW1a4B97ZnjQF2KYWaFD2A8KyFBsrsfSjEmjn3RGWAIuvlneuZm3CUK3jbA==", + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.7.0.tgz", + "integrity": "sha512-dyybb3AcajC7uha6CvhdVRJqaKyn7w2YKqKyAN37NKYgZT36w+iRb0Dymmc5qEJ549c/S31cMMSFd75bteCpCw==", "dev": true, "license": "MIT", "dependencies": { @@ -9811,12 +9606,12 @@ "license": "MIT" }, "node_modules/@types/node": { - "version": "20.17.6", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.17.6.tgz", - "integrity": "sha512-VEI7OdvK2wP7XHnsuXbAJnEpEkF6NjSN45QJlL4VGqZSXsnicpesdTWsg9RISeSdYd3yeRj/y3k5KGjUXYnFwQ==", + "version": "20.19.1", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.19.1.tgz", + "integrity": "sha512-jJD50LtlD2dodAEO653i3YF04NWak6jN3ky+Ri3Em3mGR39/glWiboM/IePaRbgwSfqM1TpGXfAg8ohn/4dTgA==", "license": "MIT", "dependencies": { - "undici-types": "~6.19.2" + "undici-types": "~6.21.0" } }, "node_modules/@types/node-fetch": { @@ -10126,283 +9921,70 @@ "node_modules/@vercel/blob": { "version": "0.27.0", "resolved": "https://registry.npmjs.org/@vercel/blob/-/blob-0.27.0.tgz", - "integrity": "sha512-EkYMKRMlHkWRWCnh99adrIT7G6cgv1dWpj/S3Kqykha8cI3EAMSmvnzI1N+41MAZiLMm0CsoGToKgtzGTf5xKQ==", - "license": "Apache-2.0", - "dependencies": { - "async-retry": "^1.3.3", - "bytes": "^3.1.2", - "is-buffer": "^2.0.5", - "is-node-process": "^1.2.0", - "throttleit": "^2.1.0", - "undici": "^5.28.4" - }, - "engines": { - "node": ">=16.14" - } - }, - "node_modules/@vercel/style-guide": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/@vercel/style-guide/-/style-guide-5.2.0.tgz", - "integrity": "sha512-fNSKEaZvSkiBoF6XEefs8CcgAV9K9e+MbcsDZjUsktHycKdA0jvjAzQi1W/FzLS+Nr5zZ6oejCwq/97dHUKe0g==", - "dev": true, - "license": "MPL-2.0", - "dependencies": { - "@babel/core": "^7.22.11", - "@babel/eslint-parser": "^7.22.11", - "@rushstack/eslint-patch": "^1.3.3", - "@typescript-eslint/eslint-plugin": "^6.5.0", - "@typescript-eslint/parser": "^6.5.0", - "eslint-config-prettier": "^9.0.0", - "eslint-import-resolver-alias": "^1.1.2", - "eslint-import-resolver-typescript": "^3.6.0", - "eslint-plugin-eslint-comments": "^3.2.0", - "eslint-plugin-import": "^2.28.1", - "eslint-plugin-jest": "^27.2.3", - "eslint-plugin-jsx-a11y": "^6.7.1", - "eslint-plugin-playwright": "^0.16.0", - "eslint-plugin-react": "^7.33.2", - "eslint-plugin-react-hooks": "^4.6.0", - "eslint-plugin-testing-library": "^6.0.1", - "eslint-plugin-tsdoc": "^0.2.17", - "eslint-plugin-unicorn": "^48.0.1", - "prettier-plugin-packagejson": "^2.4.5" - }, - "engines": { - "node": ">=16" - }, - "peerDependencies": { - "@next/eslint-plugin-next": ">=12.3.0 <15", - "eslint": ">=8.48.0 <9", - "prettier": ">=3.0.0 <4", - "typescript": ">=4.8.0 <6" - }, - "peerDependenciesMeta": { - "@next/eslint-plugin-next": { - "optional": true - }, - "eslint": { - "optional": true - }, - "prettier": { - "optional": true - }, - "typescript": { - "optional": true - } - } - }, - "node_modules/@vercel/style-guide/node_modules/@typescript-eslint/eslint-plugin": { - "version": "6.21.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.21.0.tgz", - "integrity": "sha512-oy9+hTPCUFpngkEZUSzbf9MxI65wbKFoQYsgPdILTfbUldp5ovUuphZVe4i30emU9M/kP+T64Di0mxl7dSw3MA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@eslint-community/regexpp": "^4.5.1", - "@typescript-eslint/scope-manager": "6.21.0", - "@typescript-eslint/type-utils": "6.21.0", - "@typescript-eslint/utils": "6.21.0", - "@typescript-eslint/visitor-keys": "6.21.0", - "debug": "^4.3.4", - "graphemer": "^1.4.0", - "ignore": "^5.2.4", - "natural-compare": "^1.4.0", - "semver": "^7.5.4", - "ts-api-utils": "^1.0.1" - }, - "engines": { - "node": "^16.0.0 || >=18.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "@typescript-eslint/parser": "^6.0.0 || ^6.0.0-alpha", - "eslint": "^7.0.0 || ^8.0.0" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/@vercel/style-guide/node_modules/@typescript-eslint/parser": { - "version": "6.21.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.21.0.tgz", - "integrity": "sha512-tbsV1jPne5CkFQCgPBcDOt30ItF7aJoZL997JSF7MhGQqOeT3svWRYxiqlfA5RUdlHN6Fi+EI9bxqbdyAUZjYQ==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "@typescript-eslint/scope-manager": "6.21.0", - "@typescript-eslint/types": "6.21.0", - "@typescript-eslint/typescript-estree": "6.21.0", - "@typescript-eslint/visitor-keys": "6.21.0", - "debug": "^4.3.4" - }, - "engines": { - "node": "^16.0.0 || >=18.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^7.0.0 || ^8.0.0" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/@vercel/style-guide/node_modules/@typescript-eslint/scope-manager": { - "version": "6.21.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.21.0.tgz", - "integrity": "sha512-OwLUIWZJry80O99zvqXVEioyniJMa+d2GrqpUTqi5/v5D5rOrppJVBPa0yKCblcigC0/aYAzxxqQ1B+DS2RYsg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/types": "6.21.0", - "@typescript-eslint/visitor-keys": "6.21.0" - }, - "engines": { - "node": "^16.0.0 || >=18.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@vercel/style-guide/node_modules/@typescript-eslint/type-utils": { - "version": "6.21.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-6.21.0.tgz", - "integrity": "sha512-rZQI7wHfao8qMX3Rd3xqeYSMCL3SoiSQLBATSiVKARdFGCYSRvmViieZjqc58jKgs8Y8i9YvVVhRbHSTA4VBag==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/typescript-estree": "6.21.0", - "@typescript-eslint/utils": "6.21.0", - "debug": "^4.3.4", - "ts-api-utils": "^1.0.1" - }, - "engines": { - "node": "^16.0.0 || >=18.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^7.0.0 || ^8.0.0" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/@vercel/style-guide/node_modules/@typescript-eslint/types": { - "version": "6.21.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.21.0.tgz", - "integrity": "sha512-1kFmZ1rOm5epu9NZEZm1kckCDGj5UJEf7P1kliH4LKu/RkwpsfqqGmY2OOcUs18lSlQBKLDYBOGxRVtrMN5lpg==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^16.0.0 || >=18.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@vercel/style-guide/node_modules/@typescript-eslint/typescript-estree": { - "version": "6.21.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.21.0.tgz", - "integrity": "sha512-6npJTkZcO+y2/kr+z0hc4HwNfrrP4kNYh57ek7yCNlrBjWQ1Y0OS7jiZTkgumrvkX5HkEKXFZkkdFNkaW2wmUQ==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "@typescript-eslint/types": "6.21.0", - "@typescript-eslint/visitor-keys": "6.21.0", - "debug": "^4.3.4", - "globby": "^11.1.0", - "is-glob": "^4.0.3", - "minimatch": "9.0.3", - "semver": "^7.5.4", - "ts-api-utils": "^1.0.1" - }, - "engines": { - "node": "^16.0.0 || >=18.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/@vercel/style-guide/node_modules/@typescript-eslint/utils": { - "version": "6.21.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.21.0.tgz", - "integrity": "sha512-NfWVaC8HP9T8cbKQxHcsJBY5YE1O33+jpMwN45qzWWaPDZgLIbo12toGMWnmhvCpd3sIxkpDw3Wv1B3dYrbDQQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@eslint-community/eslint-utils": "^4.4.0", - "@types/json-schema": "^7.0.12", - "@types/semver": "^7.5.0", - "@typescript-eslint/scope-manager": "6.21.0", - "@typescript-eslint/types": "6.21.0", - "@typescript-eslint/typescript-estree": "6.21.0", - "semver": "^7.5.4" - }, - "engines": { - "node": "^16.0.0 || >=18.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^7.0.0 || ^8.0.0" - } - }, - "node_modules/@vercel/style-guide/node_modules/@typescript-eslint/visitor-keys": { - "version": "6.21.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.21.0.tgz", - "integrity": "sha512-JJtkDduxLi9bivAB+cYOVMtbkqdPOhZ+ZI5LC47MIRrDV4Yn2o+ZnW10Nkmr28xRpSpdJ6Sm42Hjf2+REYXm0A==", - "dev": true, - "license": "MIT", + "integrity": "sha512-EkYMKRMlHkWRWCnh99adrIT7G6cgv1dWpj/S3Kqykha8cI3EAMSmvnzI1N+41MAZiLMm0CsoGToKgtzGTf5xKQ==", + "license": "Apache-2.0", "dependencies": { - "@typescript-eslint/types": "6.21.0", - "eslint-visitor-keys": "^3.4.1" + "async-retry": "^1.3.3", + "bytes": "^3.1.2", + "is-buffer": "^2.0.5", + "is-node-process": "^1.2.0", + "throttleit": "^2.1.0", + "undici": "^5.28.4" }, "engines": { - "node": "^16.0.0 || >=18.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" + "node": ">=16.14" } }, - "node_modules/@vercel/style-guide/node_modules/minimatch": { - "version": "9.0.3", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz", - "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==", + "node_modules/@vercel/style-guide": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/@vercel/style-guide/-/style-guide-6.0.0.tgz", + "integrity": "sha512-tu0wFINGz91EPwaT5VjSqUwbvCY9pvLach7SPG4XyfJKPU9Vku2TFa6+AyzJ4oroGbo9fK+TQhIFHrnFl0nCdg==", "dev": true, - "license": "ISC", + "license": "MPL-2.0", "dependencies": { - "brace-expansion": "^2.0.1" + "@babel/core": "^7.24.0", + "@babel/eslint-parser": "^7.23.10", + "@rushstack/eslint-patch": "^1.7.2", + "@typescript-eslint/eslint-plugin": "^7.1.1", + "@typescript-eslint/parser": "^7.1.1", + "eslint-config-prettier": "^9.1.0", + "eslint-import-resolver-alias": "^1.1.2", + "eslint-import-resolver-typescript": "^3.6.1", + "eslint-plugin-eslint-comments": "^3.2.0", + "eslint-plugin-import": "^2.29.1", + "eslint-plugin-jest": "^27.9.0", + "eslint-plugin-jsx-a11y": "^6.8.0", + "eslint-plugin-playwright": "^1.5.2", + "eslint-plugin-react": "^7.34.0", + "eslint-plugin-react-hooks": "^4.6.0", + "eslint-plugin-testing-library": "^6.2.0", + "eslint-plugin-tsdoc": "^0.2.17", + "eslint-plugin-unicorn": "^51.0.1", + "eslint-plugin-vitest": "^0.3.22", + "prettier-plugin-packagejson": "^2.4.12" }, "engines": { - "node": ">=16 || 14 >=14.17" + "node": ">=18.18" }, - "funding": { - "url": "https://github.com/sponsors/isaacs" + "peerDependencies": { + "@next/eslint-plugin-next": ">=12.3.0 <15.0.0-0", + "eslint": ">=8.48.0 <9", + "prettier": ">=3.0.0 <4", + "typescript": ">=4.8.0 <6" + }, + "peerDependenciesMeta": { + "@next/eslint-plugin-next": { + "optional": true + }, + "eslint": { + "optional": true + }, + "prettier": { + "optional": true + }, + "typescript": { + "optional": true + } } }, "node_modules/@yarnpkg/lockfile": { @@ -11010,9 +10592,9 @@ } }, "node_modules/browserslist": { - "version": "4.24.4", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.24.4.tgz", - "integrity": "sha512-KDi1Ny1gSePi1vm0q4oxSF8b4DR44GF4BbmS2YdhPLOEqd8pDviZOGH/GsmRwoWJ2+5Lr085X7naowMwKHDG1A==", + "version": "4.25.0", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.25.0.tgz", + "integrity": "sha512-PJ8gYKeS5e/whHBh8xrwYK+dAvEj7JXtz6uTucnMRB8OiGTsKccFekoRrjajPBHV8oOY+2tI4uxeceSimKwMFA==", "dev": true, "funding": [ { @@ -11028,11 +10610,12 @@ "url": "https://github.com/sponsors/ai" } ], + "license": "MIT", "dependencies": { - "caniuse-lite": "^1.0.30001688", - "electron-to-chromium": "^1.5.73", + "caniuse-lite": "^1.0.30001718", + "electron-to-chromium": "^1.5.160", "node-releases": "^2.0.19", - "update-browserslist-db": "^1.1.1" + "update-browserslist-db": "^1.1.3" }, "bin": { "browserslist": "cli.js" @@ -11167,9 +10750,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001713", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001713.tgz", - "integrity": "sha512-wCIWIg+A4Xr7NfhTuHdX+/FKh3+Op3LBbSp2N5Pfx6T/LhdQy3GTyoTg48BReaW/MyMNZAkTadsBtai3ldWK0Q==", + "version": "1.0.30001724", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001724.tgz", + "integrity": "sha512-WqJo7p0TbHDOythNTqYujmaJTvtYRZrjpP8TCvH6Vb9CYJerJNKamKzIWOM4BkQatWj9H2lYulpdAQNBe7QhNA==", "funding": [ { "type": "opencollective", @@ -11183,7 +10766,8 @@ "type": "github", "url": "https://github.com/sponsors/ai" } - ] + ], + "license": "CC-BY-4.0" }, "node_modules/capital-case": { "version": "1.0.4", @@ -11365,9 +10949,9 @@ } }, "node_modules/ci-info": { - "version": "3.9.0", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.9.0.tgz", - "integrity": "sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-4.2.0.tgz", + "integrity": "sha512-cYY9mypksY8NRqgDB1XD1RiJL338v/551niynFTGkZOO2LHuB2OmOYxDIe/ttN9AHwrqdum1360G3ald0W9kCg==", "dev": true, "funding": [ { @@ -11634,6 +11218,20 @@ "url": "https://opencollective.com/core-js" } }, + "node_modules/core-js-compat": { + "version": "3.43.0", + "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.43.0.tgz", + "integrity": "sha512-2GML2ZsCc5LR7hZYz4AXmjQw8zuy2T//2QntwdnpuYI7jteT6GVYJL7F6C2C57R7gSYrcqVW3lAALefdbhBLDA==", + "dev": true, + "license": "MIT", + "dependencies": { + "browserslist": "^4.25.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/core-js" + } + }, "node_modules/core-js-pure": { "version": "3.39.0", "resolved": "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.39.0.tgz", @@ -12151,10 +11749,11 @@ } }, "node_modules/electron-to-chromium": { - "version": "1.5.137", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.137.tgz", - "integrity": "sha512-/QSJaU2JyIuTbbABAo/crOs+SuAZLS+fVVS10PVrIT9hrRkmZl8Hb0xPSkKRUUWHQtYzXHpQUW3Dy5hwMzGZkA==", - "dev": true + "version": "1.5.171", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.171.tgz", + "integrity": "sha512-scWpzXEJEMrGJa4Y6m/tVotb0WuvNmasv3wWVzUAeCgKU0ToFOhUW6Z+xWnRQANMYGxN4ngJXIThgBJOqzVPCQ==", + "dev": true, + "license": "ISC" }, "node_modules/emoji-regex": { "version": "9.2.2", @@ -12940,13 +12539,22 @@ } }, "node_modules/eslint-plugin-playwright": { - "version": "0.16.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-playwright/-/eslint-plugin-playwright-0.16.0.tgz", - "integrity": "sha512-DcHpF0SLbNeh9MT4pMzUGuUSnJ7q5MWbP8sSEFIMS6j7Ggnduq8ghNlfhURgty4c1YFny7Ge9xYTO1FSAoV2Vw==", + "version": "1.8.3", + "resolved": "https://registry.npmjs.org/eslint-plugin-playwright/-/eslint-plugin-playwright-1.8.3.tgz", + "integrity": "sha512-h87JPFHkz8a6oPhn8GRGGhSQoAJjx0AkOv1jME6NoMk2FpEsfvfJJNaQDxLSqSALkCr0IJXPGTnp6SIRVu5Nqg==", "dev": true, "license": "MIT", + "workspaces": [ + "examples" + ], + "dependencies": { + "globals": "^13.23.0" + }, + "engines": { + "node": ">=16.6.0" + }, "peerDependencies": { - "eslint": ">=7", + "eslint": ">=8.40.0", "eslint-plugin-jest": ">=25" }, "peerDependenciesMeta": { @@ -12955,6 +12563,48 @@ } } }, + "node_modules/eslint-plugin-playwright/node_modules/globals": { + "version": "13.24.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", + "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "type-fest": "^0.20.2" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint-plugin-playwright/node_modules/type-fest": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "dev": true, + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint-plugin-prefer-arrow-functions": { + "version": "3.4.2", + "resolved": "https://registry.npmjs.org/eslint-plugin-prefer-arrow-functions/-/eslint-plugin-prefer-arrow-functions-3.4.2.tgz", + "integrity": "sha512-lwmu9Q4EfxR/R0g1xJ6XvhkMHKJlv3BtW9+RHctGIiDK+IjvhB7WkNtao646EOhFDLs9QoLUBVE+pnymarCk6w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18.0.0" + }, + "peerDependencies": { + "eslint": ">=8.0.0" + } + }, "node_modules/eslint-plugin-react": { "version": "7.37.2", "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.37.2.tgz", @@ -13214,21 +12864,22 @@ } }, "node_modules/eslint-plugin-unicorn": { - "version": "48.0.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-unicorn/-/eslint-plugin-unicorn-48.0.1.tgz", - "integrity": "sha512-FW+4r20myG/DqFcCSzoumaddKBicIPeFnTrifon2mWIzlfyvzwyqZjqVP7m4Cqr/ZYisS2aiLghkUWaPg6vtCw==", + "version": "51.0.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-unicorn/-/eslint-plugin-unicorn-51.0.1.tgz", + "integrity": "sha512-MuR/+9VuB0fydoI0nIn2RDA5WISRn4AsJyNSaNKLVwie9/ONvQhxOBbkfSICBPnzKrB77Fh6CZZXjgTt/4Latw==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-validator-identifier": "^7.22.5", + "@babel/helper-validator-identifier": "^7.22.20", "@eslint-community/eslint-utils": "^4.4.0", - "ci-info": "^3.8.0", + "@eslint/eslintrc": "^2.1.4", + "ci-info": "^4.0.0", "clean-regexp": "^1.0.0", + "core-js-compat": "^3.34.0", "esquery": "^1.5.0", "indent-string": "^4.0.0", "is-builtin-module": "^3.2.1", "jsesc": "^3.0.2", - "lodash": "^4.17.21", "pluralize": "^8.0.0", "read-pkg-up": "^7.0.1", "regexp-tree": "^0.1.27", @@ -13243,7 +12894,32 @@ "url": "https://github.com/sindresorhus/eslint-plugin-unicorn?sponsor=1" }, "peerDependencies": { - "eslint": ">=8.44.0" + "eslint": ">=8.56.0" + } + }, + "node_modules/eslint-plugin-vitest": { + "version": "0.3.26", + "resolved": "https://registry.npmjs.org/eslint-plugin-vitest/-/eslint-plugin-vitest-0.3.26.tgz", + "integrity": "sha512-oxe5JSPgRjco8caVLTh7Ti8PxpwJdhSV0hTQAmkFcNcmy/9DnqLB/oNVRA11RmVRP//2+jIIT6JuBEcpW3obYg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/utils": "^7.1.1" + }, + "engines": { + "node": "^18.0.0 || >= 20.0.0" + }, + "peerDependencies": { + "eslint": ">=8.0.0", + "vitest": "*" + }, + "peerDependenciesMeta": { + "@typescript-eslint/eslint-plugin": { + "optional": true + }, + "vitest": { + "optional": true + } } }, "node_modules/eslint-scope": { @@ -13270,35 +12946,6 @@ "node": ">=4.0" } }, - "node_modules/eslint-utils": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-3.0.0.tgz", - "integrity": "sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==", - "dev": true, - "license": "MIT", - "dependencies": { - "eslint-visitor-keys": "^2.0.0" - }, - "engines": { - "node": "^10.0.0 || ^12.0.0 || >= 14.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/mysticatea" - }, - "peerDependencies": { - "eslint": ">=5" - } - }, - "node_modules/eslint-utils/node_modules/eslint-visitor-keys": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", - "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">=10" - } - }, "node_modules/eslint-visitor-keys": { "version": "3.4.3", "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", @@ -13901,13 +13548,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/functional-red-black-tree": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", - "integrity": "sha512-dsKNQNdj6xA3T+QlADDA7mOSlX0qiMINjn0cgr+eGHGsbSHzTabcIogz2+p/iqP1Xs6EP/sS2SbqH+brGTbq0g==", - "dev": true, - "license": "MIT" - }, "node_modules/functions-have-names": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", @@ -14128,13 +13768,16 @@ } }, "node_modules/globals": { - "version": "11.12.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", - "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "version": "16.2.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-16.2.0.tgz", + "integrity": "sha512-O+7l9tPdHCU320IigZZPj5zmRCFG9xHmx9cU8FqU2Rp+JN714seHV+2S9+JslCpY4gJwU2vOGox0wzgae/MCEg==", "dev": true, "license": "MIT", "engines": { - "node": ">=4" + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/globalthis": { @@ -17877,9 +17520,9 @@ } }, "node_modules/prettier": { - "version": "3.4.2", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.4.2.tgz", - "integrity": "sha512-e9MewbtFo+Fevyuxn/4rrcDAaq0IYxPGLvObpQjiZBMAzB9IGmzlnG9RZy3FFas+eBMu2vA0CszMeduow5dIuQ==", + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.6.0.tgz", + "integrity": "sha512-ujSB9uXHJKzM/2GBuE0hBOUgC77CN3Bnpqa+g80bkv3T3A93wL/xlzDATHhnhkzifz/UE2SNOvmbTz5hSkDlHw==", "dev": true, "license": "MIT", "bin": { @@ -18005,9 +17648,9 @@ } }, "node_modules/prettier-plugin-tailwindcss": { - "version": "0.6.9", - "resolved": "https://registry.npmjs.org/prettier-plugin-tailwindcss/-/prettier-plugin-tailwindcss-0.6.9.tgz", - "integrity": "sha512-r0i3uhaZAXYP0At5xGfJH876W3HHGHDp+LCRUJrs57PBeQ6mYHMwr25KH8NPX44F2yGTvdnH7OqCshlQx183Eg==", + "version": "0.6.13", + "resolved": "https://registry.npmjs.org/prettier-plugin-tailwindcss/-/prettier-plugin-tailwindcss-0.6.13.tgz", + "integrity": "sha512-uQ0asli1+ic8xrrSmIOaElDu0FacR4x69GynTh2oZjFY10JUt6EEumTQl5tB4fMeD6I1naKd+4rXQQ7esT2i1g==", "dev": true, "license": "MIT", "engines": { @@ -18018,7 +17661,7 @@ "@prettier/plugin-pug": "*", "@shopify/prettier-plugin-liquid": "*", "@trivago/prettier-plugin-sort-imports": "*", - "@zackad/prettier-plugin-twig-melody": "*", + "@zackad/prettier-plugin-twig": "*", "prettier": "^3.0", "prettier-plugin-astro": "*", "prettier-plugin-css-order": "*", @@ -18045,7 +17688,7 @@ "@trivago/prettier-plugin-sort-imports": { "optional": true }, - "@zackad/prettier-plugin-twig-melody": { + "@zackad/prettier-plugin-twig": { "optional": true }, "prettier-plugin-astro": { @@ -18603,19 +18246,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/regexpp": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz", - "integrity": "sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/mysticatea" - } - }, "node_modules/registry-auth-token": { "version": "3.3.2", "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-3.3.2.tgz", @@ -19376,9 +19006,9 @@ } }, "node_modules/spdx-license-ids": { - "version": "3.0.20", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.20.tgz", - "integrity": "sha512-jg25NiDV/1fLtSgEgyvVyDunvaNHbuwF9lfNV17gSmPFAlYzdfNBlLtLzXTevwkPj7DhGbmN9VnmJIgLnhvaBw==", + "version": "3.0.21", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.21.tgz", + "integrity": "sha512-Bvg/8F5XephndSK3JffaRqdT+gyhfqIPwDHpX80tJrF8QQRYMo8sNMeaZ2Dp5+jhwKnUmIOyFFQfHRkjJm5nXg==", "dev": true, "license": "CC0-1.0" }, @@ -20108,9 +19738,9 @@ } }, "node_modules/ts-api-utils": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.4.0.tgz", - "integrity": "sha512-032cPxaEKwM+GT3vA5JXNzIaizx388rhsSW79vGRNGXfRRAdEAn2mvk36PvK5HnOchyWZ7afLEXqYCvPCrzuzQ==", + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.4.3.tgz", + "integrity": "sha512-i3eMG77UTMD0hZhgRS562pv83RC6ukSAC2GMNWc+9dieh/+jDM5u5YG+NHX6VNDRHQcHwmsTHctP9LhbC3WxVw==", "dev": true, "license": "MIT", "engines": { @@ -20462,6 +20092,33 @@ "node": ">=14.17" } }, + "node_modules/typescript-eslint": { + "version": "7.18.0", + "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-7.18.0.tgz", + "integrity": "sha512-PonBkP603E3tt05lDkbOMyaxJjvKqQrXsnow72sVeOFINDE/qNmnnd+f9b4N+U7W6MXnnYyrhtmF2t08QWwUbA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/eslint-plugin": "7.18.0", + "@typescript-eslint/parser": "7.18.0", + "@typescript-eslint/utils": "7.18.0" + }, + "engines": { + "node": "^18.18.0 || >=20.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.56.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, "node_modules/uglify-js": { "version": "3.19.3", "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.19.3.tgz", @@ -20505,9 +20162,9 @@ } }, "node_modules/undici-types": { - "version": "6.19.8", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz", - "integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==", + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz", + "integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==", "license": "MIT" }, "node_modules/unicorn-magic": { @@ -20633,9 +20290,9 @@ } }, "node_modules/update-browserslist-db": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.1.tgz", - "integrity": "sha512-R8UzCaa9Az+38REPiJ1tXlImTJXlVfgHZsglwBD/k6nj76ctsH1E3q4doGrukiLQd3sGQYu56r5+lo5r94l29A==", + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.3.tgz", + "integrity": "sha512-UxhIZQ+QInVdunkDAaiazvvT/+fXL5Osr0JZlJulepYu6Jd7qJtDZjlur0emRlT71EN3ScPoE7gvsuIKKNavKw==", "dev": true, "funding": [ { @@ -20654,7 +20311,7 @@ "license": "MIT", "dependencies": { "escalade": "^3.2.0", - "picocolors": "^1.1.0" + "picocolors": "^1.1.1" }, "bin": { "update-browserslist-db": "cli.js" @@ -21224,13 +20881,101 @@ "version": "0.0.0", "license": "Apache-2.0", "devDependencies": { - "@typescript-eslint/eslint-plugin": "^7.1.0", - "@typescript-eslint/parser": "^7.1.0", - "@vercel/style-guide": "^5.2.0", - "eslint-config-prettier": "^9.1.0", + "@eslint/js": "^9.29.0", + "@next/eslint-plugin-next": "~15.0.3", + "@vercel/style-guide": "^6.0.0", + "eslint": "^8.57.1", + "eslint-config-prettier": "^10.1.5", "eslint-config-turbo": "^2.5.4", "eslint-plugin-only-warn": "^1.1.0", - "typescript": "5.5.4" + "eslint-plugin-prefer-arrow-functions": "3.4.2", + "eslint-plugin-react": "^7.37.2", + "eslint-plugin-react-hooks": "^5.2.0", + "globals": "16.2.0", + "typescript": "5.5.4", + "typescript-eslint": "^7.18.0" + } + }, + "packages/eslint-config/node_modules/@eslint/js": { + "version": "9.30.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.30.0.tgz", + "integrity": "sha512-Wzw3wQwPvc9sHM+NjakWTcPx11mbZyiYHuwWa/QfZ7cIRX7WK54PSk7bdyXDaoaopUcMatv1zaQvOAAO8hCdww==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://eslint.org/donate" + } + }, + "packages/eslint-config/node_modules/@next/eslint-plugin-next": { + "version": "15.0.4", + "resolved": "https://registry.npmjs.org/@next/eslint-plugin-next/-/eslint-plugin-next-15.0.4.tgz", + "integrity": "sha512-rbsF17XGzHtR7SDWzWpavSfum3/UdnF8bAaisnKwP//si3KWPTedVUsflAdjyK1zW3rweBjbALfKcavFneLGvg==", + "dev": true, + "license": "MIT", + "dependencies": { + "fast-glob": "3.3.1" + } + }, + "packages/eslint-config/node_modules/@next/eslint-plugin-next/node_modules/fast-glob": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.1.tgz", + "integrity": "sha512-kNFPyjhh5cKjrUltxs+wFx+ZkbRaxxmZ+X0ZU31SOsxCEtP9VPgtq2teZw1DebupL5GmDaNQ6yKMMVcM41iqDg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.4" + }, + "engines": { + "node": ">=8.6.0" + } + }, + "packages/eslint-config/node_modules/eslint-config-prettier": { + "version": "10.1.5", + "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-10.1.5.tgz", + "integrity": "sha512-zc1UmCpNltmVY34vuLRV61r1K27sWuX39E+uyUnY8xS2Bex88VV9cugG+UZbRSRGtGyFboj+D8JODyme1plMpw==", + "dev": true, + "license": "MIT", + "bin": { + "eslint-config-prettier": "bin/cli.js" + }, + "funding": { + "url": "https://opencollective.com/eslint-config-prettier" + }, + "peerDependencies": { + "eslint": ">=7.0.0" + } + }, + "packages/eslint-config/node_modules/eslint-plugin-react-hooks": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-5.2.0.tgz", + "integrity": "sha512-+f15FfK64YQwZdJNELETdn5ibXEUQmW1DZL6KXhNnc2heoy/sg9VJJeT7n8TlMWouzWqSWavFkIhHyIbIAEapg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "peerDependencies": { + "eslint": "^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0 || ^9.0.0" + } + }, + "packages/eslint-config/node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" } }, "packages/tailwind-config": { @@ -21250,7 +20995,7 @@ "packages/typescript-config": { "name": "@repo/typescript-config", "version": "0.0.0", - "license": "Apache-2.0" + "license": "MIT" }, "packages/ui": { "name": "@repo/ui", @@ -21276,7 +21021,7 @@ "@types/node": "^20.11.24", "@types/react": "18.3.0", "@types/react-dom": "18.3.1", - "eslint": "^8.57.0", + "eslint": "^8.57.1", "typescript": "5.5.4" } }, diff --git a/package.json b/package.json index 3f93f35a7..cc2814d6a 100644 --- a/package.json +++ b/package.json @@ -10,8 +10,8 @@ "format": "prettier --write \"**/*.{ts,tsx,md}\"" }, "devDependencies": { - "prettier": "^3.4.2", - "prettier-plugin-tailwindcss": "^0.6.9", + "prettier": "^3.6.0", + "prettier-plugin-tailwindcss": "^0.6.13", "turbo": "^2.5.4", "typescript": "5.5.4" }, @@ -32,4 +32,4 @@ "dependencies": { "posthog-js": "^1.203.1" } -} \ No newline at end of file +} diff --git a/packages/database/eslint.config.mjs b/packages/database/eslint.config.mjs new file mode 100644 index 000000000..e169fe01a --- /dev/null +++ b/packages/database/eslint.config.mjs @@ -0,0 +1,12 @@ +import base from "@repo/eslint-config/react-internal"; + +export default [ + ...base, + { + languageOptions: { + parserOptions: { + tsconfigRootDir: ".", + }, + }, + } +]; diff --git a/packages/database/tsconfig.json b/packages/database/tsconfig.json index a08fbe744..db5775d9c 100644 --- a/packages/database/tsconfig.json +++ b/packages/database/tsconfig.json @@ -3,11 +3,14 @@ "compilerOptions": { "baseUrl": ".", "rootDir": ".", + "noEmit": true, "outDir": "dist" }, "include": [ + ".", "./*", "./features/step-definitions/**/*", "./features/support/**/*" - ] + ], + "exclude": ["supabase"] } diff --git a/packages/eslint-config/base.js b/packages/eslint-config/base.js new file mode 100644 index 000000000..61a18c274 --- /dev/null +++ b/packages/eslint-config/base.js @@ -0,0 +1,58 @@ +import js from "@eslint/js"; +import eslintConfigPrettier from "eslint-config-prettier"; +import turboPlugin from "eslint-plugin-turbo"; +import tseslint from "typescript-eslint"; +import onlyWarn from "eslint-plugin-only-warn"; +import preferArrows from "eslint-plugin-prefer-arrow-functions"; + +/** + * A shared ESLint configuration for the repository. + * + * @type {import("eslint").Linter.Config[]} + * */ +export const config = [ + js.configs.recommended, + eslintConfigPrettier, + ...tseslint.configs.recommendedTypeChecked, // added TypeChecked + { + plugins: { + turbo: turboPlugin, + }, + rules: { + "turbo/no-undeclared-env-vars": "warn", + }, + }, + { + plugins: { + preferArrows, + }, + rules: { + "max-params": ["error", 3], + "@typescript-eslint/naming-convention": "error", + "preferArrows/prefer-arrow-functions": [ + "warn", + { + allowNamedFunctions: false, + classPropertiesAllowed: false, + disallowPrototype: false, + returnStyle: "unchanged", + singleReturnOnly: false, + }, + ], + }, + }, + { + plugins: { + onlyWarn, + }, + }, + { + ignores: [ + "dist/**", + // Addition: ignore dotfiles and config + "node_modules/**", + ".*.js", + "*.config.*", + ], + }, +]; diff --git a/packages/eslint-config/library.js b/packages/eslint-config/library.js deleted file mode 100644 index 9b59cc0fc..000000000 --- a/packages/eslint-config/library.js +++ /dev/null @@ -1,34 +0,0 @@ -const { resolve } = require("node:path"); - -const project = resolve(process.cwd(), "tsconfig.json"); - -/** @type {import("eslint").Linter.Config} */ -module.exports = { - extends: ["eslint:recommended", "prettier", "turbo"], - plugins: ["only-warn"], - globals: { - React: true, - JSX: true, - }, - env: { - node: true, - }, - settings: { - "import/resolver": { - typescript: { - project, - }, - }, - }, - ignorePatterns: [ - // Ignore dotfiles - ".*.js", - "node_modules/", - "dist/", - ], - overrides: [ - { - files: ["*.js?(x)", "*.ts?(x)"], - }, - ], -}; diff --git a/packages/eslint-config/next.js b/packages/eslint-config/next.js index 88445be05..2cdf9a248 100644 --- a/packages/eslint-config/next.js +++ b/packages/eslint-config/next.js @@ -1,35 +1,43 @@ -const { resolve } = require("node:path"); +import pluginReactHooks from "eslint-plugin-react-hooks"; +import pluginReact from "eslint-plugin-react"; +import globals from "globals"; +import pluginNext from "@next/eslint-plugin-next"; +import { config as baseConfig } from "./base.js"; -const project = resolve(process.cwd(), "tsconfig.json"); - -/** @type {import("eslint").Linter.Config} */ -module.exports = { - extends: [ - "eslint:recommended", - "prettier", - require.resolve("@vercel/style-guide/eslint/next"), - "turbo", - ], - globals: { - React: true, - JSX: true, +/** + * A custom ESLint configuration for libraries that use Next.js. + * + * @type {import("eslint").Linter.Config[]} + * */ +export const nextJsConfig = [ + ...baseConfig, + { + ...pluginReact.configs.flat.recommended, + languageOptions: { + ...pluginReact.configs.flat.recommended.languageOptions, + globals: { + ...globals.serviceworker, + }, + }, }, - env: { - node: true, - browser: true, + { + plugins: { + "@next/next": pluginNext, + }, + rules: { + ...pluginNext.configs.recommended.rules, + ...pluginNext.configs["core-web-vitals"].rules, + }, }, - plugins: ["only-warn"], - settings: { - "import/resolver": { - typescript: { - project, - }, + { + plugins: { + "react-hooks": pluginReactHooks, + }, + settings: { react: { version: "detect" } }, + rules: { + ...pluginReactHooks.configs.recommended.rules, + // React scope no longer necessary with new JSX transform. + "react/react-in-jsx-scope": "off", }, }, - ignorePatterns: [ - // Ignore dotfiles - ".*.js", - "node_modules/", - ], - overrides: [{ files: ["*.js?(x)", "*.ts?(x)"] }], -}; +]; diff --git a/packages/eslint-config/package.json b/packages/eslint-config/package.json index 5fbbe2b23..abb9d3dc6 100644 --- a/packages/eslint-config/package.json +++ b/packages/eslint-config/package.json @@ -1,20 +1,27 @@ { "name": "@repo/eslint-config", "version": "0.0.0", - "private": true, + "type": "module", "license": "Apache-2.0", - "files": [ - "library.js", - "next.js", - "react-internal.js" - ], + "private": true, + "exports": { + "./base": "./base.js", + "./next-js": "./next.js", + "./react-internal": "./react-internal.js" + }, "devDependencies": { - "@vercel/style-guide": "^5.2.0", + "@eslint/js": "^9.29.0", + "@next/eslint-plugin-next": "~15.0.3", + "@vercel/style-guide": "^6.0.0", + "eslint-config-prettier": "^10.1.5", "eslint-config-turbo": "^2.5.4", - "eslint-config-prettier": "^9.1.0", "eslint-plugin-only-warn": "^1.1.0", - "@typescript-eslint/parser": "^7.1.0", - "@typescript-eslint/eslint-plugin": "^7.1.0", - "typescript": "5.5.4" + "eslint-plugin-prefer-arrow-functions": "3.4.2", + "eslint-plugin-react": "^7.37.2", + "eslint-plugin-react-hooks": "^5.2.0", + "eslint": "^8.57.1", + "globals": "16.2.0", + "typescript": "5.5.4", + "typescript-eslint": "^7.18.0" } } diff --git a/packages/eslint-config/react-internal.js b/packages/eslint-config/react-internal.js index ef700cbd0..3769a3f7e 100644 --- a/packages/eslint-config/react-internal.js +++ b/packages/eslint-config/react-internal.js @@ -1,38 +1,34 @@ -const { resolve } = require("node:path"); +import tseslint from "typescript-eslint"; +import pluginReactHooks from "eslint-plugin-react-hooks"; +import pluginReact from "eslint-plugin-react"; +import globals from "globals"; +import { config as baseConfig } from "./base.js"; -const project = resolve(process.cwd(), "tsconfig.json"); - -/* - * This is a custom ESLint configuration for use with - * internal (bundled by their consumer) libraries - * that utilize React. - */ - -/** @type {import("eslint").Linter.Config} */ -module.exports = { - extends: ["eslint:recommended", "prettier", "turbo"], - plugins: ["only-warn"], - globals: { - React: true, - }, - env: { - browser: true, - }, - settings: { - "import/resolver": { - typescript: { - project, +/** + * A custom ESLint configuration for libraries that use React. + * + * @type {import("eslint").Linter.Config[]} */ +export const config = [ + ...baseConfig, + pluginReact.configs.flat.recommended, + { + languageOptions: { + ...pluginReact.configs.flat.recommended.languageOptions, + globals: { + ...globals.serviceworker, + ...globals.browser, }, }, }, - ignorePatterns: [ - // Ignore dotfiles - ".*.js", - "node_modules/", - "dist/", - ], - overrides: [ - // Force ESLint to detect .tsx files - { files: ["*.js?(x)", "*.ts?(x)"] }, - ], -}; + { + plugins: { + "react-hooks": pluginReactHooks, + }, + settings: { react: { version: "detect" } }, + rules: { + ...pluginReactHooks.configs.recommended.rules, + // React scope no longer necessary with new JSX transform. + "react/react-in-jsx-scope": "off", + }, + }, +]; diff --git a/packages/tailwind-config/tsconfig.json b/packages/tailwind-config/tsconfig.json index 940bd69af..c87e5a104 100644 --- a/packages/tailwind-config/tsconfig.json +++ b/packages/tailwind-config/tsconfig.json @@ -1,5 +1,9 @@ { "extends": "@repo/typescript-config/base.json", "include": ["."], + "compilerOptions": { + "baseUrl": ".", + "noEmit": true + }, "exclude": ["dist", "build", "node_modules"] } diff --git a/packages/typescript-config/base.json b/packages/typescript-config/base.json index 29e044f50..bb6f2a15d 100644 --- a/packages/typescript-config/base.json +++ b/packages/typescript-config/base.json @@ -1,10 +1,6 @@ { "$schema": "https://json.schemastore.org/tsconfig", "compilerOptions": { - "paths": { - "~/*": ["src/*"] - }, - "allowSyntheticDefaultImports": true, "declaration": true, "declarationMap": true, "esModuleInterop": true, @@ -18,6 +14,14 @@ "resolveJsonModule": true, "skipLibCheck": true, "strict": true, - "target": "ES2022" - } + "target": "ES2022", + + "outDir": "dist", + "forceConsistentCasingInFileNames": true, + "allowSyntheticDefaultImports": true, + "paths": { + "~/*": ["src/*"] + } + }, + "exclude": ["node_modules", "dist"] } diff --git a/packages/typescript-config/package.json b/packages/typescript-config/package.json index 5c487d30a..27c0e6043 100644 --- a/packages/typescript-config/package.json +++ b/packages/typescript-config/package.json @@ -2,7 +2,7 @@ "name": "@repo/typescript-config", "version": "0.0.0", "private": true, - "license": "Apache-2.0", + "license": "MIT", "publishConfig": { "access": "public" } diff --git a/packages/ui/.eslintrc.js b/packages/ui/.eslintrc.js deleted file mode 100644 index 9fc5104c6..000000000 --- a/packages/ui/.eslintrc.js +++ /dev/null @@ -1,9 +0,0 @@ -export default { - root: true, - extends: ["@repo/eslint-config/react-internal.js"], - parser: "@typescript-eslint/parser", - parserOptions: { - project: "./tsconfig.lint.json", - tsconfigRootDir: __dirname, - }, -}; diff --git a/packages/ui/eslint.config.mjs b/packages/ui/eslint.config.mjs new file mode 100644 index 000000000..63e0c6b1f --- /dev/null +++ b/packages/ui/eslint.config.mjs @@ -0,0 +1,16 @@ +import { config } from "@repo/eslint-config/react-internal"; + +export default [ + ...config, + { + languageOptions: { + parserOptions: { + tsconfigRootDir: ".", + project: true, + ecmaFeatures: { + jsx: true, + }, + }, + }, + }, +]; diff --git a/packages/ui/package.json b/packages/ui/package.json index 28fd02018..c7d136d9d 100644 --- a/packages/ui/package.json +++ b/packages/ui/package.json @@ -3,7 +3,6 @@ "version": "0.0.0", "private": true, "license": "Apache-2.0", - "type": "module", "exports": { "./globals.css": "./src/globals.css", "./postcss.config": "./postcss.config.mjs", @@ -16,7 +15,8 @@ "./components/*": "./src/components/*.tsx" }, "scripts": { - "lint": "eslint . --max-warnings 0", + "lint": "eslint .", + "lint:fix": "eslint . --fix", "generate:component": "turbo gen react-component", "check-types": "tsc --noEmit", "ui": "npx shadcn@latest" @@ -30,7 +30,7 @@ "@types/node": "^20.11.24", "@types/react": "18.3.0", "@types/react-dom": "18.3.1", - "eslint": "^8.57.0", + "eslint": "^8.57.1", "typescript": "5.5.4" }, "dependencies": { diff --git a/packages/ui/tsconfig.json b/packages/ui/tsconfig.json index f9f9229e4..4e2982125 100644 --- a/packages/ui/tsconfig.json +++ b/packages/ui/tsconfig.json @@ -2,10 +2,7 @@ "extends": "@repo/typescript-config/react-library.json", "compilerOptions": { "baseUrl": ".", - "paths": { - "@repo/ui/*": ["./src/*"] - } + "rootDir": "." }, - "include": ["src"], - "exclude": ["node_modules"] + "include": ["src", "turbo", "scripts"] } diff --git a/packages/ui/tsconfig.lint.json b/packages/ui/tsconfig.lint.json deleted file mode 100644 index df2762ee5..000000000 --- a/packages/ui/tsconfig.lint.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "extends": "@repo/typescript-config/react-library.json", - "compilerOptions": { - "outDir": "dist" - }, - "include": ["src", "turbo"], - "exclude": ["node_modules", "dist"] -}