-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
CLI option for lint ignore directives #11012
Comments
Duplicate of denoland/deno_lint#166 (except for command line option) FYI there is a standalone binary including the linter only, which is available on the release page of denoland/deno_lint. This binary is used for running lint on the denoland/deno repo, and has the capability of configuring what rules should/shouldn't be run via a config file. For a concrete example see .dlint.json. If you're interested in trying it out, please download and use it to see if it works well for your usecases, and give us a feedback. |
@magurotuna : Thanks, I'll try that out today. But do note that one of the reasons I've decided to base our dev tools on Deno is the ease with which it's kept up to date. Being able to simply run
I appreciate that, but I have to politely disagree. A linter should absolutely not force it's opinions upon other code -- you can't possibly know what's good and acceptable for our code base, and I must add, you've all done amazing work with Deno, and it is appreciated. I am just looking to leverage that to the maximum extent possible. My devs will simply not lint the code if in their eyes it causes more work than the perceived value -- so I need to make it as easy as possible, and provide the maximum value for the minimum extra work. |
@magurotuna : At the risk of being stupid... I don't see how to specify the JSON config file in the command line. Does this depend on the |
@magurotuna : How do I use the configuration file with dlint? I've scoured the docs and issues and I'm just not able to find it. |
@lawrence-dol
Yes, I'm aware of that. I suggested using the dlint binary just for trial to see if it works fine for you. Give us a feedback whether you like it or not - I think it will drive this feature towards being introduced in |
@magurotuna : Thanks, that works like a charm. This is exactly what I'd like to do with |
BTW, allowing the full filename to be specified (as opposed to the folder and requiring the name to be It would be useful for tool deployment if the |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions. |
Effectively a duplicate of #3179 which is slowly coming. When we address linting as part of adding configuration, we should help ensure it meets the needs here. Individual command line flags are likely impractical to implement (partly why we avoided it for so long). |
I have hooked up Deno to lint source files on-demand. But there are numerous linting rules which we, as a company, need to ignore. Adding them to every single source file would be highly cumbersome, and undesirable. I will absolutely get push back from developers who will simply refuse to lint their code entirely.
Is it possible to provide a global list of ignore rules for
deno lint
in the command line, either with an option or file listing the rules to ignore? If not, could this be added? These would have to be ignored for the purpose of reporting unused ignore rules actually embedded in the file.Currently I have to do a kludge that involves prepending each file to be linted with my global list of directives to ignore, which means (a) that error lines are out by 1 because Deno sees the ignore line as part of the input source, (b) Deno reports a bunch of
(ban-unused-ignore)
errors, and (c) the reported filename isstdin
instead of the actual file being linted (which breaks the editor link to the file & line in error).The text was updated successfully, but these errors were encountered: