feat: add million-lint (#607)

* feat: Add `million-lint`

* fix: some parts not working because of missing skipTransform flag

* chore: address pull request feedback

* chore: make with-million-lint method that can be used when debugging performance

* fix: format issue

* fix: format issue

---------

Co-authored-by: Meier Lukas <meierschlumpf@gmail.com>
This commit is contained in:
Thomas Camlong
2024-08-29 22:25:51 +02:00
committed by GitHub
parent c7a7cef1a2
commit 94984ac11b
5 changed files with 751 additions and 40 deletions

3
.gitignore vendored
View File

@@ -54,4 +54,5 @@ yarn-error.log*
*.log
apps/tasks/tasks.cjs
apps/websocket/wssServer.cjs
apps/websocket/wssServer.cjs
apps/nextjs/.million/

View File

@@ -2,6 +2,7 @@
"recommendations": [
"dbaeumer.vscode-eslint",
"esbenp.prettier-vscode",
"yoavbls.pretty-ts-errors"
"yoavbls.pretty-ts-errors",
"million.million-lint"
]
}

View File

@@ -1,5 +1,8 @@
// Importing env files here to validate on build
import "@homarr/auth/env.mjs";
import MillionLint from "@million/lint";
import "./src/env.mjs";
/** @type {import("next").NextConfig} */
@@ -28,4 +31,7 @@ const config = {
},
};
// Skip transform is used because of webpack loader, without it for example 'Tooltip.Floating' will not work and show an error
const withMillionLint = MillionLint.next({ rsc: true, skipTransform: true, telemetry: false });
export default config;

View File

@@ -27,6 +27,7 @@
"@homarr/log": "workspace:^",
"@homarr/modals": "workspace:^0.1.0",
"@homarr/notifications": "workspace:^0.1.0",
"@homarr/server-settings": "workspace:^0.1.0",
"@homarr/spotlight": "workspace:^0.1.0",
"@homarr/translation": "workspace:^0.1.0",
"@homarr/ui": "workspace:^0.1.0",
@@ -37,7 +38,7 @@
"@mantine/hooks": "^7.12.1",
"@mantine/modals": "^7.12.1",
"@mantine/tiptap": "^7.12.1",
"@homarr/server-settings": "workspace:^0.1.0",
"@million/lint": "1.0.0-rc.84",
"@t3-oss/env-nextjs": "^0.11.1",
"@tanstack/react-query": "^5.52.2",
"@tanstack/react-query-devtools": "^5.52.2",

776
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff