Skip to content

Commit

Permalink
fix: upgrading docs dependencies (#2359)
Browse files Browse the repository at this point in the history
* Docusaurus upgraded to eslint 9, which changes how it does
  configurations. Updated those
* Fixed any linting errors after the upgrade
  • Loading branch information
ryscheng authored Oct 16, 2024
1 parent 2f5c9e2 commit 68769c3
Show file tree
Hide file tree
Showing 10 changed files with 3,109 additions and 2,174 deletions.
1 change: 1 addition & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ module.exports = {
"@typescript-eslint/no-misused-promises": "error",
"@typescript-eslint/no-floating-promises": "error",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-unused-expressions": "off",
"@typescript-eslint/no-unused-vars": [
"warn",
{
Expand Down
50 changes: 50 additions & 0 deletions apps/docs/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
import path from "node:path";
import { fileURLToPath } from "node:url";
import js from "@eslint/js";
import { FlatCompat } from "@eslint/eslintrc";
import { includeIgnoreFile } from "@eslint/compat";

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const gitignorePath = path.resolve(__dirname, ".gitignore");
const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
allConfig: js.configs.all
});

export default [
includeIgnoreFile(gitignorePath),
{
ignores: [
"node_modules",
"src/components/plasmic/generated/",
"static/plasmic/",
"build",
"**/.docusaurus",
"**/.cache-loader",
"**/.DS_Store",
"**/.env.local",
"**/.env.development.local",
"**/.env.test.local",
"**/.env.production.local",
"**/npm-debug.log*",
"**/yarn-debug.log*",
"**/yarn-error.log*",
],
}, ...compat.extends("../../.eslintrc.js"), {
languageOptions: {
ecmaVersion: 5,
sourceType: "script",

parserOptions: {
project: ["./apps/docs/tsconfig.json"],
},
},

rules: {
"@typescript-eslint/ban-ts-comment": "off",
"@typescript-eslint/no-empty-object-type": "off",
},
}
];
22 changes: 13 additions & 9 deletions apps/docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,28 +16,32 @@
"write-translations": "docusaurus write-translations",
"write-heading-ids": "docusaurus write-heading-ids",
"lint": "pnpm lint:eslint && pnpm lint:prettier",
"lint:eslint": "eslint --ignore-path ../../.gitignore --ignore-path .gitignore --max-warnings 0 .",
"lint:eslint": "eslint --max-warnings 0 .",
"lint:prettier": "prettier --ignore-path ../../.gitignore --ignore-path .gitignore --ignore-path .prettierignore --log-level warn --check **/*.{js,jsx,ts,tsx,sol,md,json}",
"plasmic:update": "pnpm update @plasmicapp/cli @plasmicapp/react-web",
"plasmic:sync": "pnpm plasmic sync --yes --force"
},
"dependencies": {
"@docusaurus/core": "3.4.0",
"@docusaurus/preset-classic": "3.4.0",
"@docusaurus/theme-common": "3.4.0",
"@docusaurus/core": "3.5.2",
"@docusaurus/preset-classic": "3.5.2",
"@docusaurus/theme-common": "3.5.2",
"@laxels/docusaurus-plugin-segment": "^1.0.6",
"@mdx-js/react": "^3.0.1",
"@plasmicapp/react-web": "^0.2.350",
"@plasmicapp/react-web": "^0.2.353",
"@plasmicpkgs/plasmic-basic-components": "^0.0.230",
"clsx": "^2.1.1",
"lodash": "^4.17.21",
"prism-react-renderer": "^2.3.1",
"prism-react-renderer": "^2.4.0",
"react": "^18.3.1",
"react-dom": "^18.3.1"
},
"devDependencies": {
"@docusaurus/module-type-aliases": "3.4.0",
"@docusaurus/tsconfig": "3.4.0",
"@docusaurus/types": "3.4.0",
"@docusaurus/module-type-aliases": "3.5.2",
"@docusaurus/tsconfig": "3.5.2",
"@docusaurus/types": "3.5.2",
"@eslint/compat": "^1.2.0",
"@eslint/eslintrc": "^3.1.0",
"@eslint/js": "^9.12.0",
"@plasmicapp/cli": "^0.1.331",
"dotenv": "^16.4.5",
"typescript": "~5.3.3"
Expand Down
58 changes: 58 additions & 0 deletions apps/docs/plasmic.json
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,64 @@
}
],
"customFunctions": []
},
{
"projectId": "caTPwKxj5ZrD9LQ7DMdK4Z",
"projectApiToken": "vXGGQpdi9fhcncabBdg8DcMRUbkz0iRW6HS1jzQufQR6QH0MasPwr9SX7ap4SsK3xXwwXmzZtglWGe0Rm2nw",
"projectName": "plasmic-basic-components",
"version": ">0.0.0",
"cssFilePath": "generated/plasmic_basic_components/plasmic.module.css",
"components": [],
"icons": [],
"images": [],
"indirect": true,
"globalContextsFilePath": "",
"splitsProviderFilePath": "",
"codeComponents": [
{
"id": "CMDBvOhaI4s",
"name": "Iframe",
"displayName": "hostless-iframe",
"componentImportPath": "@plasmicpkgs/plasmic-basic-components"
},
{
"id": "RhitNJW5Zu-",
"name": "Video",
"displayName": "hostless-html-video",
"componentImportPath": "@plasmicpkgs/plasmic-basic-components"
},
{
"id": "PKldDYkH42",
"name": "Embed",
"displayName": "hostless-embed",
"componentImportPath": "@plasmicpkgs/plasmic-basic-components"
},
{
"id": "D4RbnlpRXg3",
"name": "DataProvider",
"displayName": "hostless-data-provider",
"componentImportPath": "@plasmicpkgs/plasmic-basic-components"
},
{
"id": "zlBHsvkFlN",
"name": "ConditionGuard",
"displayName": "hostless-condition-guard",
"componentImportPath": "@plasmicpkgs/plasmic-basic-components"
},
{
"id": "K-mWGqrHefEp",
"name": "SideEffect",
"displayName": "hostless-side-effect",
"componentImportPath": "@plasmicpkgs/plasmic-basic-components"
},
{
"id": "SpkzmXJqg27p",
"name": "Timer",
"displayName": "hostless-timer",
"componentImportPath": "@plasmicpkgs/plasmic-basic-components"
}
],
"customFunctions": []
}
],
"globalVariants": {
Expand Down
32 changes: 24 additions & 8 deletions apps/docs/plasmic.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@
"projects": [
{
"projectId": "2CtczDeUz9jL9qnFi6NWuQ",
"version": "0.2.3",
"dependencies": {},
"version": "0.3.0",
"dependencies": {
"caTPwKxj5ZrD9LQ7DMdK4Z": "3.38.0"
},
"lang": "ts",
"fileLocks": [
{
Expand All @@ -14,32 +16,32 @@
{
"type": "renderModule",
"assetId": "z50hW5Ihi9k5",
"checksum": "25dc6f80fe7c254e792c51fe2d43b4a9"
"checksum": "b31d1641507048ab4f7055d8761bbc72"
},
{
"type": "cssRules",
"assetId": "z50hW5Ihi9k5",
"checksum": "25dc6f80fe7c254e792c51fe2d43b4a9"
"checksum": "b31d1641507048ab4f7055d8761bbc72"
},
{
"type": "renderModule",
"assetId": "8u0yNVg3vXsq",
"checksum": "4deb8270912232ef29700376c2ee2340"
"checksum": "3666ca99b526dec75ce5ee1ba21e7ae3"
},
{
"type": "cssRules",
"assetId": "8u0yNVg3vXsq",
"checksum": "4deb8270912232ef29700376c2ee2340"
"checksum": "3666ca99b526dec75ce5ee1ba21e7ae3"
},
{
"type": "renderModule",
"assetId": "XdMR0R8lmSdz",
"checksum": "840794948d2228235831cd844aebde8f"
"checksum": "b9d1c3f20d78e5fb383ad3c43e54c707"
},
{
"type": "cssRules",
"assetId": "XdMR0R8lmSdz",
"checksum": "840794948d2228235831cd844aebde8f"
"checksum": "b9d1c3f20d78e5fb383ad3c43e54c707"
},
{
"type": "icon",
Expand Down Expand Up @@ -68,6 +70,20 @@
}
],
"codegenVersion": "0.0.1"
},
{
"projectId": "caTPwKxj5ZrD9LQ7DMdK4Z",
"version": "3.38.0",
"dependencies": {},
"lang": "ts",
"fileLocks": [
{
"assetId": "caTPwKxj5ZrD9LQ7DMdK4Z",
"type": "projectCss",
"checksum": "e1ec850476829c38b0f9b6d4f7ac446a"
}
],
"codegenVersion": "0.0.1"
}
],
"cliVersion": "0.1.327"
Expand Down
2 changes: 1 addition & 1 deletion apps/frontend/lib/metrics-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ function summarizeForCards(
});
} catch (e) {
logger.warn(
`error processing column ${card.column} for card rendering. skipping`,
`error processing column ${card.column} for card rendering. skipping. ${e}`,
);
return;
}
Expand Down
10 changes: 5 additions & 5 deletions apps/frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -87,15 +87,15 @@
"@types/node": "^20.14.10",
"@types/papaparse": "^5.3.14",
"@types/qs": "^6.9.15",
"@types/react": "^18.3.3",
"@types/react": "^18.3.11",
"@types/react-dom": "^18.3.0",
"@types/testing-library__jest-dom": "^5.14.9",
"@types/uuid": "^9.0.8",
"@typescript-eslint/eslint-plugin": "^6.21.0",
"@typescript-eslint/parser": "^6.21.0",
"@typescript-eslint/eslint-plugin": "^8.9.0",
"@typescript-eslint/parser": "^8.9.0",
"autoprefixer": "^10.4.19",
"dotenv-cli": "^7.4.2",
"eslint": "^8.57.0",
"eslint": "^8.57.1",
"eslint-config-next": "14.1.0",
"eslint-config-prettier": "^9.1.0",
"eslint-config-react": "^1.1.7",
Expand All @@ -105,6 +105,6 @@
"supabase": "^1.183.5",
"tailwindcss": "^3.4.4",
"ts-node": "^10.9.2",
"typescript": "^5.5.3"
"typescript": "^5.6.3"
}
}
1 change: 1 addition & 0 deletions apps/frontend/tailwind.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,5 +129,6 @@ module.exports = {
/^(fill-(?:slate|gray|zinc|neutral|stone|red|orange|amber|yellow|lime|green|emerald|teal|cyan|sky|blue|indigo|violet|purple|fuchsia|pink|rose)-(?:50|100|200|300|400|500|600|700|800|900|950))$/,
},
],
// eslint-disable-next-line @typescript-eslint/no-require-imports
plugins: [require("@headlessui/tailwindcss")],
};
2 changes: 1 addition & 1 deletion ops/external-prs/src/oso/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ async function refreshCredentials(args: RefreshGCPCredentials) {
});
}
} catch (e) {
logger.info("no existing var found");
logger.info(`no existing var found, ${e}`);
}
await octo.rest.actions.createEnvironmentVariable({
repository_id: repo.data.id,
Expand Down
Loading

0 comments on commit 68769c3

Please sign in to comment.