Skip to content

Commit d609ac7

Browse files
update eslint versions and ban direct console usage in Wrangler, Miniflare and C3 (#9861)
* update eslint versions and ban direct console usage in Wrangler, Miniflare and C3 * fixup! update eslint versions and ban direct console usage in Wrangler, Miniflare and C3 * fixup! update eslint versions and ban direct console usage in Wrangler, Miniflare and C3 * fixup! update eslint versions and ban direct console usage in Wrangler, Miniflare and C3 * rebase catchups of new eslint errors
1 parent ca684a8 commit d609ac7

File tree

128 files changed

+586
-530
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

128 files changed

+586
-530
lines changed

packages/cli/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@
2626
"@clack/prompts": "^0.6.3",
2727
"@cloudflare/eslint-config-worker": "workspace:*",
2828
"@cloudflare/workers-tsconfig": "workspace:*",
29-
"@typescript-eslint/eslint-plugin": "^6.9.0",
30-
"@typescript-eslint/parser": "^6.9.0",
29+
"@typescript-eslint/eslint-plugin": "catalog:default",
30+
"@typescript-eslint/parser": "catalog:default",
3131
"chalk": "^5.2.0",
3232
"esbuild": "catalog:default",
3333
"log-update": "^5.0.1",

packages/cloudflare-workers-bindings-extension/.eslintrc.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
"format": ["camelCase", "PascalCase"]
1515
}
1616
],
17-
"@typescript-eslint/semi": "warn",
1817
"curly": "warn",
1918
"eqeqeq": "warn",
2019
"no-throw-literal": "warn",

packages/cloudflare-workers-bindings-extension/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,8 @@
117117
"@types/mocha": "^10.0.7",
118118
"@types/node": "20.x",
119119
"@types/vscode": "^1.92.0",
120-
"@typescript-eslint/eslint-plugin": "^7.14.1",
121-
"@typescript-eslint/parser": "^7.11.0",
120+
"@typescript-eslint/eslint-plugin": "catalog:default",
121+
"@typescript-eslint/parser": "catalog:default",
122122
"@vscode/test-electron": "^2.4.1",
123123
"concurrently": "^8.2.2",
124124
"esbuild": "catalog:default",

packages/containers-shared/.eslintrc.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
"format": ["camelCase", "PascalCase"]
1515
}
1616
],
17-
"@typescript-eslint/semi": "warn",
1817
"curly": "warn",
1918
"eqeqeq": "warn",
2019
"no-throw-literal": "warn",

packages/create-cloudflare/.eslintrc.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
module.exports = {
22
root: true,
33
extends: ["@cloudflare/eslint-config-worker"],
4+
rules: {
5+
"no-console": "error",
6+
},
47
ignorePatterns: [
58
"dist",
69
"scripts",

packages/create-cloudflare/.prettierrc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,5 @@
1313
"^[.]$",
1414
"^[.]/index$",
1515
"<TYPES>"
16-
],
17-
"importOrderTypeScriptVersion": "5.0.4"
16+
]
1817
}

packages/create-cloudflare/e2e/helpers/framework-helpers.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ export async function runC3ForFrameworkTest(
7878

7979
const match = output.replaceAll("\n", "").match(deployedUrlRe);
8080
if (!match || !match[1]) {
81+
// eslint-disable-next-line no-console
8182
console.error(output);
8283
expect(false, "Couldn't find deployment url in C3 output").toBe(true);
8384
return "";

packages/create-cloudflare/e2e/helpers/index.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,12 +90,16 @@ export const test = originalTest.extend<{
9090
const { logPath, logStream } = createTestLogStream(task);
9191

9292
onTestFailed(() => {
93+
// eslint-disable-next-line no-console
9394
console.error("##[group]Logs from failed test:", logPath);
9495
try {
96+
// eslint-disable-next-line no-console
9597
console.error(readFileSync(logPath, "utf8"));
9698
} catch {
99+
// eslint-disable-next-line no-console
97100
console.error("Unable to read log file");
98101
}
102+
// eslint-disable-next-line no-console
99103
console.error("##[endgroup]");
100104
});
101105

packages/create-cloudflare/e2e/helpers/to-exist.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@ declare module "vitest" {
55
interface CustomMatchers<R = unknown> {
66
toExist(): R;
77
}
8+
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
89
interface Assertion<T> extends CustomMatchers<T> {}
10+
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
911
interface AsymmetricMatchersContaining extends CustomMatchers {}
1012
}
1113

packages/create-cloudflare/e2e/tests/frameworks/frameworks.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,7 @@ describe
143143

144144
await verifyTypes(testConfig, frameworkConfig, project.path);
145145
} catch (e) {
146+
// eslint-disable-next-line no-console
146147
console.error("ERROR", e);
147148
expect.fail(
148149
"Failed due to an exception while running C3. See logs for more details",

0 commit comments

Comments
 (0)