Upgrade typescript-eslint from 5.62.0 to 8.19.1 and remove eslint-config-react-app (#5006)
This commit is contained in:
		
				
					committed by
					
						 Frank Noirot
						Frank Noirot
					
				
			
			
				
	
			
			
			
						parent
						
							339de00e68
						
					
				
				
					commit
					f7bae1d221
				
			| @ -5,11 +5,12 @@ | ||||
|     }, | ||||
|     "plugins": [ | ||||
|       "css-modules", | ||||
|       "jest", | ||||
|       "react", | ||||
|       "suggest-no-throw", | ||||
|       "@typescript-eslint" | ||||
|     ], | ||||
|     "extends": [ | ||||
|       "react-app", | ||||
|       "react-app/jest", | ||||
|       "plugin:css-modules/recommended" | ||||
|     ], | ||||
|     "rules": { | ||||
|  | ||||
							
								
								
									
										10
									
								
								package.json
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								package.json
									
									
									
									
									
								
							| @ -91,8 +91,8 @@ | ||||
|     "build:wasm": "yarn wasm-prep && cd src/wasm-lib && wasm-pack build --release --target web --out-dir pkg && cargo test -p kcl-lib export_bindings && cd ../.. && yarn isomorphic-copy-wasm && yarn fmt", | ||||
|     "remove-importmeta": "sed -i 's/import.meta.url/window.location.origin/g' \"./src/wasm-lib/pkg/wasm_lib.js\"; sed -i '' 's/import.meta.url/window.location.origin/g' \"./src/wasm-lib/pkg/wasm_lib.js\" || echo \"sed for both mac and linux\"", | ||||
|     "wasm-prep": "rimraf src/wasm-lib/pkg && mkdirp src/wasm-lib/pkg && rimraf src/wasm-lib/kcl/bindings", | ||||
|     "lint-fix": "eslint --fix src e2e packages/codemirror-lsp-client", | ||||
|     "lint": "eslint --max-warnings 0 src e2e packages/codemirror-lsp-client", | ||||
|     "lint-fix": "eslint --fix src/**/*.ts src/**/*.tsx e2e/**/*.ts packages/codemirror-lsp-client/src/**/*.ts", | ||||
|     "lint": "eslint --max-warnings 0 src/**/*.ts src/**/*.tsx e2e/**/*.ts packages/codemirror-lsp-client/src/**/*.ts", | ||||
|     "files:set-version": "echo \"$(jq --arg v \"$VERSION\" '.version=$v' package.json --indent 2)\" > package.json", | ||||
|     "files:set-notes": "./scripts/set-files-notes.sh", | ||||
|     "files:flip-to-nightly": "./scripts/flip-files-to-nightly.sh", | ||||
| @ -171,8 +171,6 @@ | ||||
|     "@types/uuid": "^9.0.8", | ||||
|     "@types/wicg-file-system-access": "^2023.10.5", | ||||
|     "@types/ws": "^8.5.13", | ||||
|     "@typescript-eslint/eslint-plugin": "^5.0.0", | ||||
|     "@typescript-eslint/parser": "^5.0.0", | ||||
|     "@vitejs/plugin-react": "^4.3.0", | ||||
|     "@vitest/web-worker": "^1.5.0", | ||||
|     "@xstate/cli": "^0.5.17", | ||||
| @ -182,9 +180,10 @@ | ||||
|     "electron-builder": "24.13.3", | ||||
|     "electron-notarize": "1.2.2", | ||||
|     "eslint": "^8.0.1", | ||||
|     "eslint-config-react-app": "^7.0.1", | ||||
|     "eslint-plugin-css-modules": "^2.12.0", | ||||
|     "eslint-plugin-import": "^2.30.0", | ||||
|     "eslint-plugin-jest": "^28.10.0", | ||||
|     "eslint-plugin-react": "^7.37.3", | ||||
|     "eslint-plugin-suggest-no-throw": "^1.0.0", | ||||
|     "happy-dom": "^16.3.0", | ||||
|     "http-server": "^14.1.1", | ||||
| @ -200,6 +199,7 @@ | ||||
|     "tailwindcss": "^3.4.1", | ||||
|     "ts-node": "^10.0.0", | ||||
|     "typescript": "^5.7.2", | ||||
|     "typescript-eslint": "^8.19.1", | ||||
|     "vite": "^5.4.6", | ||||
|     "vite-plugin-package-version": "^1.1.0", | ||||
|     "vite-tsconfig-paths": "^4.3.2", | ||||
|  | ||||
| @ -157,39 +157,38 @@ export const ModelingMachineProvider = ({ | ||||
|         'enable copilot': () => { | ||||
|           editorManager.setCopilotEnabled(true) | ||||
|         }, | ||||
|         // tsc reports this typing as perfectly fine, but eslint is complaining. | ||||
|         // It's actually nonsensical, so I'm quieting. | ||||
|         // eslint-disable-next-line @typescript-eslint/no-misused-promises | ||||
|         'sketch exit execute': async ({ | ||||
|           context: { store }, | ||||
|         }): Promise<void> => { | ||||
|           // When cancelling the sketch mode we should disable sketch mode within the engine. | ||||
|           await engineCommandManager.sendSceneCommand({ | ||||
|             type: 'modeling_cmd_req', | ||||
|             cmd_id: uuidv4(), | ||||
|             cmd: { type: 'sketch_mode_disable' }, | ||||
|           }) | ||||
|  | ||||
|           sceneInfra.camControls.syncDirection = 'clientToEngine' | ||||
|  | ||||
|           if (cameraProjection.current === 'perspective') { | ||||
|             await sceneInfra.camControls.snapToPerspectiveBeforeHandingBackControlToEngine() | ||||
|           } | ||||
|  | ||||
|           sceneInfra.camControls.syncDirection = 'engineToClient' | ||||
|  | ||||
|           store.videoElement?.pause() | ||||
|  | ||||
|           return kclManager | ||||
|             .executeCode() | ||||
|             .then(() => { | ||||
|               if (engineCommandManager.engineConnection?.idleMode) return | ||||
|  | ||||
|               store.videoElement?.play().catch((e) => { | ||||
|                 console.warn('Video playing was prevented', e) | ||||
|               }) | ||||
|         'sketch exit execute': ({ context: { store } }) => { | ||||
|           // TODO: Remove this async callback.  For some reason eslint wouldn't | ||||
|           // let me disable @typescript-eslint/no-misused-promises for the line. | ||||
|           ;(async () => { | ||||
|             // When cancelling the sketch mode we should disable sketch mode within the engine. | ||||
|             await engineCommandManager.sendSceneCommand({ | ||||
|               type: 'modeling_cmd_req', | ||||
|               cmd_id: uuidv4(), | ||||
|               cmd: { type: 'sketch_mode_disable' }, | ||||
|             }) | ||||
|             .catch(reportRejection) | ||||
|  | ||||
|             sceneInfra.camControls.syncDirection = 'clientToEngine' | ||||
|  | ||||
|             if (cameraProjection.current === 'perspective') { | ||||
|               await sceneInfra.camControls.snapToPerspectiveBeforeHandingBackControlToEngine() | ||||
|             } | ||||
|  | ||||
|             sceneInfra.camControls.syncDirection = 'engineToClient' | ||||
|  | ||||
|             store.videoElement?.pause() | ||||
|  | ||||
|             return kclManager | ||||
|               .executeCode() | ||||
|               .then(() => { | ||||
|                 if (engineCommandManager.engineConnection?.idleMode) return | ||||
|  | ||||
|                 store.videoElement?.play().catch((e) => { | ||||
|                   console.warn('Video playing was prevented', e) | ||||
|                 }) | ||||
|               }) | ||||
|               .catch(reportRejection) | ||||
|           })().catch(reportRejection) | ||||
|         }, | ||||
|         'Set mouse state': assign(({ context, event }) => { | ||||
|           if (event.type !== 'Set mouse state') return {} | ||||
|  | ||||
		Reference in New Issue
	
	Block a user