Skip to content
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

fix(lint): skip linting minified files #26633

Open
wants to merge 12 commits into
base: main
Choose a base branch
from

Conversation

bartlomieju
Copy link
Member

Closes #26574

@bartlomieju
Copy link
Member Author

We should apply the same heuristic for deno fmt/deno doc and others.

@bartlomieju bartlomieju added this to the 2.1.0 milestone Oct 29, 2024
@marvinhagemeister
Copy link
Contributor

marvinhagemeister commented Oct 30, 2024

We might also want to exclude comments as that could affect averages like:

/**
 * LICENSE bla bla
 * Some very long comment here
 */
function f(a,b){return a.concat(b)}var x=function(n){return n+1};

cli/tools/lint/linter.rs Outdated Show resolved Hide resolved
@bartlomieju bartlomieju marked this pull request as ready for review November 6, 2024 23:47
cli/tools/lint/linter.rs Outdated Show resolved Hide resolved
cli/tools/lint/linter.rs Outdated Show resolved Hide resolved
@@ -97,6 +99,15 @@ impl CliLinter {
ext: Option<&str>,
) -> Result<(ParsedSource, Vec<LintDiagnostic>), AnyError> {
let specifier = specifier_from_file_path(file_path)?;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Files whose names end in .min.js, .min.mjs, or .min.cjs can be skipped.

@bartlomieju bartlomieju removed this from the 2.1.0 milestone Nov 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

deno lint produces unreadable output for minified files.
4 participants