Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

chore: migrate linting from eslint to biome 2.3.8#790

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
chriswk merged 7 commits intomainfrommigrate-eslint-biome
Nov 28, 2025

Conversation

@gastonfournier
Copy link
Contributor

About the changes

  • replace ESLint/Prettier with Biome 2.3.8, add biome.json, update lint/lint:fix and lint-staged scripts
  • remove ESLint config/deps; lockfile regenerated
  • align formatter settings (2-space, 100 cols, single quotes, semicolons) with prior style
  • harden types and fix lint findings across client, strategies, repository, metrics, and tests (eliminate most any/Function uses, safer error handling, optional chaining fix)
  • Biome check now passes; remaining warnings limited to a few tests (non-null assertions/any) left as-is

@gastonfourniergastonfournier added 👤🤝🤖 half-halfRoughly equal human-LLM collaboration and removed 🤖👤 mostly-aiLLM-led with human assistance labelsNov 27, 2025
Comment on lines +67 to +85
privateasynchandleErrorEvent(error:unknown):Promise<void>{
constnow=newDate();

conststatusCode=
typeoferror==='object'&&
error!==null&&
typeof(erroras{status?:unknown}).status==='number'
?(erroras{status:number}).status
:undefined;

constmessage=
typeoferror==='string'
?error
:typeoferror==='object'&&
error!==null&&
typeof(erroras{message?:unknown}).message==='string'
?(erroras{message:string}).message
:undefined;

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

Biome complains about any as a parameter, we can decide to add a biome ignore for this line as the extra complexity to get a valid type out of an unknown type is a bit too much. But on the other hand, this is the proper way of doing it...

@coveralls
Copy link

coveralls commentedNov 27, 2025
edited
Loading

Pull Request Test Coverage Report forBuild 19742438061

Details

  • 90 of94(95.74%) changed or added relevant lines in24 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.5%) to89.533%

Changes Missing CoverageCovered LinesChanged/Added Lines%
src/repository/storage-provider-file.ts3475.0%
src/index.ts6966.67%
TotalsCoverage Status
Change from baseBuild 19738441153:-0.5%
Covered Lines:1330
Relevant Lines:1409

💛 -Coveralls

Comment on lines +263 to +268
letcounter=this.counters.get(key);
if(!counter){
counter=newCounterImpl(opts);
this.counters.set(key,counter);
}
returnthis.counters.get(key)!;
returncounter;
Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

This refactor removes 1 extra access to counters

privateconvertToMap(features:FeatureInterface[]):FeatureToggleData{
constobj=features.reduce(
(o:{[s:string]:FeatureInterface},feature:FeatureInterface)=>{
consta={ ...o};
Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

Not sure why we were doing this...

Comment on lines +42 to +45
returneventSourceasunknownasEventSource&{
closed:boolean;
emit:(eventName:string,data:unknown)=>void;
};
Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

Defining a proper type to keep biome happy

Comment on lines +26 to +34
* flagNames:'foo' | 'bar';
* }
* }
*/
exportinterfaceUnleashTypes{}
exportinterfaceUnleashTypes{
flagNames:string;
}

typeGetCustom<KextendsPropertyKey,Fallback>=KextendskeyofUnleashTypes
?UnleashTypes[K]
:Fallback;
exporttypeName=GetCustom<'flagNames',string>;
exporttypeName=UnleashTypes['flagNames'];
Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

I had to fix this, asName was resolving to unknown type

constres=awaitpost({
url,
json:payload,
json:payloadasunknownasRecord<string,unknown>,
Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

json is type Data (map of string to anything), while payload is restricted, so we can't send a type that restricts Data type

});
if(!res.ok){
if(res.status===403||res.status==401){
if(res.status===403||res.status===401){
Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

Nice one, spotted by biome

Copy link
Member

@chriswkchriswk left a comment

Choose a reason for hiding this comment

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

Thanks for taking the trouble to do this.

@github-project-automationgithub-project-automationbot moved this fromNew toApproved PRs inIssues and PRsNov 28, 2025
@chriswkchriswk merged commit3342678 intomainNov 28, 2025
5 checks passed
@chriswkchriswk deleted the migrate-eslint-biome branchNovember 28, 2025 08:14
@github-project-automationgithub-project-automationbot moved this fromApproved PRs toDone inIssues and PRsNov 28, 2025
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@chriswkchriswkchriswk approved these changes

Assignees

@gastonfourniergastonfournier

Labels

👤🤝🤖 half-halfRoughly equal human-LLM collaboration

Projects

Status: Done

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

3 participants

@gastonfournier@coveralls@chriswk

[8]ページ先頭

©2009-2025 Movatter.jp