Skip to content

Commit

Permalink
chore: fail build on eslint warnings (#6111)
Browse files Browse the repository at this point in the history
modify all the eslint commands to fail if any warnings are present
  • Loading branch information
threepointone authored Jun 25, 2024
1 parent ea6f0b7 commit 6b09f65
Show file tree
Hide file tree
Showing 19 changed files with 21 additions and 21 deletions.
2 changes: 1 addition & 1 deletion packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"license": "MIT OR Apache-2.0",
"author": "[email protected]",
"scripts": {
"check:lint": "eslint .",
"check:lint": "eslint . --max-warnings=0",
"check:type": "tsc",
"test:ci": "vitest run"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/create-cloudflare/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"scripts": {
"build": "node -r esbuild-register scripts/build.ts",
"dev:codemod": "node -r esbuild-register scripts/codemodDev.ts",
"check:lint": "eslint .",
"check:lint": "eslint . --max-warnings=0",
"check:type": "tsc",
"prepublishOnly": "pnpm -w run build",
"test:e2e": "vitest run --config ./vitest-e2e.config.ts",
Expand Down
2 changes: 1 addition & 1 deletion packages/devprod-status-bot/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "1.1.0",
"private": true,
"scripts": {
"check:lint": "eslint .",
"check:lint": "eslint . --max-warnings=0",
"check:type": "tsc",
"deploy": "wrangler deploy"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/edge-preview-authenticated-proxy/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "0.1.4",
"private": true,
"scripts": {
"check:lint": "eslint .",
"check:lint": "eslint . --max-warnings=0",
"check:type": "tsc",
"deploy": "wrangler deploy",
"start": "wrangler dev",
Expand Down
2 changes: 1 addition & 1 deletion packages/format-errors/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"private": true,
"scripts": {
"build": "wrangler build",
"check:lint": "eslint .",
"check:lint": "eslint . --max-warnings=0",
"check:type": "tsc",
"deploy": "wrangler deploy",
"start": "wrangler dev"
Expand Down
2 changes: 1 addition & 1 deletion packages/kv-asset-handler/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
],
"scripts": {
"build": "tsc -d",
"check:lint": "eslint .",
"check:lint": "eslint . --max-warnings=0",
"check:type": "tsc",
"prepack": "npm run build",
"pretest": "npm run build",
Expand Down
2 changes: 1 addition & 1 deletion packages/pages-shared/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"metadata-generator/**/*"
],
"scripts": {
"check:lint": "eslint .",
"check:lint": "eslint . --max-warnings=0",
"check:type": "tsc",
"test": "vitest run",
"test:ci": "vitest run"
Expand Down
2 changes: 1 addition & 1 deletion packages/playground-preview-worker/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"build-middleware": "pnpm run build-middleware:common && pnpm run build-middleware:loader",
"build-middleware:common": "pnpm dlx esbuild ../wrangler/templates/middleware/common.ts --outfile=src/middleware/common.module.template",
"build-middleware:loader": "pnpm dlx esbuild ../wrangler/templates/middleware/loader-modules.ts --outfile=src/middleware/loader.module.template",
"check:lint": "eslint .",
"check:lint": "eslint . --max-warnings=0",
"check:type": "tsc",
"deploy": "wrangler -j deploy",
"deploy:testing": "wrangler -j deploy -e testing",
Expand Down
2 changes: 1 addition & 1 deletion packages/prerelease-registry/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"main": "dist/index.js",
"scripts": {
"build": "wrangler pages functions build --fallback-service='' ./functions/routes --outdir=dist",
"check:lint": "eslint .",
"check:lint": "eslint . --max-warnings=0",
"check:type": "tsc",
"predeploy": "pnpm run build",
"deploy": "wrangler deploy dist/index.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/quick-edit-extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"publisher": "cloudflare",
"browser": "./dist/extension.js",
"scripts": {
"check:lint": "eslint src",
"check:lint": "eslint src --max-warnings=0",
"check:type": "tsc",
"package-web": "node -r esbuild-register scripts/bundle.ts",
"vscode:prepublish": "pnpm run package-web",
Expand Down
2 changes: 1 addition & 1 deletion packages/quick-edit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"license": "BSD-3-Clause",
"author": "[email protected]",
"scripts": {
"check:lint": "eslint functions",
"check:lint": "eslint functions --max-warnings=0",
"check:type": "tsc",
"custom:build": "./build.sh",
"deploy": "CLOUDFLARE_ACCOUNT_ID=e35fd947284363a46fd7061634477114 pnpm exec wrangler pages deploy --project-name quick-edit ./web",
Expand Down
2 changes: 1 addition & 1 deletion packages/turbo-r2-archive/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
],
"scripts": {
"build": "wrangler deploy -j --dry-run --outdir=./dist",
"check:lint": "eslint .",
"check:lint": "eslint . --max-warnings=0",
"deploy": "wrangler deploy -j",
"start": "wrangler dev -j",
"type:check": "tsc"
Expand Down
2 changes: 1 addition & 1 deletion packages/vitest-pool-workers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
"scripts": {
"build": "node scripts/bundle.mjs && tsc -p tsconfig.emit.json",
"capnp:rtti": "capnpc -o ts scripts/rtti/rtti.capnp",
"check:lint": "eslint .",
"check:lint": "eslint . --max-warnings=0",
"check:type": "tsc && tsc -p src/worker/tsconfig.json && tsc -p types/tsconfig.json",
"dev": "node scripts/bundle.mjs watch",
"test": "vitest run",
Expand Down
2 changes: 1 addition & 1 deletion packages/workers-playground/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"build": "tsc && vite build",
"build:testing": "tsc && vite build -m development",
"check": "pnpm exec tsx ./generate-default-hashes.ts check",
"check:lint": "eslint src",
"check:lint": "eslint src --max-warnings=0",
"check:type": "tsc",
"deploy": "CLOUDFLARE_ACCOUNT_ID=e35fd947284363a46fd7061634477114 wrangler pages deploy --project-name workers-playground ./dist",
"dev": "vite",
Expand Down
2 changes: 1 addition & 1 deletion packages/workers.new/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "0.0.1",
"private": true,
"scripts": {
"check:lint": "eslint .",
"check:lint": "eslint . --max-warnings=0",
"deploy": "CLOUDFLARE_ACCOUNT_ID=$WORKERS_NEW_CLOUDFLARE_ACCOUNT_ID CLOUDFLARE_API_TOKEN=$WORKERS_NEW_CLOUDFLARE_API_TOKEN wrangler deploy",
"dev": "wrangler dev",
"test": "vitest run",
Expand Down
2 changes: 1 addition & 1 deletion packages/wrangler/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
"assert-git-version": "node -r esbuild-register scripts/assert-git-version.ts",
"build": "pnpm run clean && pnpm run bundle && pnpm run emit-types && pnpm run generate-json-schema",
"bundle": "node -r esbuild-register scripts/bundle.ts",
"check:lint": "eslint .",
"check:lint": "eslint . --max-warnings=0",
"check:type": "tsc",
"clean": "rimraf wrangler-dist miniflare-dist emitted-types",
"dev": "pnpm run clean && concurrently -c black,blue --kill-others-on-fail false \"pnpm run bundle --watch\" \"pnpm run check:type --watch --preserveWatchOutput\"",
Expand Down
6 changes: 3 additions & 3 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion tools/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"private": true,
"description": "Tooling for this monorepo CI",
"scripts": {
"check:lint": "eslint .",
"check:lint": "eslint . --max-warnings=0",
"check:type": "tsc",
"test:ci": "vitest run",
"test:file": "node -r esbuild-register test/run-test-file.ts"
Expand Down
2 changes: 1 addition & 1 deletion turbo/generators/templates/package.json.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"private": true,
"scripts": {
"build": "echo 'No build step configured'",
"check:lint": "eslint .",
"check:lint": "eslint . --max-warnings=0",
"check:type": "tsc",
"test": "vitest run",
"test:ci": "vitest run"
Expand Down

0 comments on commit 6b09f65

Please sign in to comment.