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

📎 Allow overriding files.maxSize #5295

Open
arendjr opened this issue Mar 7, 2025 · 5 comments
Open

📎 Allow overriding files.maxSize #5295

arendjr opened this issue Mar 7, 2025 · 5 comments
Labels
A-Project Area: project good first issue Good for newcomers S-Enhancement Status: Improve an existing feature S-Help-wanted Status: you're familiar with the code base and want to help the project

Comments

@arendjr
Copy link
Contributor

arendjr commented Mar 7, 2025

Description

The files section is not part of overrides. This makes sense to some degree, because we wouldn't want to override files.includes... that wouldn't make much sense. But unfortunately it also means that files.maxSize cannot be overridden right now. We should handle that one still.

Look for adding a files section to OverridePattern in crates/biome_configuration/src/overrides.rs.

Original discussion: #5211

@arendjr arendjr added A-Project Area: project good first issue Good for newcomers S-Enhancement Status: Improve an existing feature S-Help-wanted Status: you're familiar with the code base and want to help the project labels Mar 7, 2025
@vladimir-ivanov
Copy link

what would be the use case for this please? OverridePattern seems to be used in

Image

none of editorconfig / prettier / ESLint supports max file size config option.

biome.json already has files.maxSize in its schema

Thanks

@arendjr
Copy link
Contributor Author

arendjr commented Apr 3, 2025

The OverridePattern you have highlighted should have a files: Option<OverrideFilesConfiguration> field, so that the files.maxSize we have at the root (the one you saw in the schema) can also be overridden for specific paths. Note that max_size is the only field from FilesConfiguration that we want to allow to be overridden, hence why we should create a dedicated OverrideFilesConfiguration type for it.

Is this something you like to work on? If so, I can assign you.

@vladimir-ivanov
Copy link

not feeling confident to start working on the code just yet. Potentially yes, but can work on it after the 22nd of April. thank you

@vladimir-ivanov
Copy link

could you give an example of the end goal please? e.g. biome.json to have a section of some json ? or something else? forgive me if I am asking silly questions :-) Trying to understand it better.
else this part alone I am getting/ but we also want to use it somewhere?
Image

@arendjr
Copy link
Contributor Author

arendjr commented Apr 3, 2025

Oh yes, I should have linked the original discussion where someone asked for this feature: #5211

It has examples of what they're trying to achieve.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Project Area: project good first issue Good for newcomers S-Enhancement Status: Improve an existing feature S-Help-wanted Status: you're familiar with the code base and want to help the project
Projects
None yet
Development

No branches or pull requests

2 participants