Skip to content

Commit a5df23a

Browse files
ntottendan-lee
andauthored
Fix running format:ci, lint:ci in action (#606)
Co-authored-by: Daniel Lehr <[email protected]>
1 parent 161d139 commit a5df23a

File tree

13 files changed

+75
-352
lines changed

13 files changed

+75
-352
lines changed

.eslintrc.cjs

+9-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,15 @@
22
module.exports = {
33
root: true,
44
parser: "@typescript-eslint/parser",
5-
ignorePatterns: ["dist", ".eslintrc.cjs", "packages/config/src/index.d.ts"],
5+
ignorePatterns: [
6+
"dist",
7+
".eslintrc.cjs",
8+
"packages/zudoku/cli.js",
9+
"packages/zudoku/standalone",
10+
"packages/zudoku/scripts/*.js",
11+
"packages/config/src/index.d.ts",
12+
"examples/many-apis/download.js",
13+
],
614
parserOptions: {
715
project: "./tsconfig.eslint.json",
816
ecmaFeatures: {

.github/workflows/build.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040

4141
- uses: nrwl/nx-set-shas@v4
4242

43-
- run: nx run-many -t root:lint:ci root:format:ci build:ci test
43+
- run: nx run-many -t lint:ci format:ci build:ci test
4444

4545
- name: Get Variables
4646
id: vars

.prettierignore

+3-1
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,11 @@ coverage/
44
node_modules/
55
packages/zudoku/lib/
66
packages/zudoku/standalone/
7+
packages/zudoku/src/app/demo-cdn.html
78
/.nx/cache
89
/.nx/workspace-data
910
pnpm-lock.yaml
1011
.next/
1112
stats.html
12-
.vercel/
13+
.vercel/
14+
examples/many-apis/apis/

CONTRIBUTING.md

+7-5
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,14 @@
44

55
- [Fork the repository](https://github.com/Hyperfoil/Horreum/fork)
66

7-
- Clone the project locally
7+
- Clone the project locally
88

99
```bash
1010
git clone https://github.com/your_github_username/zudoku.git
11-
```
11+
```
1212

1313
- Change the working directory
14+
1415
```
1516
cd zudoku
1617
```
@@ -34,10 +35,11 @@ When working on Zudoku, you will need to create a `.env` file in the root of the
3435
```
3536
ZUDOKU_INTERNAL_DEV=true
3637
```
37-
> [!IMPORTANT]
38-
> If you are a Zuplo employee you should authenticate to NX Cloud in order to use the build cache.
39-
>
38+
39+
> [!IMPORTANT] If you are a Zuplo employee you should authenticate to NX Cloud in order to use the build cache.
40+
4041
To authenticate run:
42+
4143
```
4244
nx login
4345
```

examples/with-auth0/zudoku.config.ts

+1-4
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,7 @@ const config: ZudokuConfig = {
1414
},
1515
],
1616
},
17-
protectedRoutes: [
18-
"/documentation/installation",
19-
"/api/**",
20-
],
17+
protectedRoutes: ["/documentation/installation", "/api/**"],
2118
redirects: [{ from: "/", to: "/documentation/introduction" }],
2219
docs: {
2320
files: "/pages/**/*.mdx",

package.json

+8-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
"type": "module",
66
"scripts": {
77
"build": "nx run-many -t=build -p zudoku config",
8-
"mismatches": "syncpack list-mismatches",
98
"lint": "eslint --cache --fix .",
109
"lint:ci": "eslint .",
1110
"format": "prettier --write .",
@@ -46,7 +45,6 @@
4645
"nx": "20.3.3",
4746
"prettier": "3.4.2",
4847
"prettier-plugin-organize-imports": "4.1.0",
49-
"syncpack": "13.0.1",
5048
"typescript": "5.7.3"
5149
},
5250
"pnpm": {
@@ -60,5 +58,13 @@
6058
"patchedDependencies": {
6159
6260
}
61+
},
62+
"nx": {
63+
"includedScripts": [
64+
"lint",
65+
"lint:ci",
66+
"format",
67+
"format:ci"
68+
]
6369
}
6470
}

packages/zudoku/src/app/demo-cdn.html

+31-31
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,34 @@
11
<!doctype html>
22
<html lang="en">
3-
<head>
4-
<meta charset="UTF-8" />
5-
<link
6-
rel="icon"
7-
type="image/svg+xml"
8-
href="https://cdn.zudoku.dev/logos/favicon.svg"
9-
/>
10-
<meta
11-
name="viewport"
12-
content="width=device-width, initial-scale=1.0, minimum-scale=1.0"
13-
/>
14-
<title>Zudoku Demo</title>
15-
<script
16-
type="module"
17-
crossorigin
18-
src="https://cdn.zudoku.dev/latest/demo.js"
19-
></script>
20-
<link
21-
rel="stylesheet"
22-
crossorigin
23-
href="https://cdn.zudoku.dev/latest/style.css"
24-
/>
25-
<script>
26-
!function(t,e){var o,n,p,r;e.__SV||(window.posthog=e,e._i=[],e.init=function(i,s,a){function g(t,e){var o=e.split(".");2==o.length&&(t=t[o[0]],e=o[1]),t[e]=function(){t.push([e].concat(Array.prototype.slice.call(arguments,0)))}}(p=t.createElement("script")).type="text/javascript",p.async=!0,p.src=s.api_host.replace(".i.posthog.com","-assets.i.posthog.com")+"/static/array.js",(r=t.getElementsByTagName("script")[0]).parentNode.insertBefore(p,r);var u=e;for(void 0!==a?u=e[a]=[]:a="posthog",u.people=u.people||[],u.toString=function(t){var e="posthog";return"posthog"!==a&&(e+="."+a),t||(e+=" (stub)"),e},u.people.toString=function(){return u.toString(1)+".people (stub)"},o="init push capture register register_once register_for_session unregister unregister_for_session getFeatureFlag getFeatureFlagPayload isFeatureEnabled reloadFeatureFlags updateEarlyAccessFeatureEnrollment getEarlyAccessFeatures on onFeatureFlags onSessionId getSurveys getActiveMatchingSurveys renderSurvey canRenderSurvey getNextSurveyStep identify setPersonProperties group resetGroups setPersonPropertiesForFlags resetPersonPropertiesForFlags setGroupPropertiesForFlags resetGroupPropertiesForFlags reset get_distinct_id getGroups get_session_id get_session_replay_url alias set_config startSessionRecording stopSessionRecording sessionRecordingStarted captureException loadToolbar get_property getSessionProperty createPersonProfile opt_in_capturing opt_out_capturing has_opted_in_capturing has_opted_out_capturing clear_opt_in_out_capturing debug".split(" "),n=0;n<o.length;n++)g(u,o[n]);e._i.push([i,s,a])},e.__SV=1)}(document,window.posthog||[]);
27-
posthog.init('phc_l8rjm0vHBMwNdGeBRDrK8UIYjyVxZyBAtnYo2hS18OY',{api_host:'https://us.i.posthog.com', person_profiles: 'identified_only' // or 'always' to create profiles for anonymous users as well
28-
})
29-
</script>
30-
</head>
31-
<body>
32-
<div id="root"></div>
33-
</body>
3+
<head>
4+
<meta charset="UTF-8" />
5+
<link
6+
rel="icon"
7+
type="image/svg+xml"
8+
href="https://cdn.zudoku.dev/logos/favicon.svg"
9+
/>
10+
<meta
11+
name="viewport"
12+
content="width=device-width, initial-scale=1.0, minimum-scale=1.0"
13+
/>
14+
<title>Zudoku Demo</title>
15+
<script
16+
type="module"
17+
crossorigin
18+
src="https://cdn.zudoku.dev/latest/demo.js"
19+
></script>
20+
<link
21+
rel="stylesheet"
22+
crossorigin
23+
href="https://cdn.zudoku.dev/latest/style.css"
24+
/>
25+
<script>
26+
!function(t,e){var o,n,p,r;e.__SV||(window.posthog=e,e._i=[],e.init=function(i,s,a){function g(t,e){var o=e.split(".");2==o.length&&(t=t[o[0]],e=o[1]),t[e]=function(){t.push([e].concat(Array.prototype.slice.call(arguments,0)))}}(p=t.createElement("script")).type="text/javascript",p.async=!0,p.src=s.api_host.replace(".i.posthog.com","-assets.i.posthog.com")+"/static/array.js",(r=t.getElementsByTagName("script")[0]).parentNode.insertBefore(p,r);var u=e;for(void 0!==a?u=e[a]=[]:a="posthog",u.people=u.people||[],u.toString=function(t){var e="posthog";return"posthog"!==a&&(e+="."+a),t||(e+=" (stub)"),e},u.people.toString=function(){return u.toString(1)+".people (stub)"},o="init push capture register register_once register_for_session unregister unregister_for_session getFeatureFlag getFeatureFlagPayload isFeatureEnabled reloadFeatureFlags updateEarlyAccessFeatureEnrollment getEarlyAccessFeatures on onFeatureFlags onSessionId getSurveys getActiveMatchingSurveys renderSurvey canRenderSurvey getNextSurveyStep identify setPersonProperties group resetGroups setPersonPropertiesForFlags resetPersonPropertiesForFlags setGroupPropertiesForFlags resetGroupPropertiesForFlags reset get_distinct_id getGroups get_session_id get_session_replay_url alias set_config startSessionRecording stopSessionRecording sessionRecordingStarted captureException loadToolbar get_property getSessionProperty createPersonProfile opt_in_capturing opt_out_capturing has_opted_in_capturing has_opted_out_capturing clear_opt_in_out_capturing debug".split(" "),n=0;n<o.length;n++)g(u,o[n]);e._i.push([i,s,a])},e.__SV=1)}(document,window.posthog||[]);
27+
posthog.init('phc_l8rjm0vHBMwNdGeBRDrK8UIYjyVxZyBAtnYo2hS18OY',{api_host:'https://us.i.posthog.com', person_profiles: 'identified_only' // or 'always' to create profiles for anonymous users as well
28+
})
29+
</script>
30+
</head>
31+
<body>
32+
<div id="root"></div>
33+
</body>
3434
</html>

packages/zudoku/src/cli/common/output.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,7 @@ export async function printTableToConsoleAndExitGracefully(table: any) {
5656

5757
interface WriteStreamWithHandle {
5858
_handle: {
59-
// eslint-disable-next-line @typescript-eslint/ban-types
60-
setBlocking: Function;
59+
setBlocking: (blocking: boolean) => void;
6160
};
6261
isTTY: boolean;
6362
}

packages/zudoku/src/cli/dev/handler.ts

+6
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,12 @@ export async function dev(argv: Arguments) {
6161
void exit();
6262
});
6363
process.on("unhandledRejection", (e) => {
64+
if (e instanceof DOMException && e.name === "AbortError") {
65+
// eslint-disable-next-line no-console
66+
console.log(`[Abort] ${e.message}`);
67+
return;
68+
}
69+
6470
// eslint-disable-next-line no-console
6571
console.error("Unhandled rejection", e);
6672
void exit();

packages/zudoku/src/lib/ui/Input.tsx

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
import * as React from "react";
22
import { cn } from "../util/cn.js";
33

4-
export interface InputProps
5-
extends React.InputHTMLAttributes<HTMLInputElement> {}
4+
type InputProps = React.InputHTMLAttributes<HTMLInputElement>;
65

76
const Input = React.forwardRef<HTMLInputElement, InputProps>(
87
({ className, type, ...props }, ref) => {

packages/zudoku/src/vite/plugin.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import react from "@vitejs/plugin-react";
22
import { type PluginOption } from "vite";
3-
import { vitePluginSsrCss } from "./css/plugin.js";
43
import { LoadedConfig, type ZudokuPluginOptions } from "../config/config.js";
4+
import { vitePluginSsrCss } from "./css/plugin.js";
55
import viteApiKeysPlugin from "./plugin-api-keys.js";
66
import viteApiPlugin from "./plugin-api.js";
77
import viteAuthPlugin from "./plugin-auth.js";

0 commit comments

Comments
 (0)