Closed bawahakim closed 8 months ago
File with comment
// ignore_for_file: type=lint
are not ignored. I think the expected behaviour would be to ignore these
It's not clear what does this mean,lint_staged
does not support things like // ignore_for_file: type=lint
In many (if not all) generated files (e.g. with build_runner
), there is a comment at the top // ignore_for_file: type=lint
which tells the linter to ignore the file. However, it seems lint_staged does not ignore this and throws an error for these type of files
They are totally different things:
lint_staged
handle files in git staged, it does not care about the file type and content
// ignore_for_file: type=lint
is handled by dart lang linters
That is ,the problem is the linter you use (dart analyzer or something else) that does not ignore // ignore_for_file: type=lint
, not lint_staged
File with comment
// ignore_for_file: type=lint
are not ignored. I think the expected behaviour would be to ignore these