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

feat(lint): skip build directories by default #26635

Closed
wants to merge 2 commits into from

Conversation

bartlomieju
Copy link
Member

@bartlomieju bartlomieju commented Oct 30, 2024

Closes #26573

@@ -425,13 +425,25 @@ impl WorkspaceLinter {
}
}

const DEFAULT_IGNORED_DIRS: [&'static str; 5] =
[".config", ".next", ".vite", "dist", "target"];

Choose a reason for hiding this comment

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

maybe .docusaurus too?

Copy link
Member

@dsherret dsherret Oct 30, 2024

Choose a reason for hiding this comment

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

The problem with doing this is we're not setting users up for success. They should be adding the following to their project:

{
  "exclude": [
    ".next"
  ]
}

...this will give them better performance because now all tooling will ignore that folder (especially the lsp).

If we do this, then we should have something in deno_config that automatically adds this (maybe if the workspace contains certain dependencies, but that would be more work for us to do on startup). Overall though, I don't think ignoring build folders is something that's hard for users to grasp and by doing this we're not teaching users about it. We're also making Deno more complex by having all these little rules where it works one way for this kind of folder and another way for another folder. Can we offer a suggestion for people to exclude these folders instead when they get lint rule errors or deno fmt --check errors in them?

Question: Why do we need this if we already ignore gitignored folders?

@bartlomieju bartlomieju added this to the 2.1.0 milestone Nov 1, 2024
@bartlomieju
Copy link
Member Author

Closing in favor of #26897 which seems more desirable.

@bartlomieju bartlomieju deleted the lint_skip_build_dirs branch November 16, 2024 15:05
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 fmt and deno lint should ignore hidden directories by default
3 participants