-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature: Allow ignore all error codes from file paths #19
Comments
Thanks for suggesting a feature. This tool was written to ignore only specific strictness-related error codes, not all errors from some files. Can you tell me what is your use case to ignore all errors in a given file? What type of file is that? Why do you need to ignore it entirely in typechecking instead of fixing it? |
We have library written (self-written) in And |
I see. In this case, have you considered writing the library in JavaScript, if you don't need the typechecking? Anyway, it seems worth migrating to a different config format for V2 of this library. The new format should support ignoring all errors in a given path. I don't have any concrete plans when it will come out, though. |
We need typecheck and use it, but different versions of postcss, webpack, vue, nuxt etc Adding us headache Okay) You tool really for more strict cases, we already write small script to our needs. |
I would also find such a feature useful. |
Thanks for providing another possible use case for this feature. I am not opposed to adding such option to As for your use case, I would rethink whether such a pre-commit hook is safe to use. Imagine the following 2 files:
export const port = 9090;
import { port } from "./consts.ts";
startServer(port);
function startServer(port: number) {
// ... (presumably starts some server)
} There are no typechecking errors right now. Imagine you change export const port = '9090'; // it is a string now You stage That is why IMO such a pre-commit hook is unsafe. I would stay that limiting some operation to only staged files is safe when the checks/transformations affect just that one file. For checks in which one file can affect another one, I wouldn't rely on checking only staged files. |
Thanks for the feedback, I agree! Before such a hook is safe, it'd need to consider each staged file as well as any file in those files' dependency graph. |
I think that would be usefull to ignore all error codes from paths, TS has a lot of codes and update
ignored-error-codes.json
every time is not very comfortableIt can be argument to cli that reassign
--ignored-error-codes
The text was updated successfully, but these errors were encountered: