Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Performance: forcefully disable some compiler flags #11241

Open
@43081j

Description

@43081j

Before You File a Proposal Please Confirm You Have Done The Following...

Relevant Package

tsconfig-utils

My proposal is suitable for this project

  • I believe my proposal would be useful to the broader TypeScript community (meaning it is not a niche proposal).

Description

We already have a default set of core compiler options here:

export const CORE_COMPILER_OPTIONS = {
// Required to avoid parse from causing emit to occur
noEmit: true,
// Flags required to make no-unused-vars work
noUnusedLocals: true,
noUnusedParameters: true,
} satisfies ts.CompilerOptions;

afaict, these override the user's project compiler options.

while doing some reading through a CPU profile of a lint run, i noticed a significant amount of time is spent ensuring file names are correct when forceConsistentCasingInFileNames: true.

in the repo I was using, hacking this into CORE_COMPILER_OPTIONS as false made the test run speed up from 1m20s to 1m. i ran it a few times, and the times did vary but always had a significant improvement.

so suggestion number 1: force forceConsistentCasingInFileNames: false since we don't really care when linting.

suggestion/idea number 2: maybe this isn't the only setting? maybe there are others doing unnecessary checks we don't really care for in lint runs (typescript's own lint/strict checking, etc)

Additional Info

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    awaiting responseIssues waiting for a reply from the OP or another partyenhancementNew feature or requestperformanceIssues regarding performance

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions