kinode-dao / kit

Development toolkit for Kinode OS
Apache License 2.0
11 stars 2 forks source link

feature: please don't error-out and refuse to build UI if i have TS warnings #100

Open 0x70b1a5 opened 6 months ago

0x70b1a5 commented 6 months ago

Is your feature request related to a problem? Please describe. I'm always frustrated when I have to fix every WARN in my project because I am a sloppy coder who needs to PUSH

Describe the solution you'd like Just build my app! I don't heed warnings anyway!

Additional context

Example output:


src/components/PermissionsModal.tsx:5:10 - error TS6133: 'FaChevronDown' is declared but its value is never read.

5 import { FaChevronDown, FaX } from "react-icons/fa6";
           ~~~~~~~~~~~~~

Found 1 error in src/components/PermissionsModal.tsx:5

ERROR src/build/mod.rs:35: error: Command `bash ["-c", "source ~/.nvm/nvm.sh && nvm use v20.0.0 && npm run build:copy"]` failed with exit code 2
ERROR src/build/mod.rs:277: error: Command `bash ["-c", "source ~/.nvm/nvm.sh && nvm use v20.0.0 && npm run build:copy"]` failed with exit code 2
ERROR src/build/mod.rs:334: error: Command `bash ["-c", "source ~/.nvm/nvm.sh && nvm use v20.0.0 && npm run build:copy"]` failed with exit code 2
ERROR src/build/mod.rs:379: error: Command `bash ["-c", "source ~/.nvm/nvm.sh && nvm use v20.0.0 && npm run build:copy"]` failed with exit code 2
ERROR src/build_start_package/mod.rs:8: error: Command `bash ["-c", "source ~/.nvm/nvm.sh && nvm use v20.0.0 && npm run build:copy"]` failed with exit code 2
nick1udwig commented 5 months ago

@0x70b1a5 Can you help me either

  1. Repro this. I tried to repro by changing line 6 of the chat + ui template from
    import { SendChatMessage } from "./types/Chat";

    to

    import { SendChatMessage, NewMessage } from "./types/Chat";

    which sets off my linter with the message

    @typescript-eslint/no-unused-vars: 'NewMessage' is defined but never used.

    but does not return an error during build like in the case you report.

  2. Give me more info about error code in warning vs "legitimate" fail case. Ideally kit would be able to read the error code and determine a benign "warning" vs legit "error" (though I note in your case it does claim it is an "error").